1 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
3 * remote-utils.c (readchar): Allow binary data in received messages.
5 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7 * win32-low.c (attaching): New global.
8 (win32_create_inferior): Clear the `attaching' global.
9 (win32_attach): Set the `attaching' global.
10 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11 attaching. Only set a breakpoint at the entry point if not
14 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16 * server.c (main): Don't report dll events on the initial
17 connection on attaches.
19 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
21 * server.c (main): Relax numerical bases supported for the pid of
22 the --attach command line argument.
24 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
26 * win32-low.c (win32_attach): Call OpenProcess before
27 DebugActiveProcess, not after. Add last error output to error
30 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
32 * win32-low.c (win32_get_thread_context)
33 (win32_set_thread_context): New functions.
34 (thread_rec): Use win32_get_thread_context.
35 (continue_one_thread, win32_resume): Use win32_set_thread_context.
36 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
40 Pedro Alves <pedro_alves@portugalmail.pt>
42 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
44 (child_add_thread): Minor cleanup.
45 (child_continue): Resume artificially suspended threads before
46 calling ContinueDebugEvent.
47 (suspend_one_thread): New.
48 (fake_breakpoint_event): New.
49 (get_child_debug_event): Change return type to int. Check here if
50 gdb sent an interrupt request. If a soft interrupt was requested,
51 fake a breakpoint event. Return 0 if there is no event to handle,
53 (win32_wait): Don't check here if gdb sent an interrupt request.
54 Ensure there is a valid event to handle.
55 (win32_request_interrupt): Add soft interruption method as last
59 Pedro Alves <pedro_alves@portugalmail.pt>
61 * win32-low.h (win32_thread_info): Add descriptions to the
62 structure members. Replace `suspend_count' counter by a
64 * win32-low.c (thread_rec): Update condition of when to get the
65 context from the inferior. Rely on ContextFlags being set if it
66 has already been retrieved. Only suspend the inferior thread if
67 we haven't already. Warn if that fails.
68 (continue_one_thread): s/suspend_count/suspended/. Only call
69 ResumeThread once. Warn if that fails.
71 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
73 * win32-low.c (win32_wait): Don't read from the inferior when it
76 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
78 * Makefile.in (win32_low_h): New variable.
79 (win32-low.o): Add dependency on $(win32_low_h).
80 (win32-arm-low.o, win32-i386-low.o): New rules.
82 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
84 * hostio.c: Correct copyright year.
86 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
88 * Makefile.in (OBS): Add hostio.o.
90 * server.h (handle_vFile): Declare.
92 * server.c (handle_v_requests): Take packet_len and new_packet_len
93 for binary packets. Call handle_vFile.
94 (main): Update call to handle_v_requests.
96 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
98 * linux-low.c: Include <sched.h>.
100 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
102 * linux-low.c (linux_tracefork_grandchild): New.
103 (linux_tracefork_child): Use clone.
104 (linux_test_for_tracefork): Use clone; allocate and free a stack.
106 2007-10-31 Joel Brobecker <brobecker@adacore.com>
108 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
110 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
112 * linux-low.c (handle_extended_wait): Handle unexpected signals.
114 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
116 * inferiors.c (change_inferior_id): Delete.
117 (add_pid_to_list, pull_pid_from_list): New.
118 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
119 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
120 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
121 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
122 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
123 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
124 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
125 (using_threads): Always set to 1.
126 (handle_extended_wait): New.
127 (add_process): Do not set TID.
128 (linux_create_inferior): Set must_set_ptrace_flags.
129 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
130 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
131 (linux_thread_alive): Rename TID argument to LWPID.
132 (linux_wait_for_process): Handle unknown processes. Do not use TID.
133 (linux_wait_for_event): Do not use TID or check using_threads. Update
134 call to dead_thread_notify. Call handle_extended_wait.
135 (linux_create_inferior): Use PTRACE_SETOPTIONS.
136 (send_sigstop): Delete sigstop_sent.
137 (wait_for_sigstop): Avoid TID.
138 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
139 (linux_test_for_tracefork): New.
140 (linux_lookup_signals): Use thread_db_active and
141 linux_supports_tracefork_flag.
142 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
143 * linux-low.h (get_process_thread): Avoid TID.
144 (struct process_ifo): Move thread_known and tid to the end. Remove
146 (linux_attach_lwp, thread_db_init): Update prototypes.
147 * server.h (change_inferior_id): Delete prototype.
148 (add_pid_to_list, pull_pid_from_list): New prototypes.
149 * thread-db.c (thread_db_use_events): New.
150 (find_first_thread): Rename to...
151 (find_one_thread): ...this. Update callers and messages. Do not
152 call fatal. Check thread_db_use_events. Do not call
153 change_inferior_id or new_thread_notify.
154 (maybe_attach_thread): Update. Do not call new_thread_notify.
155 (thread_db_init): Set thread_db_use_events. Check use_events.
156 * utils.c (fatal, warning): Correct message prefix.
158 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
160 * Makefile.in (clean): Remove new files.
161 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
162 (powerpc-64.o, powerpc-64.c): New rules.
163 * configure.srv: Use alternate register sets for powerpc64-*-linux*
164 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
166 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
168 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
169 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
170 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
171 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
172 (target_regsets): Add AltiVec and SPE register sets.
173 * configure.ac: Check for AltiVec and SPE.
174 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
175 (ppc_fill_vrregset, ppc_store_vrregset): New.
176 (target_regsets): Add AltiVec register set.
177 * configure: Regenerated.
179 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
181 * linux-low.c (O_LARGEFILE): Define.
182 (linux_read_memory): Use /proc/PID/mem.
183 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
184 * configure, config.in: Regenerated.
186 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
188 * linux-low.c (linux_wait_for_event): Do not pass signals while
191 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
193 * win32-low.c (create_process): New.
194 (win32_create_inferior): Use create_process instead of
195 CreateProcess. If create_process failed retry appending an ".exe"
196 suffix. Store the GetLastError result immediatelly after
197 create_process calls and use it on the call to error.
199 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
201 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
203 2007-08-23 Joel Brobecker <brobecker@adacore.com>
205 * configure.ac: Switch license to GPLv3.
207 2007-08-01 Michael Snyder <msnyder@access-company.com>
209 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
211 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
213 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
215 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
216 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
217 CloseToolhelp32Snapshot.
218 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
219 CloseToolhelp32Snapshot.
221 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
223 * server.c (main): Check for inferior exit before main loop.
225 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
227 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
228 instead of on tmp_desc.
230 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
231 Daniel Jacobowitz <dan@codesourcery.com>
233 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
234 (add_thread): Minor cleanups.
235 (clear_inferiors): Move lower in the file. Clear the DLL
237 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
238 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
239 (xml_escape_text): New.
240 * server.c (handle_query): Handle qXfer:libraries:read. Report it
242 (handle_v_cont): Report errors.
243 (gdbserver_version): Update.
244 (main): Correct size of own_buf. Do not report initial DLL events.
245 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
246 (unloaded_dll, xml_escape_text): New.
247 * win32-low.c (enum target_waitkind): Update comments.
248 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
249 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
250 (win32_EnumProcessModules, win32_GetModuleInformation)
251 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
252 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
253 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
254 (win32_Module32First, win32_Module32Next, load_toolhelp)
255 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
256 (get_child_debug_event): Handle DLL events.
257 (win32_wait): Likewise.
259 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
261 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
262 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
264 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
266 * win32-low.c (handle_output_debug_string): Ignore event if not
269 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
271 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
273 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
275 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
277 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
279 * inferiors.c (change_inferior_id): Add comment.
280 * linux-low.c (check_removed_breakpoint): Add an early
281 prototype. Improve debug output.
282 (linux_attach): Doc update.
283 (linux_detach_one_process, linux_detach): Clean up before releasing
285 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
286 * linux-low.h (struct process_info): Doc improvement.
287 * mem-break.c (delete_all_breakpoints): New.
288 * mem-break.h (delete_all_breakpoints): New prototype.
289 * thread-db.c (find_first_thread): New.
290 (thread_db_create_event): Call it instead of
291 thread_db_find_new_threads. Clean up unused variables.
292 (maybe_attach_thread): Remove first thread handling.
293 (thread_db_find_new_threads): Use find_first_thread.
294 (thread_db_get_tls_address): Likewise.
296 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
298 * thread-db.c (thread_db_find_new_threads): Add prototype.
299 (thread_db_create_event): Check for the main thread before adding
301 (maybe_attach_thread): Only enable event reporting if TID == 0.
302 (thread_db_get_tls_address): Check for new threads.
304 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
306 * linux-low.c (linux_create_inferior): Try execv before execvp.
307 * spu-low.c (spu_create_inferior): Likewise.
309 2007-06-13 Mike Frysinger <vapier@gentoo.org>
311 * linux-low.c (linux_create_inferior): Change execv to execvp.
312 * spu-low.c (spu_create_inferior): Likewies.
314 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
316 * Makefile.in (clean): Clean new files instead of deleted ones.
317 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
318 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
320 * configure.srv: Specify XML files and new regformats for MIPS and
322 * linux-mips-low.c (mips_num_regs): Set to only used registers.
323 (mips_regmap): Do not fetch $0. Remove unused registers. Add
324 an entry for the restart register.
325 (mips_cannot_fetch_register, mips_cannot_store_register)
326 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
327 register names to match the XML descriptions.
328 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
329 restart register instead of $0.
331 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
332 Markus Deuling <deuling@de.ibm.com>
334 * remote-utils.c (decode_xfer_write): New function.
335 * server.h (decode_xfer_write): Add prototype.
336 * server.c (handle_query): Add PACKET_LEN argument. Support
337 qXfer:spu:read and qXfer:spu:write packets.
338 (main): Pass packet_len to handle_query.
339 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
340 * target.h (target_ops): Add qxfer_spu.
342 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
344 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
345 accessing non-seekable spufs files.
347 2007-05-16 Markus Deuling <deuling@de.ibm.com>
349 * server.c (handle_query): Add reply for qC packet.
351 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
352 Leo Zayas <lerele@champenstudios@com>
354 * server.h (check_remote_input_interrupt_request): New function.
355 * remote_utils.c (INVALID_DESCRIPTOR): New define.
356 (remote_desc): Initialize with INVALID_DESCRIPTOR.
357 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
358 (check_remote_input_interrupt_request): New function.
359 * server.h (check_remote_input_interrupt_request): Declare.
360 * win32-low.c (winapi_DebugBreakProcess,
361 winapi_GenerateConsoleCtrlEvent): New typedefs.
362 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
364 (win32_wait): Check for remote interrupt request
365 with check_remote_input_interrupt_request.
366 (win32_request_interrupt): New function.
367 (win32_target_op): Set request_interrupt to win32_request_interrupt.
369 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
371 * win32-low.c (debug_registers_changed,
372 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
373 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
374 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
375 (thread_rec): Get context using the low target.
376 (child_add_thread): Call thread_added on the low target,
377 which does the same thing.
379 (do_initial_child_stuff): Remove debug registers references.
380 Set context using the low target. Resume threads after
381 setting the contexts.
382 (child_continue): Remove dead variable. Remove debug
383 registers references.
384 (child_fetch_inferior_registers): Go through the low target.
385 (do_child_store_inferior_registers): Remove.
386 (child_store_inferior_registers): Go through the low target.
387 (win32_resume): Remove debug registers references.
388 Set context using the low target.
389 (handle_exception): Change return type to void. Don't record
390 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
391 first chance exception.
392 (get_child_debug_event): Change return type to void. Remove
393 goto loop. Always return after waiting for debug event.
394 (win32_wait): Convert to switch statement. Handle spurious
397 * win32-i386-low.c (debug_registers_changed,
398 debug_registers_used): New.
399 (initial_stuff): Rename to ...
400 (i386_initial_stuff): ... this. Clear debug registers
402 (store_debug_registers): Delete.
403 (i386_get_thread_context): New.
404 (load_debug_registers): Delete.
405 (i386_set_thread_context): New.
406 (i386_thread_added): New.
407 (single_step): Rename to ...
408 (i386_single_step): ... this.
409 (do_fetch_inferior_registers): Rename to ...
410 (i386_fetch_inferior_register): ... this.
411 (i386_store_inferior_register): New.
412 (the_low_target): Adapt to new interface.
414 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
415 (arm_get_thread_context): New.
416 (arm_set_thread_context): New.
418 (do_fetch_inferior_registers): Rename to ...
419 (arm_fetch_inferior_register): ... this.
420 (arm_store_inferior_register): New.
421 (arm_wince_breakpoint): Reimplement as unsigned long.
422 (arm_wince_breakpoint_len): Define.
423 (the_low_target): Adapt to new interface.
425 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
426 load_debug_registers. Add get_thread_context, set_thread_context,
427 thread_added and store_inferior_register. Rename
428 fetch_inferior_registers to fetch_inferior_register.
429 (regptr): Remove declaration.
431 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
433 * linux-low.c (linux_detach): Change return type to int. Return 0.
434 * spu-low.c (spu_detach): Likewise.
436 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
438 * target.h (target_ops): Change return type of detach to int.
440 (join_inferior): New.
441 * server.c (main): Don't skip detach support on mingw32.
442 If the inferior doesn't support detaching return error.
443 Call join_inferior instead of using waitpid.
444 * linux-low.c (linux_join): New.
445 (linux_target_op): Add linux_join.
446 * spu-low.c (spu_join): New.
447 (spu_target_ops): Add spu_join.
448 * win32-low.c (win32_detach): Adapt to new interface.
449 Reopen current_process_handle before detaching. Issue a child
450 resume before detaching.
452 (win32_target_op): Add win32_join.
454 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
456 * win32-low.c (win32-attach): Fix return value.
457 * target.h (target_ops): Describe ATTACH return values.
459 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
461 * win32-low.c (GETPROCADDRESS): Define.
462 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
463 (winapi_DebugSetProcessKillOnExit): Likewise.
464 (win32_create_inferior): Force usage of ansi CreateProcessA.
465 (win32_attach): Use GETPROCADDRESS.
466 (win32_detach): Likewise.
468 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
470 * win32-low.c (win32_wait): Don't use WSTOPSIG.
472 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
474 * win32-low.c: Commit leftover changes from 2007-03-29.
476 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
478 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
479 fields short instead of int. Add explicit padding.
480 (i387_cache_to_fsave): Remove unnecessary casts.
481 (i387_fsave_to_cache): Doc fix.
482 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
484 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
486 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
487 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
489 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
491 * configure.srv (arm*-*-mingw32ce*): Move near the other
494 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
496 * configure.ac: Add errno checking.
497 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
498 sys/file.h and malloc.h.
499 (AC_CHECK_DECLS): Add perror.
500 (srv_mingwce): Handle.
501 * configure.srv (i[34567]86-*-cygwin*): Add
502 win32-i386-low.o to srv_tgtobj.
503 (i[34567]86-*-mingw*): Likewise.
504 (arm*-*-mingw32ce*): Add case.
505 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
506 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
507 [__MINGW32CE__] (strerror): New function.
508 [__MINGW32CE__] (errno): Define to GetLastError.
509 [__MINGW32CE__] (COUNTOF): New macro.
510 (remote_open): Remove extra close call.
511 * mem-break.c (delete_breakpoint_at): New function.
512 * mem-break.h (delete_breakpoint_at): Declare.
513 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
514 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
515 [USE_WIN32API] (read, write): Add char* casts.
516 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
517 * server.h: Include wincecompat.h on Windows CE.
518 [HAVE_ERRNO_H]: Check.
519 (perror): Declare if not declared.
520 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
521 (perror_with_name): Remove errno declaration.
522 * wincecompat.h: New.
523 * wincecompat.c: New.
525 * win32-arm-low.c: New.
526 * win32-i386-low.c: New.
527 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
528 (OUTMSG2): Make it safe.
530 (COUNTOF): New macro.
531 (NUM_REGS): Get it from the low target.
532 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
533 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
534 (thread_rec): Let low target handle debug registers.
535 (child_add_thread): Likewise.
536 (child_init_thread_list): Likewise.
537 (continue_one_thread): Likewise.
539 (do_child_fetch_inferior_registers): Move to ...
540 * win32-i386-low.c: ... here, and rename to ...
541 (do_fetch_inferior_registers): ... this.
542 * win32-low.c (child_fetch_inferior_registers):
543 Go through the low target.
544 (do_child_store_inferior_registers): Use regptr.
545 (strwinerror): New function.
546 (win32_create_inferior): Handle Windows CE.
547 Use strwinerror instead of strerror on Windows error
548 codes. Add program to the error output.
549 Don't close the main thread handle on Windows CE.
550 (win32_attach): Use coredll.dll on Windows CE.
551 (win32_kill): Close current process and current
553 (win32_detach): Use coredll.dll on Windows CE.
554 (win32_resume): Let low target handle debug registers, and
556 (handle_exception): Add/Remove initial breakpoint. Avoid
557 non-existant WSTOPSIG on Windows CE.
558 (win32_read_inferior_memory): Cast to remove warning.
559 (win32_arch_string): Go through the low target.
560 (initialize_low): Call set_breakpoint_data with the low
562 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
563 FOP_REGNUM, mappings): Move to ...
564 * win32-i386-low.c: ... here.
565 * win32-low.c (win32_thread_info): Move to ...
566 * win32-low.h: ... here.
567 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
568 win32-arm-low.c and wincecompat.c.
570 (install-only:): Likewise.
571 (gdbserver:): Likewise.
572 (gdbreplay:): Likewise.
573 * config.in: Regenerate.
574 * configure: Regenerate.
576 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
578 * win32-low.c: Rename typedef thread_info to
579 win32_thread_info throughout.
581 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
583 * win32-i386-low.c: Rename to ...
584 * win32-low.c: ... this.
585 * configure.srv: Replace win32-i386-low.o with win32-low.o.
586 * Makefile.in: Likewise.
588 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
590 * remote-utils.c (monitor_output): Constify msg parameter.
591 * server.h (monitor_output): Likewise.
592 * win32-i386-low.c (handle_output_debug_string): New.
593 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
594 handle_output_debug_string.
595 (get_child_debug_event): Likewise.
597 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
599 * server.c (main): Correct strtoul check.
601 2007-03-27 Jon Ringle <jon@ringle.org>
603 * linux-low.c: Check __ARCH_HAS_MMU__ also.
605 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
607 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
609 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
611 * terminal.h: Check HAVE_SGTTY_H.
613 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
615 * remote-utils.c (remote_open): Print out the assigned port number.
617 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
619 * remote-utils.c (monitor_output): New function.
620 * server.c (debug_threads): Define here.
621 (monitor_show_help): New function.
622 (handle_query): Handle qRcmd.
623 (main): Do not handle 'd' packet.
624 * server.h (debug_threads, remote_debug, monitor_output): Declare.
625 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
628 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
630 * Makefile.in (EXEEXT): New.
631 (clean): Use $(EXEEXT).
633 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
635 * target.h (target_ops): Rename send_signal to request_interrupt,
636 and remove enum target_signal parameter.
637 * linux-low.c (linux_request_interrupt): Rename from
638 linux_send_signal, and always send SIGINT.
639 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
640 and always send SIGINT.
641 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
643 (input_interrupt): Likewise.
645 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
647 * server.c (get_features_xml): Check if target implemented
649 * win32-i386-low.c (win32_arch_string): New.
650 (win32_target_ops): Add win32_arch_string as arch_string member.
652 2007-02-22 Markus Deuling <deuling@de.ibm.com>
654 * spu-low.c (spu_arch_string): New.
655 (spu_target_ops): Add spu_arch_string.
657 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
659 * remote-utils.c: Remove HAVE_TERMINAL_H check.
660 * configure.ac: Do not check for terminal.h.
661 * configure, config.in: Regenerated.
663 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
665 * Makefile.in (OBS): Add $(XML_BUILTIN).
666 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
668 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
669 (arm-with-iwmmxt.c): New.
670 * config.in, configure: Regenerate.
671 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
672 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
673 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
674 (arm*-*-linux*): Add iWMMXt and regset support.
675 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
676 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
677 (arm_store_wmmxregset, target_regsets): New.
678 * server.c (get_features_xml): Take annex argument. Check builtin
680 (handle_query): Handle multiple annexes.
682 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
684 * remote-utils.c [USE_WIN32API] (read, write): Define.
685 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
688 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
690 * linux-i386-low.c (the_low_target): Set arch_string.
691 * linux-x86-64-low.c (the_low_target): Likewise.
692 * linux-low.c (linux_arch_string): New.
693 (linux_target_ops): Add it.
694 * linux-low.h (struct linux_target_ops): Add arch_string.
695 * server.c (write_qxfer_response): Use const void * for DATA.
696 (get_features_xml): New.
697 (handle_query): Handle qXfer:features:read. Report it for qSupported.
698 * target.h (struct target_ops): Add arch_string method.
700 2007-01-03 Denis Pilat <denis.pilat@st.com>
701 Daniel Jacobowitz <dan@codesourcery.com>
703 * linux-low.c (linux_kill): Handle being called with no threads.
704 * win32-i386-low.c (win32_kill): Likewise.
705 (get_child_debug_event): Clear current_process_handle.
707 2006-12-30 Denis PILAT <denis.pilat@st.com>
708 Daniel Jacobowitz <dan@codesourcery.com>
710 * remote-utils.c (remote_open): Check the type of specified
711 serial port devices before opening them.
712 * server.c (main): Kill the inferior if an error occurs during
713 the first remote_open.
715 2006-12-05 Markus Deuling <deuling@de.ibm.com>
717 * README: Update supported targets.
719 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
721 * Makefile.in (clean): Remove reg-mips64.c.
722 (reg-mips64.c, reg-mips64.o): New rules.
723 * configure.srv: Handle mips64. Include regset support for mips.
724 * linux-mips-low.c (union mips_register): New.
725 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
726 (mips_breakpoint, mips_breakpoint_at): Use int.
727 (mips_collect_register, mips_supply_register)
728 (mips_collect_register_32bit, mips_supply_register_32bit)
729 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
730 (mips_store_fpregset, target_regsets): New.
731 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
733 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
735 * configure.srv: Add target "spu*-*-*".
736 * Makefile.in (clean): Remove reg-spu.c.
737 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
738 * spu-low.c: New file.
740 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
742 * configure.ac: Correct td_thr_tls_get_addr test.
743 * configure: Regenerated.
745 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
747 * linux-low.c (linux_wait_for_event): Reformat. Use the
749 * remote-utils.c (decode_address_to_semicolon): New.
750 * server.c (pass_signals, handle_general_set): New.
751 (handle_query): Mention QPassSignals for qSupported.
752 (main): Call handle_general_set.
753 * server.h (pass_signals, decode_address_to_semicolon): New.
755 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
757 * server.c (handle_query): Correct error handling for read_auxv.
759 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
761 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
762 and srv_linux_thread_db to yes.
763 * linux-s390-low.c (s390_fill_gregset): New function.
764 (target_regsets): Define data structure.
766 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
768 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
769 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
770 * config.in, configure: Regenerated.
771 * inferiors.c (gdb_id_to_thread): New function.
772 (gdb_id_to_thread_id): Use it.
773 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
774 * linux-low.h (struct process_info): Add th member.
775 (thread_db_get_tls_address): New prototype.
776 * remote-utils.c (decode_address): Make non-static.
777 * server.c (handle_query): Handle qGetTLSAddr.
778 * server.h (gdb_id_to_thread, decode_address): New prototypes.
779 * target.h (struct target_ops): Add get_tls_address.
780 * thread-db.c (maybe_attach_thread): Save the thread handle.
781 (thread_db_get_tls_address): New.
783 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
785 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
786 (linux_resume_one_process): Take a siginfo_t *. Update all
787 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
788 (struct pending_signals): Add a siginfo_t.
789 (linux_wait_for_process): Always set last_status.
790 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
791 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
792 * linux-low.h (struct process_info): Add last_status.
794 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
796 * remote-utils.c (try_rle): New function.
797 (putpkt_binary): Use it.
799 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
801 * Makefile.in (clean): Clean reg-x86-64-linux.c.
802 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
803 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
804 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
805 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
808 2006-08-08 Richard Sandiford <richard@codesourcery.com>
810 * server.c (terminal_fd): New variable.
811 (old_foreground_pgrp): Likewise.
812 (restore_old_foreground_pgrp): New function.
813 (start_inferior): Record the terminal file descriptor in terminal_fd
814 and its original foreground group in old_foreground_pgrp. Register
815 restore_old_foreground_pgrp with atexit().
817 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
819 * server.c (handle_query): Correct qPart to qXfer.
821 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
823 * configure.ac: Check for more headers which are missing on
824 Windows. Automatically supply -lwsock32 and USE_WIN32API.
825 * configure.srv: Add Cygwin and mingw32.
826 * remote-utils.c: Don't include headers unconditionally which
827 are missing on mingw32. Include <winsock.h> for mingw32.
828 (remote_open): Adjust for mingw32 support. Flush
829 standard error after writing to it.
830 (remote_close, putpkt_binary, input_interrupt, block_async_io)
831 (unblock_async_io, enable_async_io, disable_async_io)
832 (readchar, getpkt): Update for Winsock support.
833 (prepare_resume_reply): Expect a protocol signal number.
834 * server.c: Disable <sys/wait.h> on mingw32.
835 (start_inferior): Adjust for mingw32 support. Flush
836 standard error after writing to it.
837 (attach_inferior): Likewise. Use protocol signal
839 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
841 * win32-i386-low.c: New file.
842 * Makefile.in (XM_CLIBS): Set.
843 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
844 (win32-i386-low.o): New dependency rule.
845 * linux-low.c (linux_wait): Use target signal numbers.
846 * target.h (struct target_ops): Doc fix.
847 * server.h (target_signal_to_name): New prototype.
848 * gdbreplay.c: Don't include headers unconditionally which
849 are missing on mingw32. Include <winsock.h> for mingw32.
850 (remote_close, remote_open): Adjust for Winsock support.
851 * configure, config.in: Regenerated.
853 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
855 * server.c (decode_xfer_read, write_qxfer_response): New.
856 (handle_query): Take a packet length argument. Handle
857 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
858 the qSupported response.
859 (main): Update call to handle_query.
861 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
863 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
864 (putpkt_binary): Renamed from putpkt and adjusted for binary
866 (putpkt): New wrapper for putpkt_binary.
867 (readchar): Don't mask off the high bit.
868 (decode_X_packet): New function.
869 * server.c (main): Call putpkt_binary if a handler sets the packet
870 length. Save the length of the incoming packet. Handle 'X'.
871 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
873 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
875 * server.c (handle_query): Handle qSupported.
877 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
879 * remote-utils.c (all_symbols_looked_up): New variable.
880 (look_up_one_symbol): Check it.
881 * server.h (look_up_one_symbol): New declaration.
882 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
884 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
886 * Makefile.in (linux-arm-low.o): Update dependencies.
887 * linux-arm-low.c: Include "gdb_proc_service.h".
888 (PTRACE_GET_THREAD_AREA): Define.
889 (ps_get_thread_area): New function.
891 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
893 * configure.srv (m68k*-*-uclinux*): New target.
894 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
895 (linux_resume_one_process): Remove extraneous cast.
896 (linux_read_offsets): New.
897 (linux_target_op): Add linux_read_offsets on mmuless systems.
898 * server.c (handle_query): Add qOffsets logic.
899 * target.h (struct target_ops): Add read_offsets.
901 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
903 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
904 (PTRACE_GET_THREAD_AREA): Define.
905 (ps_get_thread_area): New function.
906 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
907 (linux-x86-64-low.o): Update.
909 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
911 * configure.ac: Remove checks for prfpregset_t.
912 * gdb_proc_service.h: New file.
913 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
914 new "gdb_proc_service.h".
915 * proc-service.c: Likewise.
916 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
917 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
918 * Makefile.in (gdb_proc_service_h): Updated.
919 * configure, config.in: Regenerated.
921 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
923 * remote-utils.c (prepare_resume_reply): Move declaration
924 of gdb_id_from_wait to the top of the block.
926 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
928 * linux-low.c (regsets_store_inferior_registers): Read the regset
929 from the target before filling it.
931 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
933 * server.c (attach_inferior): Return SIGTRAP for a successful
936 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
938 * Makefile.in (OBS): Add version.o.
939 (STAGESTUFF): Delete.
940 (version.o): Add dependencies.
941 (version.c): Replace rule.
942 (clean): Remove version.c.
943 * server.c (gdbserver_version): New.
944 (gdbserver_usage): Use printf.
945 (main): Handle --version and --help.
946 * server.h (version, host_name): Add declarations.
948 2005-12-23 Eli Zaretskii <eliz@gnu.org>
960 * linux-x86-64-low.c:
972 * linux-crisv32-low.c:
984 * gdbserver.1: Add (C) after Copyright. Update the FSF
987 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
989 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
990 (arm_breakpoint_at): Recognize both breakpoints.
991 (the_low_target): Use the correct breakpoint instruction.
993 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
995 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
996 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
997 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
998 (the_low_target): Update.
1000 2005-10-25 Andreas Schwab <schwab@suse.de>
1002 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1004 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1005 (ia64_num_regs): Reduce to 462.
1007 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1009 * acinclude.m4: Correct quoting.
1010 * aclocal.m4: Regenerated.
1012 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1013 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1014 (thread_db_init): Call thread_db_err_str.
1015 * configure.ac: Check for TD_VERSION.
1016 * config.in, configure: Regenerated.
1018 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1020 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1022 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1024 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1025 is not available. Define HAVE_PTRACE_GETREGS if it is.
1026 * config.in, configure: Regenerated.
1027 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1028 * linux-i386-low.c, linux-m68k-low.c: Update to use
1029 HAVE_PTRACE_GETREGS.
1030 * linux-low.c (regsets_fetch_inferior_registers)
1031 (regsets_store_inferior_registers): Only return 0 if we processed
1033 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1034 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1036 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1038 * inferiors.c (struct thread_info): Add gdb_id.
1039 (add_thread): Add gdb_id argument.
1040 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1041 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1042 calls to add_thread.
1043 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1044 * server.c (handle_query): Use thread_to_gdb_id.
1045 (handle_v_cont, main): Use gdb_id_to_thread_id.
1046 * server.h (add_thread): Update prototype.
1047 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1050 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1052 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1053 left-padded registers.
1054 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1055 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1057 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1059 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1060 * configure: Regenerate.
1061 * config.in: Regenerate.
1062 * server.h (NEED_DECLARATION_STRERROR):
1063 Replace with !HAVE_DECL_STRERROR.
1065 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1067 * linux-low.c (linux_wait, linux_send_signal): Don't test
1068 an unsigned long variable for > 0 if it could be MAX_ULONG.
1069 * server.c (myresume): Likewise.
1070 * target.c (set_desired_inferior): Likewise.
1072 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1074 * configure.ac: Simplify and improve check for socklen_t.
1075 * configure, config.in: Regenerate.
1077 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1079 * acconfig.h: Remove.
1080 * configure.ac: Add a test for socklen_t. Use three-argument
1081 AC_DEFINE throughout.
1082 * config.in: Regenerated using autoheader 2.59.
1083 * configure: Regenerated.
1085 * gdbreplay.c (socklen_t): Provide a default.
1086 (remote_open): Use socklen_t.
1087 * remote-utils.c (socklen_t): Provide a default.
1088 (remote_open): Use socklen_t.
1089 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1092 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1094 * linux-low.c (linux_read_memory, linux_write_memory)
1095 (linux_read_auxv): Likewise.
1096 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1097 (check_mem_write): Likewise.
1098 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1100 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1101 (registers_from_string, register_data): Likewise.
1102 * server.c (handle_query, main): Likewise.
1103 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1104 (decode_M_packet): Likewise.
1105 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1106 * target.h (struct target_ops): Update read_memory, write_memory,
1108 (read_inferior_memory, write_inferior_memory): Update.
1109 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1111 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1112 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1113 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1114 linux-s390-low.c, linux-sh-low.c: Update for changes in
1115 read_inferior_memory and the_low_target->breakpoint.
1117 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1119 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1120 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1121 * configure.srv: Add powerpc64-*-linux*.
1122 * linux-ppc64-low.c: New file.
1124 2005-05-23 Orjan Friberg <orjanf@axis.com>
1126 * linux-cris-low.c: New file with support for CRIS.
1127 * linux-crisv32-low.c: Ditto for CRISv32.
1128 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1129 (clean): Add reg-cris.c and reg-crisv32.c.
1130 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1131 reg-crisv32.o, and reg-crisv32.c to make rules.
1132 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1135 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1137 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1138 of sizeof (PTRACE_XFER_TYPE).
1139 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1141 2005-05-12 Orjan Friberg <orjanf@axis.com>
1143 * target.h (struct target_ops): Add insert_watchpoint,
1144 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1145 pointers for hardware watchpoint support.
1146 * linux-low.h (struct linux_target_ops): Ditto.
1147 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1148 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1149 to linux_target_ops.
1150 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1152 * server.c (main): Recognize 'Z' and 'z' packets.
1154 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1156 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1157 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1158 (the_low_target): Add new members.
1160 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1162 * proc-service.c (ps_lgetregs): Search all_processes instead of
1165 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1167 * server.c (start_inferior): Change return type to int.
1168 (attach_inferior): Change sigptr to int *.
1169 (handle_v_cont, handle_v_requests): Change signal to int *.
1170 (main): Change signal to int.
1172 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1174 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1175 * configure.srv: Add m32r*-*-linux*.
1176 * linux-m32r-low.c: New file.
1178 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1180 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1182 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1184 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1185 Take unsigned long arguments for PIDs.
1186 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1187 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1188 (wait_for_sigstop, linux_resume_one_process)
1189 (regsets_fetch_inferior_registers, linux_send_signal)
1190 (linux_read_auxv): Likewise. Update the types of variables holding
1191 PIDs. Update format string specifiers.
1192 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1193 * remote-utils.c (prepare_resume_reply): Likewise.
1194 * server.c (cont_thread, general_thread, step_thread)
1195 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1197 (handle_query): Update format specifiers.
1198 (handle_v_cont, main): Use strtoul for thread IDs.
1199 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1200 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1201 (general_thread, step_thread, thread_from_wait)
1202 (old_thread_from_wait): Update.
1203 * target.h (struct thread_resume): Use unsigned long for THREAD.
1204 (struct target_ops): Use unsigned long for arguments to attach and
1207 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1209 * acinclude.m4: Include bfd/bfd.m4 directly.
1210 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1211 <agriffis@toolchain.org>.
1212 * aclocal.m4, configure: Regenerated.
1214 2005-01-07 Andrew Cagney <cagney@gnu.org>
1216 * configure.ac: Rename configure.in, require autoconf 2.59.
1217 * configure: Re-generate.
1219 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1221 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1223 * aclocal.m4: Regenerated.
1224 * configure: Regenerated.
1226 2004-11-21 Andreas Schwab <schwab@suse.de>
1228 * linux-m68k-low.c (m68k_num_gregs): Define.
1229 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1230 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1231 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1232 (m68k_breakpoint_at): New. Add to the_low_target.
1234 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1235 srv_linux_thread_db to yes.
1237 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1239 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1240 (ARCH_SET_FS): Likewise.
1241 (ARCH_GET_FS): Likewise.
1242 (ARCH_GET_GS): Likewise.
1244 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1246 * linux-i386-low.c (ps_get_thread_area): New.
1247 * linux-x86-64-low.c (ps_get_thread_area): New.
1248 * linux-low.c: Include <sys/syscall.h>.
1249 (linux_kill_one_process): Don't kill the first thread here.
1250 (linux_kill): Kill the first thread here.
1251 (kill_lwp): New function.
1252 (send_sigstop, linux_send_signal): Use it.
1253 * proc-service.c: Clean up #ifdefs.
1254 (fpregset_info): Delete.
1255 (ps_lgetregs): Update and enable implementation.
1256 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1258 * remote-utils.c (struct sym_cache, symbol_cache): New.
1259 (input_interrupt): Print a clearer message.
1260 (async_io_enabled): New variable.
1261 (enable_async_io, disable_async_io): Use it. Update comments.
1262 (look_up_one_symbol): Use the symbol cache.
1263 * thread-db.c (thread_db_look_up_symbols): New function.
1264 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1266 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1268 * configure.in: Test for -rdynamic.
1269 * configure: Regenerated.
1270 * Makefile (INTERNAL_LDFLAGS): New.
1271 (gdbserver, gdbreplay): Use it.
1273 2004-09-02 Andrew Cagney <cagney@gnu.org>
1275 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1277 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1279 * linux-low.c (linux_wait): Clear all_processes list also.
1281 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1283 * linux-low.c: Include <errno.h>. Remove extern declaration of
1286 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1288 * gdbreplay.c, server.h, utils.c: Update copyright years.
1290 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1292 * server.c (main): Print child status or termination signal from
1293 variable 'signal', not 'sig'.
1295 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1297 * linux-low.c (linux_read_memory): Change return type to
1298 int. Check for and return error from ptrace().
1299 * target.c (read_inferior_memory): Change return type to int. Pass
1300 back return status from the_target->read_memory().
1301 * target.h (struct target_ops): Adapt *read_memory() prototype.
1303 (read_inferior_memory): Adapt prototype.
1304 * server.c (main): Return an error packet if
1305 read_inferior_memory() returns an error.
1307 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1309 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1310 Unify with other clean targets.
1312 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1314 * server.c (handle_v_cont): Call set_desired_inferior.
1316 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1318 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1320 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1322 * linux-low.c (linux_wait): Unblock async I/O.
1323 (linux_resume): Block and enable async I/O.
1324 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1325 * server.h (block_async_io, unblock_async_io): Add prototypes.
1327 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1329 * remote-utils.c (remote_open): Print a status notice after
1331 * server.c (attach_inferior): Print a status notice after
1334 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1336 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1338 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1340 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1342 * server.c, target.h: Update copyright years.
1344 2004-02-25 Roland McGrath <roland@redhat.com>
1346 * target.h (struct target_ops): New member `read_auxv'.
1347 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1348 * linux-low.c (linux_read_auxv): New function.
1349 (linux_target_ops): Initialize `read_auxv' member to that.
1351 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1353 Committed by Jim Blandy <jimb@redhat.com>.
1355 * linux-s390-low.c (s390_num_regs): Update.
1356 (s390_regmap): Remove control registers. Use __s390x__ predefine
1357 instead of GPR_SIZE to distiguish s390 and s390x targets.
1359 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1361 * linux-low.c: Update copyright year.
1362 (check_removed_breakpoint): Clear pending_is_breakpoint.
1363 (linux_set_resume_request, linux_queue_one_thread)
1364 (resume_status_pending_p): New functions.
1365 (linux_continue_one_thread): Use process->resume.
1366 (linux_resume): Only resume threads if there are no pending events.
1367 * linux-low.h (struct process_info): Add resume request
1370 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1372 * regcache.c (new_register_cache): Clear the allocated register
1373 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1375 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1377 * linux-low.c (linux_resume): Take a struct thread_resume *
1379 (linux_wait): Update call.
1380 (resume_ptr): New static variable.
1381 (linux_continue_one_thread): Renamed from
1382 linux_continue_one_process. Use resume_ptr.
1383 (linux_resume): Use linux_continue_one_thread.
1384 * server.c (handle_v_cont, handle_v_requests): New functions.
1385 (myresume): New function.
1386 (main): Handle 'v' case.
1387 * target.h (struct thread_resume): New type.
1388 (struct target_ops): Change argument of "resume" to struct
1390 (myresume): Delete macro.
1392 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1394 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1395 (uninstall): Support DESTDIR.
1397 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1399 * configure.srv: Add xscale*linux copy of arm*linux entry.
1401 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1403 * linux-arm-low.c (arm_reinsert_addr): New function.
1404 (the_low_target): Add arm_reinsert_addr.
1406 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1408 * mem-break.c: Remove whitespace at end of file.
1410 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1412 * configure.in: Check whether we need to prototype strerror.
1413 * server.h: Optionally prototype strerror.
1414 * gdbreplay.c (perror_with_name): Use strerror.
1415 * linux-low.c (linux_attach_lwp): Use strerror.
1416 * utils.c (perror_with_name): Use strerror.
1417 * config.in, configure: Regenerated.
1419 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1421 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1422 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1424 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1426 * Makefile.in (SFILES): Update.
1427 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1428 low-sun3.c: Remove files.
1430 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1432 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1433 (linux_detach_one_process, linux_detach): New functions.
1434 (linux_target_ops): Add linux_detach.
1435 * server.c (main): Handle 'D' packet.
1436 * target.h (struct target_ops): Add "detach" member.
1437 (detach_inferior): Define.
1439 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1441 From Kelley Cook <kelleycook@wideopenwest.com>:
1442 * configure.srv: Accept i[34567]86 variants.
1444 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1446 * linux-low.c (linux_wait_for_event): Correct comment typos.
1447 (linux_resume_one_process): Call check_removed_breakpoint.
1448 (linux_send_signal): New function.
1449 (linux_target_ops): Add linux_send_signal.
1450 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1452 * target.h (struct target_ops): Add send_signal.
1454 2003-05-29 Jim Blandy <jimb@redhat.com>
1456 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1457 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1458 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1459 away part of the register's value.
1461 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1463 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1464 (linux_wait_for_event, linux_init_signals): Likewise.
1466 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1468 * configure.in: Check for stdlib.h.
1469 * configure: Regenerated.
1470 * config.in: Regenerated.
1472 2003-01-04 Andreas Schwab <schwab@suse.de>
1474 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1476 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1478 * Makefile.in: Remove obsolete code.
1480 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1482 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1483 defined(PT_FPR0_HI).
1485 2002-11-17 Stuart Hughes <seh@zee2.com>
1487 * linux-arm-low.c (arm_num_regs): Increase.
1488 (arm_regmap): Include status register.
1490 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1492 * linux-low.c (register_addr): Remove incorrect -1 check.
1494 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1496 * linux-low.c (linux_create_inferior): Call setpgid. Return
1498 (unstopped_p, linux_signal_pid): Remove.
1499 (linux_target_ops): Remove linux_signal_pid.
1500 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1501 global instead of target method.
1502 * target.h (struct target_ops): Remove signal_pid. Update comment
1503 for create_inferior.
1504 * server.c (signal_pid): New variable.
1505 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1506 gdbserver. Set the child to be the foreground process group.
1507 (attach_inferior): Set signal_pid.
1509 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1511 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1513 2002-08-20 Jim Blandy <jimb@redhat.com>
1515 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1518 2002-08-01 Andrew Cagney <cagney@redhat.com>
1520 * Makefile.in: Make chill references obsolete.
1522 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1524 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1525 * configure: Regenerate.
1526 * config.in: Regenerate.
1528 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1530 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1531 (perror_with_name, remote_close, remote_open, expect, play): Static.
1533 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1535 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1536 byte offsets instead of an array of indexes.
1537 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1539 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1541 * regcache.c: Add comment.
1543 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1545 * thread-db.c: New file.
1546 * proc-service.c: New file.
1547 * acinclude.m4: New file.
1548 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1549 proc-service.o, and thread-db.o.
1550 (linux-low.o): Add USE_THREAD_DB.
1551 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1552 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1553 * aclocal.m4: Regenerated.
1554 * config.in: Regenerated.
1555 * configure: Regenerated.
1556 * configure.in: Check for proc_service.h, sys/procfs.h,
1557 thread_db.h, and linux/elf.h headrs.
1558 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1559 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1560 Check for -lthread_db and thread support.
1561 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1562 PowerPC, and SuperH.
1563 * i387-fp.c: Constify arguments.
1564 * i387-fp.h: Likewise.
1565 * inferiors.c: (struct thread_info): Renamed from
1566 `struct inferior_info'. Remove PID member. Use generic inferior
1567 list header. All uses updated.
1568 (inferiors, signal_pid): Removed.
1569 (all_threads): New variable.
1570 (get_thread): Define.
1571 (add_inferior_to_list): New function.
1572 (for_each_inferior): New function.
1573 (change_inferior_id): New function.
1574 (add_inferior): Removed.
1575 (remove_inferior): New function.
1576 (add_thread): New function.
1577 (free_one_thread): New function.
1578 (remove_thread): New function.
1579 (clear_inferiors): Use for_each_inferior and free_one_thread.
1580 (find_inferior): New function.
1581 (find_inferior_id): New function.
1582 (inferior_target_data): Update argument type.
1583 (set_inferior_target_data): Likewise.
1584 (inferior_regcache_data): Likewise.
1585 (set_inferior_regcache_data): Likewise.
1586 * linux-low.c (linux_bp_reinsert): Remove.
1587 (all_processes, stopping_threads, using_thrads)
1588 (struct pending_signals, debug_threads, pid_of): New.
1589 (inferior_pid): Replace with macro.
1590 (struct inferior_linux_data): Remove.
1591 (get_stop_pc, add_process): New functions.
1592 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1593 Use add_process and add_thread.
1594 (linux_attach_lwp): New function, based on old linux_attach. Use
1595 add_process and add_thread. Set stop_expected for new threads.
1596 (linux_attach): New function.
1597 (linux_kill_one_process): New function.
1598 (linux_kill): Kill all LWPs.
1599 (linux_thread_alive): Use find_inferior_id.
1600 (check_removed_breakpoints, status_pending_p): New functions.
1601 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1602 Update. Use WNOHANG. Wait for cloned processes also. Update process
1603 struct for the found process.
1604 (linux_wait_for_event): New function.
1605 (linux_wait): Use it. Support LWPs.
1606 (send_sigstop, wait_for_sigstop, stop_all_processes)
1607 (linux_resume_one_process, linux_continue_one_process): New functions.
1608 (linux_resume): Support LWPs.
1609 (REGISTER_RAW_SIZE): Remove.
1610 (fetch_register): Use register_size instead. Call supply_register.
1611 (usr_store_inferior_registers): Likewise. Call collect_register.
1613 (regsets_fetch_inferior_registers): Improve error message.
1614 (regsets_store_inferior_registers): Add debugging.
1615 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1616 (unstopped_p, linux_signal_pid): New functions.
1617 (linux_target_ops): Add linux_signal_pid.
1618 (linux_init_signals): New function.
1619 (initialize_low): Call it. Initialize using_threads.
1620 * regcache.c (inferior_regcache_data): Add valid
1622 (get_regcache): Fetch registers lazily. Add fetch argument
1623 and update all callers.
1624 (regcache_invalidate_one, regcache_invalidate): New
1626 (new_register_cache): Renamed from create_register_cache.
1627 Return the new regcache.
1628 (free_register_cache): Change argument to a void *.
1629 (registers_to_string, registers_from_string): Call get_regcache
1630 with fetch flag set.
1631 (register_data): Make static. Pass fetch flag to get_regcache.
1632 (supply_register): Call get_regcache with fetch flag clear.
1633 (collect_register): Call get_regcache with fetch flag set.
1634 (collect_register_as_string): New function.
1635 * regcache.h: Update.
1636 * remote-utils.c (putpkt): Flush after debug output and use
1638 Handle input interrupts while waiting for an ACK.
1639 (input_interrupt): Use signal_pid method.
1640 (getpkt): Flush after debug output and use stderr.
1641 (outreg): Use collect_register_as_string.
1642 (new_thread_notify, dead_thread_notify): New functions.
1643 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1645 (look_up_one_symbol): Flush after debug output.
1646 * server.c (step_thread, server_waiting): New variables.
1647 (start_inferior): Don't use signal_pid. Update call to mywait.
1648 (attach_inferior): Update call to mywait.
1649 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1650 (main): Don't fetch/store registers explicitly. Use
1651 set_desired_inferior. Support proposed ``Hs'' packet. Update
1654 (struct inferior_list, struct_inferior_list_entry): New.
1655 * target.c (set_desired_inferior): New.
1656 (write_inferior_memory): Constify.
1657 (mywait): New function.
1659 (struct target_ops): New signal_pid method.
1660 (mywait): Removed macro, added prototype.
1662 * linux-low.h (regset_func): Removed.
1663 (regset_fill_func, regset_store_func): New.
1664 (enum regset_type): New.
1665 (struct regset_info): Add type field. Use new operation types.
1666 (struct linux_target_ops): stop_pc renamed to get_pc.
1667 Add decr_pc_after_break and breakpoint_at.
1668 (get_process, get_thread_proess, get_process_thread)
1669 (strut process_info, all_processes, linux_attach_lwp)
1670 (thread_db_init): New.
1672 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1673 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1674 (the_low_target): Add new members.
1675 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1676 (i386_store_fpxregset): Constify.
1677 (target_regsets): Add new kind identifier.
1678 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1679 (i386_set_pc): Add debugging.
1680 (i386_breakpoint_at): New function.
1681 (the_low_target): Add new members.
1682 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1683 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1684 (mips_breakpoint_at): New.
1685 (the_low_target): Add new members.
1686 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1687 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1688 (the_low_target): Add new members.
1689 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1690 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1691 (the_low_target): Add new members.
1692 * linux-x86-64-low.c (target_regsets): Add new kind
1695 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1697 From Martin Pool <mbp@samba.org>:
1698 * server.c (gdbserver_usage): New function.
1701 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1703 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1706 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1708 * Makefile.in: Remove obsolete code.
1710 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1712 * linux-low.c (regsets_fetch_inferior_registers),
1713 (regsets_store_inferior_registers): Removed cast to int from
1715 * regcache.h: Added declaration of struct inferior_info.
1717 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1719 * inferiors.c (struct inferior_info): Add regcache_data.
1720 (add_inferior): Call create_register_cache.
1721 (clear_inferiors): Call free_register_cache.
1722 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1723 * regcache.c (struct inferior_regcache_data): New.
1724 (registers): Remove.
1725 (get_regcache): New function.
1726 (create_register_cache, free_register_cache): New functions.
1727 (set_register_cache): Don't initialize the register cache here.
1728 (registers_to_string, registers_from_string, register_data): Call
1730 * regcache.h: Add prototypes.
1731 * server.h: Likewise.
1733 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1735 * mem-break.c: New file.
1736 * mem-break.h: New file.
1737 * Makefile.in: Add mem-break.o rule; update server.h
1739 * inferiors.c (struct inferior_info): Add target_data
1741 (clear_inferiors): Free target_data member if set.
1742 (inferior_target_data, set_inferior_target_data): New functions.
1743 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1744 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1745 * linux-low.c (linux_bp_reinsert): New variable.
1746 (struct inferior_linux_data): New.
1747 (linux_create_inferior): Use set_inferior_target_data.
1748 (linux_attach): Likewise. Call add_inferior.
1749 (linux_wait_for_one_inferior): New function.
1750 (linux_wait): Call it.
1751 (linux_write_memory): Add const.
1752 (initialize_low): Call set_breakpoint_data.
1753 * linux-low.h (struct linux_target_ops): Add breakpoint
1755 * server.c (attach_inferior): Remove extra add_inferior
1757 * server.h: Include mem-break.h. Update inferior.c
1759 * target.c (read_inferior_memory)
1760 (write_inferior_memory): New functions.
1761 * target.h (read_inferior_memory)
1762 (write_inferior_memory): Change macros to prototypes.
1763 (struct target_ops): Update comments. Add const to write_memory
1766 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1768 * linux-low.c (usr_store_inferior_registers): Support
1769 registers which are allowed to fail to store.
1770 * linux-low.h (linux_target_ops): Likewise.
1771 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1772 (ppc_cannot_store_register): FPSCR may not be storable.
1774 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1776 * server.h: Include <string.h> if HAVE_STRING_H.
1777 * ChangeLog: Correct paths in last ChangeLog entry.
1779 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1781 * linux-low.h: Remove obsolete prototypes.
1782 (struct linux_target_ops): New.
1783 (extern the_low_target): New.
1784 * linux-low.c (num_regs, regmap): Remove declarations.
1785 (register_addr): Use the_low_target explicitly.
1786 (fetch_register): Likewise.
1787 (usr_fetch_inferior_registers): Likewise.
1788 (usr_store_inferior_registers): Likewise.
1789 * linux-arm-low.c (num_regs): Remove.
1790 (arm_num_regs): Define.
1791 (arm_regmap): Renamed from regmap, made static.
1792 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1794 (arm_cannot_store_register): Renamed from cannot_store_register,
1796 (the_low_target): New.
1797 * linux-i386-low.c (num_regs): Remove.
1798 (i386_num_regs): Define.
1799 (i386_regmap): Renamed from regmap, made static.
1800 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1802 (i386_cannot_store_register): Renamed from cannot_store_register,
1804 (the_low_target): New.
1805 * linux-ia64-low.c (num_regs): Remove.
1806 (ia64_num_regs): Define.
1807 (ia64_regmap): Renamed from regmap, made static.
1808 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1810 (ia64_cannot_store_register): Renamed from cannot_store_register,
1812 (the_low_target): New.
1813 * linux-m68k-low.c (num_regs): Remove.
1814 (m68k_num_regs): Define.
1815 (m68k_regmap): Renamed from regmap, made static.
1816 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1818 (m68k_cannot_store_register): Renamed from cannot_store_register,
1820 (the_low_target): New.
1821 * linux-mips-low.c (num_regs): Remove.
1822 (mips_num_regs): Define.
1823 (mips_regmap): Renamed from regmap, made static.
1824 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1826 (mips_cannot_store_register): Renamed from cannot_store_register,
1828 (the_low_target): New.
1829 * linux-ppc-low.c (num_regs): Remove.
1830 (ppc_num_regs): Define.
1831 (ppc_regmap): Renamed from regmap, made static.
1832 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1834 (ppc_cannot_store_register): Renamed from cannot_store_register,
1836 (the_low_target): New.
1837 * linux-s390-low.c (num_regs): Remove.
1838 (s390_num_regs): Define.
1839 (s390_regmap): Renamed from regmap, made static.
1840 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1842 (s390_cannot_store_register): Renamed from cannot_store_register,
1844 (the_low_target): New.
1845 * linux-sh-low.c (num_regs): Remove.
1846 (sh_num_regs): Define.
1847 (sh_regmap): Renamed from regmap, made static.
1848 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1850 (sh_cannot_store_register): Renamed from cannot_store_register,
1852 (the_low_target): New.
1853 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1854 (the_low_target): New.
1856 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1858 * Makefile.in: Add stamp-h target.
1859 * configure.in: Create stamp-h.
1860 * configure: Regenerated.
1862 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1864 * inferiors.c: New file.
1865 * target.c: New file.
1866 * target.h: New file.
1867 * Makefile.in: Add target.o and inferiors.o. Update
1869 * linux-low.c (inferior_pid): New static variable,
1870 moved from server.c.
1871 (linux_create_inferior): Renamed from create_inferior.
1872 Call add_inferior. Return 0 on success instead of a PID.
1873 (linux_attach): Renamed from myattach.
1874 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1875 (linux_thread_alive): Renamed from mythread_alive.
1876 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1878 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1879 (regsets_store_inferior_registers): Correct error message.
1880 Add missing ``return 0''.
1881 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1882 (linux_store_registers): Renamed from store_inferior_registers.
1883 (linux_read_memory): Renamed from read_inferior_memory.
1884 (linux_write_memory): Renamed from write_inferior_memory.
1885 (linux_target_ops): New structure.
1886 (initialize_low): Call set_target_ops ().
1887 * remote-utils.c (unhexify): New function.
1888 (hexify): New function.
1889 (input_interrupt): Send signals to ``signal_pid''.
1890 * server.c (inferior_pid): Remove.
1891 (start_inferior): Update create_inferior call.
1892 (attach_inferior): Call add_inferior.
1893 (handle_query): New function.
1894 (main): Call handle_query for `q' packets.
1895 * server.h: Include "target.h". Remove obsolete prototypes.
1896 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1898 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1900 * Makefile.in: Add WARN_CFLAGS. Update configury
1902 * configure.in: Check for <string.h>
1903 * configure: Regenerate.
1904 * config.in: Regenerate.
1905 * gdbreplay.c: Include needed system headers.
1906 (remote_open): Remove strchr prototype.
1907 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1908 * regcache.c (supply_register): Change buf argument to const void *.
1909 (supply_register_by_name): Likewise.
1910 (collect_register): Change buf argument to void *.
1911 (collect_register_by_name): Likewise.
1912 * regcache.h: Add missing prototypes.
1913 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1914 * server.c (handle_query): New function.
1915 (attached): New static variable, moved out of main.
1916 (main): Quiet longjmp clobber warnings.
1917 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1918 * utils.c (error): Remove NORETURN.