1 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3 * win32-low.c (attaching): New global.
4 (win32_create_inferior): Clear the `attaching' global.
5 (win32_attach): Set the `attaching' global.
6 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
7 attaching. Only set a breakpoint at the entry point if not
10 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12 * server.c (main): Don't report dll events on the initial
13 connection on attaches.
15 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17 * server.c (main): Relax numerical bases supported for the pid of
18 the --attach command line argument.
20 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
22 * win32-low.c (win32_attach): Call OpenProcess before
23 DebugActiveProcess, not after. Add last error output to error
26 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
28 * win32-low.c (win32_get_thread_context)
29 (win32_set_thread_context): New functions.
30 (thread_rec): Use win32_get_thread_context.
31 (continue_one_thread, win32_resume): Use win32_set_thread_context.
32 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
36 Pedro Alves <pedro_alves@portugalmail.pt>
38 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
40 (child_add_thread): Minor cleanup.
41 (child_continue): Resume artificially suspended threads before
42 calling ContinueDebugEvent.
43 (suspend_one_thread): New.
44 (fake_breakpoint_event): New.
45 (get_child_debug_event): Change return type to int. Check here if
46 gdb sent an interrupt request. If a soft interrupt was requested,
47 fake a breakpoint event. Return 0 if there is no event to handle,
49 (win32_wait): Don't check here if gdb sent an interrupt request.
50 Ensure there is a valid event to handle.
51 (win32_request_interrupt): Add soft interruption method as last
55 Pedro Alves <pedro_alves@portugalmail.pt>
57 * win32-low.h (win32_thread_info): Add descriptions to the
58 structure members. Replace `suspend_count' counter by a
60 * win32-low.c (thread_rec): Update condition of when to get the
61 context from the inferior. Rely on ContextFlags being set if it
62 has already been retrieved. Only suspend the inferior thread if
63 we haven't already. Warn if that fails.
64 (continue_one_thread): s/suspend_count/suspended/. Only call
65 ResumeThread once. Warn if that fails.
67 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
69 * win32-low.c (win32_wait): Don't read from the inferior when it
72 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
74 * Makefile.in (win32_low_h): New variable.
75 (win32-low.o): Add dependency on $(win32_low_h).
76 (win32-arm-low.o, win32-i386-low.o): New rules.
78 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
80 * hostio.c: Correct copyright year.
82 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
84 * Makefile.in (OBS): Add hostio.o.
86 * server.h (handle_vFile): Declare.
88 * server.c (handle_v_requests): Take packet_len and new_packet_len
89 for binary packets. Call handle_vFile.
90 (main): Update call to handle_v_requests.
92 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
94 * linux-low.c: Include <sched.h>.
96 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
98 * linux-low.c (linux_tracefork_grandchild): New.
99 (linux_tracefork_child): Use clone.
100 (linux_test_for_tracefork): Use clone; allocate and free a stack.
102 2007-10-31 Joel Brobecker <brobecker@adacore.com>
104 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
106 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
108 * linux-low.c (handle_extended_wait): Handle unexpected signals.
110 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
112 * inferiors.c (change_inferior_id): Delete.
113 (add_pid_to_list, pull_pid_from_list): New.
114 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
115 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
116 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
117 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
118 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
119 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
120 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
121 (using_threads): Always set to 1.
122 (handle_extended_wait): New.
123 (add_process): Do not set TID.
124 (linux_create_inferior): Set must_set_ptrace_flags.
125 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
126 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
127 (linux_thread_alive): Rename TID argument to LWPID.
128 (linux_wait_for_process): Handle unknown processes. Do not use TID.
129 (linux_wait_for_event): Do not use TID or check using_threads. Update
130 call to dead_thread_notify. Call handle_extended_wait.
131 (linux_create_inferior): Use PTRACE_SETOPTIONS.
132 (send_sigstop): Delete sigstop_sent.
133 (wait_for_sigstop): Avoid TID.
134 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
135 (linux_test_for_tracefork): New.
136 (linux_lookup_signals): Use thread_db_active and
137 linux_supports_tracefork_flag.
138 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
139 * linux-low.h (get_process_thread): Avoid TID.
140 (struct process_ifo): Move thread_known and tid to the end. Remove
142 (linux_attach_lwp, thread_db_init): Update prototypes.
143 * server.h (change_inferior_id): Delete prototype.
144 (add_pid_to_list, pull_pid_from_list): New prototypes.
145 * thread-db.c (thread_db_use_events): New.
146 (find_first_thread): Rename to...
147 (find_one_thread): ...this. Update callers and messages. Do not
148 call fatal. Check thread_db_use_events. Do not call
149 change_inferior_id or new_thread_notify.
150 (maybe_attach_thread): Update. Do not call new_thread_notify.
151 (thread_db_init): Set thread_db_use_events. Check use_events.
152 * utils.c (fatal, warning): Correct message prefix.
154 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
156 * Makefile.in (clean): Remove new files.
157 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
158 (powerpc-64.o, powerpc-64.c): New rules.
159 * configure.srv: Use alternate register sets for powerpc64-*-linux*
160 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
162 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
164 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
165 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
166 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
167 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
168 (target_regsets): Add AltiVec and SPE register sets.
169 * configure.ac: Check for AltiVec and SPE.
170 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
171 (ppc_fill_vrregset, ppc_store_vrregset): New.
172 (target_regsets): Add AltiVec register set.
173 * configure: Regenerated.
175 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
177 * linux-low.c (O_LARGEFILE): Define.
178 (linux_read_memory): Use /proc/PID/mem.
179 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
180 * configure, config.in: Regenerated.
182 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
184 * linux-low.c (linux_wait_for_event): Do not pass signals while
187 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
189 * win32-low.c (create_process): New.
190 (win32_create_inferior): Use create_process instead of
191 CreateProcess. If create_process failed retry appending an ".exe"
192 suffix. Store the GetLastError result immediatelly after
193 create_process calls and use it on the call to error.
195 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
197 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
199 2007-08-23 Joel Brobecker <brobecker@adacore.com>
201 * configure.ac: Switch license to GPLv3.
203 2007-08-01 Michael Snyder <msnyder@access-company.com>
205 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
207 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
209 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
211 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
212 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
213 CloseToolhelp32Snapshot.
214 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
215 CloseToolhelp32Snapshot.
217 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
219 * server.c (main): Check for inferior exit before main loop.
221 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
223 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
224 instead of on tmp_desc.
226 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
227 Daniel Jacobowitz <dan@codesourcery.com>
229 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
230 (add_thread): Minor cleanups.
231 (clear_inferiors): Move lower in the file. Clear the DLL
233 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
234 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
235 (xml_escape_text): New.
236 * server.c (handle_query): Handle qXfer:libraries:read. Report it
238 (handle_v_cont): Report errors.
239 (gdbserver_version): Update.
240 (main): Correct size of own_buf. Do not report initial DLL events.
241 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
242 (unloaded_dll, xml_escape_text): New.
243 * win32-low.c (enum target_waitkind): Update comments.
244 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
245 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
246 (win32_EnumProcessModules, win32_GetModuleInformation)
247 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
248 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
249 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
250 (win32_Module32First, win32_Module32Next, load_toolhelp)
251 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
252 (get_child_debug_event): Handle DLL events.
253 (win32_wait): Likewise.
255 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
257 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
258 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
260 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
262 * win32-low.c (handle_output_debug_string): Ignore event if not
265 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
267 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
269 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
271 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
273 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
275 * inferiors.c (change_inferior_id): Add comment.
276 * linux-low.c (check_removed_breakpoint): Add an early
277 prototype. Improve debug output.
278 (linux_attach): Doc update.
279 (linux_detach_one_process, linux_detach): Clean up before releasing
281 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
282 * linux-low.h (struct process_info): Doc improvement.
283 * mem-break.c (delete_all_breakpoints): New.
284 * mem-break.h (delete_all_breakpoints): New prototype.
285 * thread-db.c (find_first_thread): New.
286 (thread_db_create_event): Call it instead of
287 thread_db_find_new_threads. Clean up unused variables.
288 (maybe_attach_thread): Remove first thread handling.
289 (thread_db_find_new_threads): Use find_first_thread.
290 (thread_db_get_tls_address): Likewise.
292 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
294 * thread-db.c (thread_db_find_new_threads): Add prototype.
295 (thread_db_create_event): Check for the main thread before adding
297 (maybe_attach_thread): Only enable event reporting if TID == 0.
298 (thread_db_get_tls_address): Check for new threads.
300 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
302 * linux-low.c (linux_create_inferior): Try execv before execvp.
303 * spu-low.c (spu_create_inferior): Likewise.
305 2007-06-13 Mike Frysinger <vapier@gentoo.org>
307 * linux-low.c (linux_create_inferior): Change execv to execvp.
308 * spu-low.c (spu_create_inferior): Likewies.
310 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
312 * Makefile.in (clean): Clean new files instead of deleted ones.
313 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
314 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
316 * configure.srv: Specify XML files and new regformats for MIPS and
318 * linux-mips-low.c (mips_num_regs): Set to only used registers.
319 (mips_regmap): Do not fetch $0. Remove unused registers. Add
320 an entry for the restart register.
321 (mips_cannot_fetch_register, mips_cannot_store_register)
322 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
323 register names to match the XML descriptions.
324 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
325 restart register instead of $0.
327 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
328 Markus Deuling <deuling@de.ibm.com>
330 * remote-utils.c (decode_xfer_write): New function.
331 * server.h (decode_xfer_write): Add prototype.
332 * server.c (handle_query): Add PACKET_LEN argument. Support
333 qXfer:spu:read and qXfer:spu:write packets.
334 (main): Pass packet_len to handle_query.
335 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
336 * target.h (target_ops): Add qxfer_spu.
338 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
340 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
341 accessing non-seekable spufs files.
343 2007-05-16 Markus Deuling <deuling@de.ibm.com>
345 * server.c (handle_query): Add reply for qC packet.
347 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
348 Leo Zayas <lerele@champenstudios@com>
350 * server.h (check_remote_input_interrupt_request): New function.
351 * remote_utils.c (INVALID_DESCRIPTOR): New define.
352 (remote_desc): Initialize with INVALID_DESCRIPTOR.
353 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
354 (check_remote_input_interrupt_request): New function.
355 * server.h (check_remote_input_interrupt_request): Declare.
356 * win32-low.c (winapi_DebugBreakProcess,
357 winapi_GenerateConsoleCtrlEvent): New typedefs.
358 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
360 (win32_wait): Check for remote interrupt request
361 with check_remote_input_interrupt_request.
362 (win32_request_interrupt): New function.
363 (win32_target_op): Set request_interrupt to win32_request_interrupt.
365 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
367 * win32-low.c (debug_registers_changed,
368 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
369 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
370 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
371 (thread_rec): Get context using the low target.
372 (child_add_thread): Call thread_added on the low target,
373 which does the same thing.
375 (do_initial_child_stuff): Remove debug registers references.
376 Set context using the low target. Resume threads after
377 setting the contexts.
378 (child_continue): Remove dead variable. Remove debug
379 registers references.
380 (child_fetch_inferior_registers): Go through the low target.
381 (do_child_store_inferior_registers): Remove.
382 (child_store_inferior_registers): Go through the low target.
383 (win32_resume): Remove debug registers references.
384 Set context using the low target.
385 (handle_exception): Change return type to void. Don't record
386 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
387 first chance exception.
388 (get_child_debug_event): Change return type to void. Remove
389 goto loop. Always return after waiting for debug event.
390 (win32_wait): Convert to switch statement. Handle spurious
393 * win32-i386-low.c (debug_registers_changed,
394 debug_registers_used): New.
395 (initial_stuff): Rename to ...
396 (i386_initial_stuff): ... this. Clear debug registers
398 (store_debug_registers): Delete.
399 (i386_get_thread_context): New.
400 (load_debug_registers): Delete.
401 (i386_set_thread_context): New.
402 (i386_thread_added): New.
403 (single_step): Rename to ...
404 (i386_single_step): ... this.
405 (do_fetch_inferior_registers): Rename to ...
406 (i386_fetch_inferior_register): ... this.
407 (i386_store_inferior_register): New.
408 (the_low_target): Adapt to new interface.
410 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
411 (arm_get_thread_context): New.
412 (arm_set_thread_context): New.
414 (do_fetch_inferior_registers): Rename to ...
415 (arm_fetch_inferior_register): ... this.
416 (arm_store_inferior_register): New.
417 (arm_wince_breakpoint): Reimplement as unsigned long.
418 (arm_wince_breakpoint_len): Define.
419 (the_low_target): Adapt to new interface.
421 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
422 load_debug_registers. Add get_thread_context, set_thread_context,
423 thread_added and store_inferior_register. Rename
424 fetch_inferior_registers to fetch_inferior_register.
425 (regptr): Remove declaration.
427 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
429 * linux-low.c (linux_detach): Change return type to int. Return 0.
430 * spu-low.c (spu_detach): Likewise.
432 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
434 * target.h (target_ops): Change return type of detach to int.
436 (join_inferior): New.
437 * server.c (main): Don't skip detach support on mingw32.
438 If the inferior doesn't support detaching return error.
439 Call join_inferior instead of using waitpid.
440 * linux-low.c (linux_join): New.
441 (linux_target_op): Add linux_join.
442 * spu-low.c (spu_join): New.
443 (spu_target_ops): Add spu_join.
444 * win32-low.c (win32_detach): Adapt to new interface.
445 Reopen current_process_handle before detaching. Issue a child
446 resume before detaching.
448 (win32_target_op): Add win32_join.
450 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
452 * win32-low.c (win32-attach): Fix return value.
453 * target.h (target_ops): Describe ATTACH return values.
455 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
457 * win32-low.c (GETPROCADDRESS): Define.
458 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
459 (winapi_DebugSetProcessKillOnExit): Likewise.
460 (win32_create_inferior): Force usage of ansi CreateProcessA.
461 (win32_attach): Use GETPROCADDRESS.
462 (win32_detach): Likewise.
464 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
466 * win32-low.c (win32_wait): Don't use WSTOPSIG.
468 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
470 * win32-low.c: Commit leftover changes from 2007-03-29.
472 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
474 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
475 fields short instead of int. Add explicit padding.
476 (i387_cache_to_fsave): Remove unnecessary casts.
477 (i387_fsave_to_cache): Doc fix.
478 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
480 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
482 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
483 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
485 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
487 * configure.srv (arm*-*-mingw32ce*): Move near the other
490 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
492 * configure.ac: Add errno checking.
493 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
494 sys/file.h and malloc.h.
495 (AC_CHECK_DECLS): Add perror.
496 (srv_mingwce): Handle.
497 * configure.srv (i[34567]86-*-cygwin*): Add
498 win32-i386-low.o to srv_tgtobj.
499 (i[34567]86-*-mingw*): Likewise.
500 (arm*-*-mingw32ce*): Add case.
501 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
502 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
503 [__MINGW32CE__] (strerror): New function.
504 [__MINGW32CE__] (errno): Define to GetLastError.
505 [__MINGW32CE__] (COUNTOF): New macro.
506 (remote_open): Remove extra close call.
507 * mem-break.c (delete_breakpoint_at): New function.
508 * mem-break.h (delete_breakpoint_at): Declare.
509 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
510 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
511 [USE_WIN32API] (read, write): Add char* casts.
512 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
513 * server.h: Include wincecompat.h on Windows CE.
514 [HAVE_ERRNO_H]: Check.
515 (perror): Declare if not declared.
516 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
517 (perror_with_name): Remove errno declaration.
518 * wincecompat.h: New.
519 * wincecompat.c: New.
521 * win32-arm-low.c: New.
522 * win32-i386-low.c: New.
523 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
524 (OUTMSG2): Make it safe.
526 (COUNTOF): New macro.
527 (NUM_REGS): Get it from the low target.
528 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
529 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
530 (thread_rec): Let low target handle debug registers.
531 (child_add_thread): Likewise.
532 (child_init_thread_list): Likewise.
533 (continue_one_thread): Likewise.
535 (do_child_fetch_inferior_registers): Move to ...
536 * win32-i386-low.c: ... here, and rename to ...
537 (do_fetch_inferior_registers): ... this.
538 * win32-low.c (child_fetch_inferior_registers):
539 Go through the low target.
540 (do_child_store_inferior_registers): Use regptr.
541 (strwinerror): New function.
542 (win32_create_inferior): Handle Windows CE.
543 Use strwinerror instead of strerror on Windows error
544 codes. Add program to the error output.
545 Don't close the main thread handle on Windows CE.
546 (win32_attach): Use coredll.dll on Windows CE.
547 (win32_kill): Close current process and current
549 (win32_detach): Use coredll.dll on Windows CE.
550 (win32_resume): Let low target handle debug registers, and
552 (handle_exception): Add/Remove initial breakpoint. Avoid
553 non-existant WSTOPSIG on Windows CE.
554 (win32_read_inferior_memory): Cast to remove warning.
555 (win32_arch_string): Go through the low target.
556 (initialize_low): Call set_breakpoint_data with the low
558 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
559 FOP_REGNUM, mappings): Move to ...
560 * win32-i386-low.c: ... here.
561 * win32-low.c (win32_thread_info): Move to ...
562 * win32-low.h: ... here.
563 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
564 win32-arm-low.c and wincecompat.c.
566 (install-only:): Likewise.
567 (gdbserver:): Likewise.
568 (gdbreplay:): Likewise.
569 * config.in: Regenerate.
570 * configure: Regenerate.
572 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
574 * win32-low.c: Rename typedef thread_info to
575 win32_thread_info throughout.
577 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
579 * win32-i386-low.c: Rename to ...
580 * win32-low.c: ... this.
581 * configure.srv: Replace win32-i386-low.o with win32-low.o.
582 * Makefile.in: Likewise.
584 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
586 * remote-utils.c (monitor_output): Constify msg parameter.
587 * server.h (monitor_output): Likewise.
588 * win32-i386-low.c (handle_output_debug_string): New.
589 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
590 handle_output_debug_string.
591 (get_child_debug_event): Likewise.
593 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
595 * server.c (main): Correct strtoul check.
597 2007-03-27 Jon Ringle <jon@ringle.org>
599 * linux-low.c: Check __ARCH_HAS_MMU__ also.
601 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
603 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
605 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
607 * terminal.h: Check HAVE_SGTTY_H.
609 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
611 * remote-utils.c (remote_open): Print out the assigned port number.
613 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
615 * remote-utils.c (monitor_output): New function.
616 * server.c (debug_threads): Define here.
617 (monitor_show_help): New function.
618 (handle_query): Handle qRcmd.
619 (main): Do not handle 'd' packet.
620 * server.h (debug_threads, remote_debug, monitor_output): Declare.
621 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
624 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
626 * Makefile.in (EXEEXT): New.
627 (clean): Use $(EXEEXT).
629 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
631 * target.h (target_ops): Rename send_signal to request_interrupt,
632 and remove enum target_signal parameter.
633 * linux-low.c (linux_request_interrupt): Rename from
634 linux_send_signal, and always send SIGINT.
635 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
636 and always send SIGINT.
637 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
639 (input_interrupt): Likewise.
641 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
643 * server.c (get_features_xml): Check if target implemented
645 * win32-i386-low.c (win32_arch_string): New.
646 (win32_target_ops): Add win32_arch_string as arch_string member.
648 2007-02-22 Markus Deuling <deuling@de.ibm.com>
650 * spu-low.c (spu_arch_string): New.
651 (spu_target_ops): Add spu_arch_string.
653 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
655 * remote-utils.c: Remove HAVE_TERMINAL_H check.
656 * configure.ac: Do not check for terminal.h.
657 * configure, config.in: Regenerated.
659 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
661 * Makefile.in (OBS): Add $(XML_BUILTIN).
662 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
664 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
665 (arm-with-iwmmxt.c): New.
666 * config.in, configure: Regenerate.
667 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
668 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
669 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
670 (arm*-*-linux*): Add iWMMXt and regset support.
671 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
672 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
673 (arm_store_wmmxregset, target_regsets): New.
674 * server.c (get_features_xml): Take annex argument. Check builtin
676 (handle_query): Handle multiple annexes.
678 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
680 * remote-utils.c [USE_WIN32API] (read, write): Define.
681 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
684 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
686 * linux-i386-low.c (the_low_target): Set arch_string.
687 * linux-x86-64-low.c (the_low_target): Likewise.
688 * linux-low.c (linux_arch_string): New.
689 (linux_target_ops): Add it.
690 * linux-low.h (struct linux_target_ops): Add arch_string.
691 * server.c (write_qxfer_response): Use const void * for DATA.
692 (get_features_xml): New.
693 (handle_query): Handle qXfer:features:read. Report it for qSupported.
694 * target.h (struct target_ops): Add arch_string method.
696 2007-01-03 Denis Pilat <denis.pilat@st.com>
697 Daniel Jacobowitz <dan@codesourcery.com>
699 * linux-low.c (linux_kill): Handle being called with no threads.
700 * win32-i386-low.c (win32_kill): Likewise.
701 (get_child_debug_event): Clear current_process_handle.
703 2006-12-30 Denis PILAT <denis.pilat@st.com>
704 Daniel Jacobowitz <dan@codesourcery.com>
706 * remote-utils.c (remote_open): Check the type of specified
707 serial port devices before opening them.
708 * server.c (main): Kill the inferior if an error occurs during
709 the first remote_open.
711 2006-12-05 Markus Deuling <deuling@de.ibm.com>
713 * README: Update supported targets.
715 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
717 * Makefile.in (clean): Remove reg-mips64.c.
718 (reg-mips64.c, reg-mips64.o): New rules.
719 * configure.srv: Handle mips64. Include regset support for mips.
720 * linux-mips-low.c (union mips_register): New.
721 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
722 (mips_breakpoint, mips_breakpoint_at): Use int.
723 (mips_collect_register, mips_supply_register)
724 (mips_collect_register_32bit, mips_supply_register_32bit)
725 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
726 (mips_store_fpregset, target_regsets): New.
727 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
729 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
731 * configure.srv: Add target "spu*-*-*".
732 * Makefile.in (clean): Remove reg-spu.c.
733 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
734 * spu-low.c: New file.
736 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
738 * configure.ac: Correct td_thr_tls_get_addr test.
739 * configure: Regenerated.
741 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
743 * linux-low.c (linux_wait_for_event): Reformat. Use the
745 * remote-utils.c (decode_address_to_semicolon): New.
746 * server.c (pass_signals, handle_general_set): New.
747 (handle_query): Mention QPassSignals for qSupported.
748 (main): Call handle_general_set.
749 * server.h (pass_signals, decode_address_to_semicolon): New.
751 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
753 * server.c (handle_query): Correct error handling for read_auxv.
755 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
757 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
758 and srv_linux_thread_db to yes.
759 * linux-s390-low.c (s390_fill_gregset): New function.
760 (target_regsets): Define data structure.
762 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
764 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
765 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
766 * config.in, configure: Regenerated.
767 * inferiors.c (gdb_id_to_thread): New function.
768 (gdb_id_to_thread_id): Use it.
769 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
770 * linux-low.h (struct process_info): Add th member.
771 (thread_db_get_tls_address): New prototype.
772 * remote-utils.c (decode_address): Make non-static.
773 * server.c (handle_query): Handle qGetTLSAddr.
774 * server.h (gdb_id_to_thread, decode_address): New prototypes.
775 * target.h (struct target_ops): Add get_tls_address.
776 * thread-db.c (maybe_attach_thread): Save the thread handle.
777 (thread_db_get_tls_address): New.
779 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
781 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
782 (linux_resume_one_process): Take a siginfo_t *. Update all
783 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
784 (struct pending_signals): Add a siginfo_t.
785 (linux_wait_for_process): Always set last_status.
786 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
787 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
788 * linux-low.h (struct process_info): Add last_status.
790 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
792 * remote-utils.c (try_rle): New function.
793 (putpkt_binary): Use it.
795 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
797 * Makefile.in (clean): Clean reg-x86-64-linux.c.
798 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
799 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
800 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
801 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
804 2006-08-08 Richard Sandiford <richard@codesourcery.com>
806 * server.c (terminal_fd): New variable.
807 (old_foreground_pgrp): Likewise.
808 (restore_old_foreground_pgrp): New function.
809 (start_inferior): Record the terminal file descriptor in terminal_fd
810 and its original foreground group in old_foreground_pgrp. Register
811 restore_old_foreground_pgrp with atexit().
813 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
815 * server.c (handle_query): Correct qPart to qXfer.
817 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
819 * configure.ac: Check for more headers which are missing on
820 Windows. Automatically supply -lwsock32 and USE_WIN32API.
821 * configure.srv: Add Cygwin and mingw32.
822 * remote-utils.c: Don't include headers unconditionally which
823 are missing on mingw32. Include <winsock.h> for mingw32.
824 (remote_open): Adjust for mingw32 support. Flush
825 standard error after writing to it.
826 (remote_close, putpkt_binary, input_interrupt, block_async_io)
827 (unblock_async_io, enable_async_io, disable_async_io)
828 (readchar, getpkt): Update for Winsock support.
829 (prepare_resume_reply): Expect a protocol signal number.
830 * server.c: Disable <sys/wait.h> on mingw32.
831 (start_inferior): Adjust for mingw32 support. Flush
832 standard error after writing to it.
833 (attach_inferior): Likewise. Use protocol signal
835 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
837 * win32-i386-low.c: New file.
838 * Makefile.in (XM_CLIBS): Set.
839 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
840 (win32-i386-low.o): New dependency rule.
841 * linux-low.c (linux_wait): Use target signal numbers.
842 * target.h (struct target_ops): Doc fix.
843 * server.h (target_signal_to_name): New prototype.
844 * gdbreplay.c: Don't include headers unconditionally which
845 are missing on mingw32. Include <winsock.h> for mingw32.
846 (remote_close, remote_open): Adjust for Winsock support.
847 * configure, config.in: Regenerated.
849 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
851 * server.c (decode_xfer_read, write_qxfer_response): New.
852 (handle_query): Take a packet length argument. Handle
853 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
854 the qSupported response.
855 (main): Update call to handle_query.
857 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
859 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
860 (putpkt_binary): Renamed from putpkt and adjusted for binary
862 (putpkt): New wrapper for putpkt_binary.
863 (readchar): Don't mask off the high bit.
864 (decode_X_packet): New function.
865 * server.c (main): Call putpkt_binary if a handler sets the packet
866 length. Save the length of the incoming packet. Handle 'X'.
867 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
869 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
871 * server.c (handle_query): Handle qSupported.
873 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
875 * remote-utils.c (all_symbols_looked_up): New variable.
876 (look_up_one_symbol): Check it.
877 * server.h (look_up_one_symbol): New declaration.
878 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
880 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
882 * Makefile.in (linux-arm-low.o): Update dependencies.
883 * linux-arm-low.c: Include "gdb_proc_service.h".
884 (PTRACE_GET_THREAD_AREA): Define.
885 (ps_get_thread_area): New function.
887 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
889 * configure.srv (m68k*-*-uclinux*): New target.
890 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
891 (linux_resume_one_process): Remove extraneous cast.
892 (linux_read_offsets): New.
893 (linux_target_op): Add linux_read_offsets on mmuless systems.
894 * server.c (handle_query): Add qOffsets logic.
895 * target.h (struct target_ops): Add read_offsets.
897 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
899 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
900 (PTRACE_GET_THREAD_AREA): Define.
901 (ps_get_thread_area): New function.
902 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
903 (linux-x86-64-low.o): Update.
905 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
907 * configure.ac: Remove checks for prfpregset_t.
908 * gdb_proc_service.h: New file.
909 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
910 new "gdb_proc_service.h".
911 * proc-service.c: Likewise.
912 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
913 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
914 * Makefile.in (gdb_proc_service_h): Updated.
915 * configure, config.in: Regenerated.
917 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
919 * remote-utils.c (prepare_resume_reply): Move declaration
920 of gdb_id_from_wait to the top of the block.
922 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
924 * linux-low.c (regsets_store_inferior_registers): Read the regset
925 from the target before filling it.
927 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
929 * server.c (attach_inferior): Return SIGTRAP for a successful
932 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
934 * Makefile.in (OBS): Add version.o.
935 (STAGESTUFF): Delete.
936 (version.o): Add dependencies.
937 (version.c): Replace rule.
938 (clean): Remove version.c.
939 * server.c (gdbserver_version): New.
940 (gdbserver_usage): Use printf.
941 (main): Handle --version and --help.
942 * server.h (version, host_name): Add declarations.
944 2005-12-23 Eli Zaretskii <eliz@gnu.org>
956 * linux-x86-64-low.c:
968 * linux-crisv32-low.c:
980 * gdbserver.1: Add (C) after Copyright. Update the FSF
983 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
985 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
986 (arm_breakpoint_at): Recognize both breakpoints.
987 (the_low_target): Use the correct breakpoint instruction.
989 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
991 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
992 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
993 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
994 (the_low_target): Update.
996 2005-10-25 Andreas Schwab <schwab@suse.de>
998 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1000 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1001 (ia64_num_regs): Reduce to 462.
1003 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1005 * acinclude.m4: Correct quoting.
1006 * aclocal.m4: Regenerated.
1008 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1009 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1010 (thread_db_init): Call thread_db_err_str.
1011 * configure.ac: Check for TD_VERSION.
1012 * config.in, configure: Regenerated.
1014 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1016 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1018 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1020 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1021 is not available. Define HAVE_PTRACE_GETREGS if it is.
1022 * config.in, configure: Regenerated.
1023 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1024 * linux-i386-low.c, linux-m68k-low.c: Update to use
1025 HAVE_PTRACE_GETREGS.
1026 * linux-low.c (regsets_fetch_inferior_registers)
1027 (regsets_store_inferior_registers): Only return 0 if we processed
1029 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1030 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1032 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1034 * inferiors.c (struct thread_info): Add gdb_id.
1035 (add_thread): Add gdb_id argument.
1036 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1037 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1038 calls to add_thread.
1039 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1040 * server.c (handle_query): Use thread_to_gdb_id.
1041 (handle_v_cont, main): Use gdb_id_to_thread_id.
1042 * server.h (add_thread): Update prototype.
1043 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1046 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1048 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1049 left-padded registers.
1050 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1051 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1053 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1055 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1056 * configure: Regenerate.
1057 * config.in: Regenerate.
1058 * server.h (NEED_DECLARATION_STRERROR):
1059 Replace with !HAVE_DECL_STRERROR.
1061 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1063 * linux-low.c (linux_wait, linux_send_signal): Don't test
1064 an unsigned long variable for > 0 if it could be MAX_ULONG.
1065 * server.c (myresume): Likewise.
1066 * target.c (set_desired_inferior): Likewise.
1068 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1070 * configure.ac: Simplify and improve check for socklen_t.
1071 * configure, config.in: Regenerate.
1073 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1075 * acconfig.h: Remove.
1076 * configure.ac: Add a test for socklen_t. Use three-argument
1077 AC_DEFINE throughout.
1078 * config.in: Regenerated using autoheader 2.59.
1079 * configure: Regenerated.
1081 * gdbreplay.c (socklen_t): Provide a default.
1082 (remote_open): Use socklen_t.
1083 * remote-utils.c (socklen_t): Provide a default.
1084 (remote_open): Use socklen_t.
1085 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1088 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1090 * linux-low.c (linux_read_memory, linux_write_memory)
1091 (linux_read_auxv): Likewise.
1092 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1093 (check_mem_write): Likewise.
1094 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1096 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1097 (registers_from_string, register_data): Likewise.
1098 * server.c (handle_query, main): Likewise.
1099 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1100 (decode_M_packet): Likewise.
1101 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1102 * target.h (struct target_ops): Update read_memory, write_memory,
1104 (read_inferior_memory, write_inferior_memory): Update.
1105 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1107 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1108 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1109 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1110 linux-s390-low.c, linux-sh-low.c: Update for changes in
1111 read_inferior_memory and the_low_target->breakpoint.
1113 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1115 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1116 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1117 * configure.srv: Add powerpc64-*-linux*.
1118 * linux-ppc64-low.c: New file.
1120 2005-05-23 Orjan Friberg <orjanf@axis.com>
1122 * linux-cris-low.c: New file with support for CRIS.
1123 * linux-crisv32-low.c: Ditto for CRISv32.
1124 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1125 (clean): Add reg-cris.c and reg-crisv32.c.
1126 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1127 reg-crisv32.o, and reg-crisv32.c to make rules.
1128 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1131 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1133 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1134 of sizeof (PTRACE_XFER_TYPE).
1135 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1137 2005-05-12 Orjan Friberg <orjanf@axis.com>
1139 * target.h (struct target_ops): Add insert_watchpoint,
1140 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1141 pointers for hardware watchpoint support.
1142 * linux-low.h (struct linux_target_ops): Ditto.
1143 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1144 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1145 to linux_target_ops.
1146 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1148 * server.c (main): Recognize 'Z' and 'z' packets.
1150 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1152 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1153 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1154 (the_low_target): Add new members.
1156 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1158 * proc-service.c (ps_lgetregs): Search all_processes instead of
1161 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1163 * server.c (start_inferior): Change return type to int.
1164 (attach_inferior): Change sigptr to int *.
1165 (handle_v_cont, handle_v_requests): Change signal to int *.
1166 (main): Change signal to int.
1168 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1170 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1171 * configure.srv: Add m32r*-*-linux*.
1172 * linux-m32r-low.c: New file.
1174 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1176 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1178 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1180 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1181 Take unsigned long arguments for PIDs.
1182 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1183 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1184 (wait_for_sigstop, linux_resume_one_process)
1185 (regsets_fetch_inferior_registers, linux_send_signal)
1186 (linux_read_auxv): Likewise. Update the types of variables holding
1187 PIDs. Update format string specifiers.
1188 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1189 * remote-utils.c (prepare_resume_reply): Likewise.
1190 * server.c (cont_thread, general_thread, step_thread)
1191 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1193 (handle_query): Update format specifiers.
1194 (handle_v_cont, main): Use strtoul for thread IDs.
1195 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1196 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1197 (general_thread, step_thread, thread_from_wait)
1198 (old_thread_from_wait): Update.
1199 * target.h (struct thread_resume): Use unsigned long for THREAD.
1200 (struct target_ops): Use unsigned long for arguments to attach and
1203 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1205 * acinclude.m4: Include bfd/bfd.m4 directly.
1206 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1207 <agriffis@toolchain.org>.
1208 * aclocal.m4, configure: Regenerated.
1210 2005-01-07 Andrew Cagney <cagney@gnu.org>
1212 * configure.ac: Rename configure.in, require autoconf 2.59.
1213 * configure: Re-generate.
1215 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1217 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1219 * aclocal.m4: Regenerated.
1220 * configure: Regenerated.
1222 2004-11-21 Andreas Schwab <schwab@suse.de>
1224 * linux-m68k-low.c (m68k_num_gregs): Define.
1225 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1226 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1227 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1228 (m68k_breakpoint_at): New. Add to the_low_target.
1230 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1231 srv_linux_thread_db to yes.
1233 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1235 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1236 (ARCH_SET_FS): Likewise.
1237 (ARCH_GET_FS): Likewise.
1238 (ARCH_GET_GS): Likewise.
1240 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1242 * linux-i386-low.c (ps_get_thread_area): New.
1243 * linux-x86-64-low.c (ps_get_thread_area): New.
1244 * linux-low.c: Include <sys/syscall.h>.
1245 (linux_kill_one_process): Don't kill the first thread here.
1246 (linux_kill): Kill the first thread here.
1247 (kill_lwp): New function.
1248 (send_sigstop, linux_send_signal): Use it.
1249 * proc-service.c: Clean up #ifdefs.
1250 (fpregset_info): Delete.
1251 (ps_lgetregs): Update and enable implementation.
1252 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1254 * remote-utils.c (struct sym_cache, symbol_cache): New.
1255 (input_interrupt): Print a clearer message.
1256 (async_io_enabled): New variable.
1257 (enable_async_io, disable_async_io): Use it. Update comments.
1258 (look_up_one_symbol): Use the symbol cache.
1259 * thread-db.c (thread_db_look_up_symbols): New function.
1260 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1262 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1264 * configure.in: Test for -rdynamic.
1265 * configure: Regenerated.
1266 * Makefile (INTERNAL_LDFLAGS): New.
1267 (gdbserver, gdbreplay): Use it.
1269 2004-09-02 Andrew Cagney <cagney@gnu.org>
1271 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1273 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1275 * linux-low.c (linux_wait): Clear all_processes list also.
1277 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1279 * linux-low.c: Include <errno.h>. Remove extern declaration of
1282 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1284 * gdbreplay.c, server.h, utils.c: Update copyright years.
1286 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1288 * server.c (main): Print child status or termination signal from
1289 variable 'signal', not 'sig'.
1291 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1293 * linux-low.c (linux_read_memory): Change return type to
1294 int. Check for and return error from ptrace().
1295 * target.c (read_inferior_memory): Change return type to int. Pass
1296 back return status from the_target->read_memory().
1297 * target.h (struct target_ops): Adapt *read_memory() prototype.
1299 (read_inferior_memory): Adapt prototype.
1300 * server.c (main): Return an error packet if
1301 read_inferior_memory() returns an error.
1303 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1305 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1306 Unify with other clean targets.
1308 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1310 * server.c (handle_v_cont): Call set_desired_inferior.
1312 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1314 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1316 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1318 * linux-low.c (linux_wait): Unblock async I/O.
1319 (linux_resume): Block and enable async I/O.
1320 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1321 * server.h (block_async_io, unblock_async_io): Add prototypes.
1323 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1325 * remote-utils.c (remote_open): Print a status notice after
1327 * server.c (attach_inferior): Print a status notice after
1330 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1332 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1334 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1336 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1338 * server.c, target.h: Update copyright years.
1340 2004-02-25 Roland McGrath <roland@redhat.com>
1342 * target.h (struct target_ops): New member `read_auxv'.
1343 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1344 * linux-low.c (linux_read_auxv): New function.
1345 (linux_target_ops): Initialize `read_auxv' member to that.
1347 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1349 Committed by Jim Blandy <jimb@redhat.com>.
1351 * linux-s390-low.c (s390_num_regs): Update.
1352 (s390_regmap): Remove control registers. Use __s390x__ predefine
1353 instead of GPR_SIZE to distiguish s390 and s390x targets.
1355 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1357 * linux-low.c: Update copyright year.
1358 (check_removed_breakpoint): Clear pending_is_breakpoint.
1359 (linux_set_resume_request, linux_queue_one_thread)
1360 (resume_status_pending_p): New functions.
1361 (linux_continue_one_thread): Use process->resume.
1362 (linux_resume): Only resume threads if there are no pending events.
1363 * linux-low.h (struct process_info): Add resume request
1366 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1368 * regcache.c (new_register_cache): Clear the allocated register
1369 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1371 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1373 * linux-low.c (linux_resume): Take a struct thread_resume *
1375 (linux_wait): Update call.
1376 (resume_ptr): New static variable.
1377 (linux_continue_one_thread): Renamed from
1378 linux_continue_one_process. Use resume_ptr.
1379 (linux_resume): Use linux_continue_one_thread.
1380 * server.c (handle_v_cont, handle_v_requests): New functions.
1381 (myresume): New function.
1382 (main): Handle 'v' case.
1383 * target.h (struct thread_resume): New type.
1384 (struct target_ops): Change argument of "resume" to struct
1386 (myresume): Delete macro.
1388 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1390 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1391 (uninstall): Support DESTDIR.
1393 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1395 * configure.srv: Add xscale*linux copy of arm*linux entry.
1397 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1399 * linux-arm-low.c (arm_reinsert_addr): New function.
1400 (the_low_target): Add arm_reinsert_addr.
1402 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1404 * mem-break.c: Remove whitespace at end of file.
1406 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1408 * configure.in: Check whether we need to prototype strerror.
1409 * server.h: Optionally prototype strerror.
1410 * gdbreplay.c (perror_with_name): Use strerror.
1411 * linux-low.c (linux_attach_lwp): Use strerror.
1412 * utils.c (perror_with_name): Use strerror.
1413 * config.in, configure: Regenerated.
1415 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1417 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1418 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1420 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1422 * Makefile.in (SFILES): Update.
1423 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1424 low-sun3.c: Remove files.
1426 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1428 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1429 (linux_detach_one_process, linux_detach): New functions.
1430 (linux_target_ops): Add linux_detach.
1431 * server.c (main): Handle 'D' packet.
1432 * target.h (struct target_ops): Add "detach" member.
1433 (detach_inferior): Define.
1435 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1437 From Kelley Cook <kelleycook@wideopenwest.com>:
1438 * configure.srv: Accept i[34567]86 variants.
1440 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1442 * linux-low.c (linux_wait_for_event): Correct comment typos.
1443 (linux_resume_one_process): Call check_removed_breakpoint.
1444 (linux_send_signal): New function.
1445 (linux_target_ops): Add linux_send_signal.
1446 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1448 * target.h (struct target_ops): Add send_signal.
1450 2003-05-29 Jim Blandy <jimb@redhat.com>
1452 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1453 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1454 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1455 away part of the register's value.
1457 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1459 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1460 (linux_wait_for_event, linux_init_signals): Likewise.
1462 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1464 * configure.in: Check for stdlib.h.
1465 * configure: Regenerated.
1466 * config.in: Regenerated.
1468 2003-01-04 Andreas Schwab <schwab@suse.de>
1470 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1472 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1474 * Makefile.in: Remove obsolete code.
1476 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1478 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1479 defined(PT_FPR0_HI).
1481 2002-11-17 Stuart Hughes <seh@zee2.com>
1483 * linux-arm-low.c (arm_num_regs): Increase.
1484 (arm_regmap): Include status register.
1486 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1488 * linux-low.c (register_addr): Remove incorrect -1 check.
1490 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1492 * linux-low.c (linux_create_inferior): Call setpgid. Return
1494 (unstopped_p, linux_signal_pid): Remove.
1495 (linux_target_ops): Remove linux_signal_pid.
1496 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1497 global instead of target method.
1498 * target.h (struct target_ops): Remove signal_pid. Update comment
1499 for create_inferior.
1500 * server.c (signal_pid): New variable.
1501 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1502 gdbserver. Set the child to be the foreground process group.
1503 (attach_inferior): Set signal_pid.
1505 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1507 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1509 2002-08-20 Jim Blandy <jimb@redhat.com>
1511 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1514 2002-08-01 Andrew Cagney <cagney@redhat.com>
1516 * Makefile.in: Make chill references obsolete.
1518 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1520 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1521 * configure: Regenerate.
1522 * config.in: Regenerate.
1524 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1526 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1527 (perror_with_name, remote_close, remote_open, expect, play): Static.
1529 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1531 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1532 byte offsets instead of an array of indexes.
1533 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1535 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1537 * regcache.c: Add comment.
1539 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1541 * thread-db.c: New file.
1542 * proc-service.c: New file.
1543 * acinclude.m4: New file.
1544 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1545 proc-service.o, and thread-db.o.
1546 (linux-low.o): Add USE_THREAD_DB.
1547 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1548 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1549 * aclocal.m4: Regenerated.
1550 * config.in: Regenerated.
1551 * configure: Regenerated.
1552 * configure.in: Check for proc_service.h, sys/procfs.h,
1553 thread_db.h, and linux/elf.h headrs.
1554 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1555 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1556 Check for -lthread_db and thread support.
1557 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1558 PowerPC, and SuperH.
1559 * i387-fp.c: Constify arguments.
1560 * i387-fp.h: Likewise.
1561 * inferiors.c: (struct thread_info): Renamed from
1562 `struct inferior_info'. Remove PID member. Use generic inferior
1563 list header. All uses updated.
1564 (inferiors, signal_pid): Removed.
1565 (all_threads): New variable.
1566 (get_thread): Define.
1567 (add_inferior_to_list): New function.
1568 (for_each_inferior): New function.
1569 (change_inferior_id): New function.
1570 (add_inferior): Removed.
1571 (remove_inferior): New function.
1572 (add_thread): New function.
1573 (free_one_thread): New function.
1574 (remove_thread): New function.
1575 (clear_inferiors): Use for_each_inferior and free_one_thread.
1576 (find_inferior): New function.
1577 (find_inferior_id): New function.
1578 (inferior_target_data): Update argument type.
1579 (set_inferior_target_data): Likewise.
1580 (inferior_regcache_data): Likewise.
1581 (set_inferior_regcache_data): Likewise.
1582 * linux-low.c (linux_bp_reinsert): Remove.
1583 (all_processes, stopping_threads, using_thrads)
1584 (struct pending_signals, debug_threads, pid_of): New.
1585 (inferior_pid): Replace with macro.
1586 (struct inferior_linux_data): Remove.
1587 (get_stop_pc, add_process): New functions.
1588 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1589 Use add_process and add_thread.
1590 (linux_attach_lwp): New function, based on old linux_attach. Use
1591 add_process and add_thread. Set stop_expected for new threads.
1592 (linux_attach): New function.
1593 (linux_kill_one_process): New function.
1594 (linux_kill): Kill all LWPs.
1595 (linux_thread_alive): Use find_inferior_id.
1596 (check_removed_breakpoints, status_pending_p): New functions.
1597 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1598 Update. Use WNOHANG. Wait for cloned processes also. Update process
1599 struct for the found process.
1600 (linux_wait_for_event): New function.
1601 (linux_wait): Use it. Support LWPs.
1602 (send_sigstop, wait_for_sigstop, stop_all_processes)
1603 (linux_resume_one_process, linux_continue_one_process): New functions.
1604 (linux_resume): Support LWPs.
1605 (REGISTER_RAW_SIZE): Remove.
1606 (fetch_register): Use register_size instead. Call supply_register.
1607 (usr_store_inferior_registers): Likewise. Call collect_register.
1609 (regsets_fetch_inferior_registers): Improve error message.
1610 (regsets_store_inferior_registers): Add debugging.
1611 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1612 (unstopped_p, linux_signal_pid): New functions.
1613 (linux_target_ops): Add linux_signal_pid.
1614 (linux_init_signals): New function.
1615 (initialize_low): Call it. Initialize using_threads.
1616 * regcache.c (inferior_regcache_data): Add valid
1618 (get_regcache): Fetch registers lazily. Add fetch argument
1619 and update all callers.
1620 (regcache_invalidate_one, regcache_invalidate): New
1622 (new_register_cache): Renamed from create_register_cache.
1623 Return the new regcache.
1624 (free_register_cache): Change argument to a void *.
1625 (registers_to_string, registers_from_string): Call get_regcache
1626 with fetch flag set.
1627 (register_data): Make static. Pass fetch flag to get_regcache.
1628 (supply_register): Call get_regcache with fetch flag clear.
1629 (collect_register): Call get_regcache with fetch flag set.
1630 (collect_register_as_string): New function.
1631 * regcache.h: Update.
1632 * remote-utils.c (putpkt): Flush after debug output and use
1634 Handle input interrupts while waiting for an ACK.
1635 (input_interrupt): Use signal_pid method.
1636 (getpkt): Flush after debug output and use stderr.
1637 (outreg): Use collect_register_as_string.
1638 (new_thread_notify, dead_thread_notify): New functions.
1639 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1641 (look_up_one_symbol): Flush after debug output.
1642 * server.c (step_thread, server_waiting): New variables.
1643 (start_inferior): Don't use signal_pid. Update call to mywait.
1644 (attach_inferior): Update call to mywait.
1645 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1646 (main): Don't fetch/store registers explicitly. Use
1647 set_desired_inferior. Support proposed ``Hs'' packet. Update
1650 (struct inferior_list, struct_inferior_list_entry): New.
1651 * target.c (set_desired_inferior): New.
1652 (write_inferior_memory): Constify.
1653 (mywait): New function.
1655 (struct target_ops): New signal_pid method.
1656 (mywait): Removed macro, added prototype.
1658 * linux-low.h (regset_func): Removed.
1659 (regset_fill_func, regset_store_func): New.
1660 (enum regset_type): New.
1661 (struct regset_info): Add type field. Use new operation types.
1662 (struct linux_target_ops): stop_pc renamed to get_pc.
1663 Add decr_pc_after_break and breakpoint_at.
1664 (get_process, get_thread_proess, get_process_thread)
1665 (strut process_info, all_processes, linux_attach_lwp)
1666 (thread_db_init): New.
1668 * linux-arm-low.c (arm_get_pc, arm_set_pc,
1669 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1670 (the_low_target): Add new members.
1671 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1672 (i386_store_fpxregset): Constify.
1673 (target_regsets): Add new kind identifier.
1674 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
1675 (i386_set_pc): Add debugging.
1676 (i386_breakpoint_at): New function.
1677 (the_low_target): Add new members.
1678 * linux-mips-low.c (mips_get_pc, mips_set_pc)
1679 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1680 (mips_breakpoint_at): New.
1681 (the_low_target): Add new members.
1682 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1683 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1684 (the_low_target): Add new members.
1685 * linux-sh-low.c (sh_get_pc, sh_set_pc)
1686 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1687 (the_low_target): Add new members.
1688 * linux-x86-64-low.c (target_regsets): Add new kind
1691 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
1693 From Martin Pool <mbp@samba.org>:
1694 * server.c (gdbserver_usage): New function.
1697 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
1699 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1702 2002-05-04 Andrew Cagney <ac131313@redhat.com>
1704 * Makefile.in: Remove obsolete code.
1706 2002-04-24 Michal Ludvig <mludvig@suse.cz>
1708 * linux-low.c (regsets_fetch_inferior_registers),
1709 (regsets_store_inferior_registers): Removed cast to int from
1711 * regcache.h: Added declaration of struct inferior_info.
1713 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1715 * inferiors.c (struct inferior_info): Add regcache_data.
1716 (add_inferior): Call create_register_cache.
1717 (clear_inferiors): Call free_register_cache.
1718 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1719 * regcache.c (struct inferior_regcache_data): New.
1720 (registers): Remove.
1721 (get_regcache): New function.
1722 (create_register_cache, free_register_cache): New functions.
1723 (set_register_cache): Don't initialize the register cache here.
1724 (registers_to_string, registers_from_string, register_data): Call
1726 * regcache.h: Add prototypes.
1727 * server.h: Likewise.
1729 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
1731 * mem-break.c: New file.
1732 * mem-break.h: New file.
1733 * Makefile.in: Add mem-break.o rule; update server.h
1735 * inferiors.c (struct inferior_info): Add target_data
1737 (clear_inferiors): Free target_data member if set.
1738 (inferior_target_data, set_inferior_target_data): New functions.
1739 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1740 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1741 * linux-low.c (linux_bp_reinsert): New variable.
1742 (struct inferior_linux_data): New.
1743 (linux_create_inferior): Use set_inferior_target_data.
1744 (linux_attach): Likewise. Call add_inferior.
1745 (linux_wait_for_one_inferior): New function.
1746 (linux_wait): Call it.
1747 (linux_write_memory): Add const.
1748 (initialize_low): Call set_breakpoint_data.
1749 * linux-low.h (struct linux_target_ops): Add breakpoint
1751 * server.c (attach_inferior): Remove extra add_inferior
1753 * server.h: Include mem-break.h. Update inferior.c
1755 * target.c (read_inferior_memory)
1756 (write_inferior_memory): New functions.
1757 * target.h (read_inferior_memory)
1758 (write_inferior_memory): Change macros to prototypes.
1759 (struct target_ops): Update comments. Add const to write_memory
1762 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
1764 * linux-low.c (usr_store_inferior_registers): Support
1765 registers which are allowed to fail to store.
1766 * linux-low.h (linux_target_ops): Likewise.
1767 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1768 (ppc_cannot_store_register): FPSCR may not be storable.
1770 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1772 * server.h: Include <string.h> if HAVE_STRING_H.
1773 * ChangeLog: Correct paths in last ChangeLog entry.
1775 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1777 * linux-low.h: Remove obsolete prototypes.
1778 (struct linux_target_ops): New.
1779 (extern the_low_target): New.
1780 * linux-low.c (num_regs, regmap): Remove declarations.
1781 (register_addr): Use the_low_target explicitly.
1782 (fetch_register): Likewise.
1783 (usr_fetch_inferior_registers): Likewise.
1784 (usr_store_inferior_registers): Likewise.
1785 * linux-arm-low.c (num_regs): Remove.
1786 (arm_num_regs): Define.
1787 (arm_regmap): Renamed from regmap, made static.
1788 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1790 (arm_cannot_store_register): Renamed from cannot_store_register,
1792 (the_low_target): New.
1793 * linux-i386-low.c (num_regs): Remove.
1794 (i386_num_regs): Define.
1795 (i386_regmap): Renamed from regmap, made static.
1796 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1798 (i386_cannot_store_register): Renamed from cannot_store_register,
1800 (the_low_target): New.
1801 * linux-ia64-low.c (num_regs): Remove.
1802 (ia64_num_regs): Define.
1803 (ia64_regmap): Renamed from regmap, made static.
1804 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1806 (ia64_cannot_store_register): Renamed from cannot_store_register,
1808 (the_low_target): New.
1809 * linux-m68k-low.c (num_regs): Remove.
1810 (m68k_num_regs): Define.
1811 (m68k_regmap): Renamed from regmap, made static.
1812 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1814 (m68k_cannot_store_register): Renamed from cannot_store_register,
1816 (the_low_target): New.
1817 * linux-mips-low.c (num_regs): Remove.
1818 (mips_num_regs): Define.
1819 (mips_regmap): Renamed from regmap, made static.
1820 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1822 (mips_cannot_store_register): Renamed from cannot_store_register,
1824 (the_low_target): New.
1825 * linux-ppc-low.c (num_regs): Remove.
1826 (ppc_num_regs): Define.
1827 (ppc_regmap): Renamed from regmap, made static.
1828 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1830 (ppc_cannot_store_register): Renamed from cannot_store_register,
1832 (the_low_target): New.
1833 * linux-s390-low.c (num_regs): Remove.
1834 (s390_num_regs): Define.
1835 (s390_regmap): Renamed from regmap, made static.
1836 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1838 (s390_cannot_store_register): Renamed from cannot_store_register,
1840 (the_low_target): New.
1841 * linux-sh-low.c (num_regs): Remove.
1842 (sh_num_regs): Define.
1843 (sh_regmap): Renamed from regmap, made static.
1844 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1846 (sh_cannot_store_register): Renamed from cannot_store_register,
1848 (the_low_target): New.
1849 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1850 (the_low_target): New.
1852 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1854 * Makefile.in: Add stamp-h target.
1855 * configure.in: Create stamp-h.
1856 * configure: Regenerated.
1858 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1860 * inferiors.c: New file.
1861 * target.c: New file.
1862 * target.h: New file.
1863 * Makefile.in: Add target.o and inferiors.o. Update
1865 * linux-low.c (inferior_pid): New static variable,
1866 moved from server.c.
1867 (linux_create_inferior): Renamed from create_inferior.
1868 Call add_inferior. Return 0 on success instead of a PID.
1869 (linux_attach): Renamed from myattach.
1870 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1871 (linux_thread_alive): Renamed from mythread_alive.
1872 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1874 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1875 (regsets_store_inferior_registers): Correct error message.
1876 Add missing ``return 0''.
1877 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1878 (linux_store_registers): Renamed from store_inferior_registers.
1879 (linux_read_memory): Renamed from read_inferior_memory.
1880 (linux_write_memory): Renamed from write_inferior_memory.
1881 (linux_target_ops): New structure.
1882 (initialize_low): Call set_target_ops ().
1883 * remote-utils.c (unhexify): New function.
1884 (hexify): New function.
1885 (input_interrupt): Send signals to ``signal_pid''.
1886 * server.c (inferior_pid): Remove.
1887 (start_inferior): Update create_inferior call.
1888 (attach_inferior): Call add_inferior.
1889 (handle_query): New function.
1890 (main): Call handle_query for `q' packets.
1891 * server.h: Include "target.h". Remove obsolete prototypes.
1892 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1894 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
1896 * Makefile.in: Add WARN_CFLAGS. Update configury
1898 * configure.in: Check for <string.h>
1899 * configure: Regenerate.
1900 * config.in: Regenerate.
1901 * gdbreplay.c: Include needed system headers.
1902 (remote_open): Remove strchr prototype.
1903 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1904 * regcache.c (supply_register): Change buf argument to const void *.
1905 (supply_register_by_name): Likewise.
1906 (collect_register): Change buf argument to void *.
1907 (collect_register_by_name): Likewise.
1908 * regcache.h: Add missing prototypes.
1909 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1910 * server.c (handle_query): New function.
1911 (attached): New static variable, moved out of main.
1912 (main): Quiet longjmp clobber warnings.
1913 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1914 * utils.c (error): Remove NORETURN.