3 * target.h (struct target_ops): Add insert_watchpoint,
4 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5 pointers for hardware watchpoint support.
6 * linux-low.h (struct linux_target_ops): Ditto.
7 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
8 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12 * server.c (main): Recognize 'Z' and 'z' packets.
16 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18 (the_low_target): Add new members.
22 * proc-service.c (ps_lgetregs): Search all_processes instead of
27 * server.c (start_inferior): Change return type to int.
28 (attach_inferior): Change sigptr to int *.
29 (handle_v_cont, handle_v_requests): Change signal to int *.
30 (main): Change signal to int.
34 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
35 * configure.srv: Add m32r*-*-linux*.
36 * linux-m32r-low.c: New file.
40 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
44 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
45 Take unsigned long arguments for PIDs.
46 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
47 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
48 (wait_for_sigstop, linux_resume_one_process)
49 (regsets_fetch_inferior_registers, linux_send_signal)
50 (linux_read_auxv): Likewise. Update the types of variables holding
51 PIDs. Update format string specifiers.
52 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
53 * remote-utils.c (prepare_resume_reply): Likewise.
54 * server.c (cont_thread, general_thread, step_thread)
55 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
57 (handle_query): Update format specifiers.
58 (handle_v_cont, main): Use strtoul for thread IDs.
59 * server.h (struct inferior_list_entry): Use unsigned long for ID.
60 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
61 (general_thread, step_thread, thread_from_wait)
62 (old_thread_from_wait): Update.
63 * target.h (struct thread_resume): Use unsigned long for THREAD.
64 (struct target_ops): Use unsigned long for arguments to attach and
69 * acinclude.m4: Include bfd/bfd.m4 directly.
70 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
72 * aclocal.m4, configure: Regenerated.
76 * configure.ac: Rename configure.in, require autoconf 2.59.
77 * configure: Re-generate.
81 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
83 * aclocal.m4: Regenerated.
84 * configure: Regenerated.
88 * linux-m68k-low.c (m68k_num_gregs): Define.
89 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
90 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
91 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
92 (m68k_breakpoint_at): New. Add to the_low_target.
94 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
95 srv_linux_thread_db to yes.
99 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
100 (ARCH_SET_FS): Likewise.
101 (ARCH_GET_FS): Likewise.
102 (ARCH_GET_GS): Likewise.
106 * linux-i386-low.c (ps_get_thread_area): New.
107 * linux-x86-64-low.c (ps_get_thread_area): New.
108 * linux-low.c: Include <sys/syscall.h>.
109 (linux_kill_one_process): Don't kill the first thread here.
110 (linux_kill): Kill the first thread here.
111 (kill_lwp): New function.
112 (send_sigstop, linux_send_signal): Use it.
113 * proc-service.c: Clean up #ifdefs.
114 (fpregset_info): Delete.
115 (ps_lgetregs): Update and enable implementation.
116 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
118 * remote-utils.c (struct sym_cache, symbol_cache): New.
119 (input_interrupt): Print a clearer message.
120 (async_io_enabled): New variable.
121 (enable_async_io, disable_async_io): Use it. Update comments.
122 (look_up_one_symbol): Use the symbol cache.
123 * thread-db.c (thread_db_look_up_symbols): New function.
124 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
128 * configure.in: Test for -rdynamic.
129 * configure: Regenerated.
130 * Makefile (INTERNAL_LDFLAGS): New.
131 (gdbserver, gdbreplay): Use it.
135 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
139 * linux-low.c (linux_wait): Clear all_processes list also.
143 * linux-low.c: Include <errno.h>. Remove extern declaration of
148 * gdbreplay.c, server.h, utils.c: Update copyright years.
152 * server.c (main): Print child status or termination signal from
153 variable 'signal', not 'sig'.
157 * linux-low.c (linux_read_memory): Change return type to
158 int. Check for and return error from ptrace().
159 * target.c (read_inferior_memory): Change return type to int. Pass
160 back return status from the_target->read_memory().
161 * target.h (struct target_ops): Adapt *read_memory() prototype.
163 (read_inferior_memory): Adapt prototype.
164 * server.c (main): Return an error packet if
165 read_inferior_memory() returns an error.
169 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
170 Unify with other clean targets.
174 * server.c (handle_v_cont): Call set_desired_inferior.
178 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
182 * linux-low.c (linux_wait): Unblock async I/O.
183 (linux_resume): Block and enable async I/O.
184 * remote-utils.c (block_async_io, unblock_async_io): New functions.
185 * server.h (block_async_io, unblock_async_io): Add prototypes.
189 * remote-utils.c (remote_open): Print a status notice after
191 * server.c (attach_inferior): Print a status notice after
196 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
200 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
202 * server.c, target.h: Update copyright years.
206 * target.h (struct target_ops): New member `read_auxv'.
207 * server.c (handle_query): Handle qPart:auxv:read: query using that.
208 * linux-low.c (linux_read_auxv): New function.
209 (linux_target_ops): Initialize `read_auxv' member to that.
215 * linux-s390-low.c (s390_num_regs): Update.
216 (s390_regmap): Remove control registers. Use __s390x__ predefine
217 instead of GPR_SIZE to distiguish s390 and s390x targets.
221 * linux-low.c: Update copyright year.
222 (check_removed_breakpoint): Clear pending_is_breakpoint.
223 (linux_set_resume_request, linux_queue_one_thread)
224 (resume_status_pending_p): New functions.
225 (linux_continue_one_thread): Use process->resume.
226 (linux_resume): Only resume threads if there are no pending events.
227 * linux-low.h (struct process_info): Add resume request
232 * regcache.c (new_register_cache): Clear the allocated register
237 * linux-low.c (linux_resume): Take a struct thread_resume *
239 (linux_wait): Update call.
240 (resume_ptr): New static variable.
241 (linux_continue_one_thread): Renamed from
242 linux_continue_one_process. Use resume_ptr.
243 (linux_resume): Use linux_continue_one_thread.
244 * server.c (handle_v_cont, handle_v_requests): New functions.
245 (myresume): New function.
246 (main): Handle 'v' case.
247 * target.h (struct thread_resume): New type.
248 (struct target_ops): Change argument of "resume" to struct
250 (myresume): Delete macro.
254 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
255 (uninstall): Support DESTDIR.
259 * configure.srv: Add xscale*linux copy of arm*linux entry.
263 * linux-arm-low.c (arm_reinsert_addr): New function.
264 (the_low_target): Add arm_reinsert_addr.
268 * mem-break.c: Remove whitespace at end of file.
272 * configure.in: Check whether we need to prototype strerror.
273 * server.h: Optionally prototype strerror.
274 * gdbreplay.c (perror_with_name): Use strerror.
275 * linux-low.c (linux_attach_lwp): Use strerror.
276 * utils.c (perror_with_name): Use strerror.
277 * config.in, configure: Regenerated.
281 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
286 * Makefile.in (SFILES): Update.
287 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
288 low-sun3.c: Remove files.
292 * linux-low.c: Move comment to linux_thread_alive where it belonged.
293 (linux_detach_one_process, linux_detach): New functions.
294 (linux_target_ops): Add linux_detach.
295 * server.c (main): Handle 'D' packet.
296 * target.h (struct target_ops): Add "detach" member.
297 (detach_inferior): Define.
302 * configure.srv: Accept i[34567]86 variants.
306 * linux-low.c (linux_wait_for_event): Correct comment typos.
307 (linux_resume_one_process): Call check_removed_breakpoint.
308 (linux_send_signal): New function.
309 (linux_target_ops): Add linux_send_signal.
310 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
312 * target.h (struct target_ops): Add send_signal.
316 * linux-low.c (usr_store_inferior_registers): Transfer buf in
317 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
318 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
319 away part of the register's value.
323 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
324 (linux_wait_for_event, linux_init_signals): Likewise.
328 * configure.in: Check for stdlib.h.
329 * configure: Regenerated.
330 * config.in: Regenerated.
334 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
338 * Makefile.in: Remove obsolete code.
342 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
347 * linux-arm-low.c (arm_num_regs): Increase.
348 (arm_regmap): Include status register.
352 * linux-low.c (register_addr): Remove incorrect -1 check.
356 * linux-low.c (linux_create_inferior): Call setpgid. Return
358 (unstopped_p, linux_signal_pid): Remove.
359 (linux_target_ops): Remove linux_signal_pid.
360 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
361 global instead of target method.
362 * target.h (struct target_ops): Remove signal_pid. Update comment
364 * server.c (signal_pid): New variable.
365 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
366 gdbserver. Set the child to be the foreground process group.
367 (attach_inferior): Set signal_pid.
371 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
375 * Makefile.in (LDFLAGS): Allow the configure script to establish a
380 * Makefile.in: Make chill references obsolete.
384 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
385 * configure: Regenerate.
386 * config.in: Regenerate.
390 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
391 (perror_with_name, remote_close, remote_open, expect, play): Static.
395 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
396 byte offsets instead of an array of indexes.
397 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
401 * regcache.c: Add comment.
405 * thread-db.c: New file.
406 * proc-service.c: New file.
407 * acinclude.m4: New file.
408 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
409 proc-service.o, and thread-db.o.
410 (linux-low.o): Add USE_THREAD_DB.
411 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
412 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
413 * aclocal.m4: Regenerated.
414 * config.in: Regenerated.
415 * configure: Regenerated.
416 * configure.in: Check for proc_service.h, sys/procfs.h,
417 thread_db.h, and linux/elf.h headrs.
418 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
419 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
420 Check for -lthread_db and thread support.
421 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
423 * i387-fp.c: Constify arguments.
424 * i387-fp.h: Likewise.
425 * inferiors.c: (struct thread_info): Renamed from
426 `struct inferior_info'. Remove PID member. Use generic inferior
427 list header. All uses updated.
428 (inferiors, signal_pid): Removed.
429 (all_threads): New variable.
430 (get_thread): Define.
431 (add_inferior_to_list): New function.
432 (for_each_inferior): New function.
433 (change_inferior_id): New function.
434 (add_inferior): Removed.
435 (remove_inferior): New function.
436 (add_thread): New function.
437 (free_one_thread): New function.
438 (remove_thread): New function.
439 (clear_inferiors): Use for_each_inferior and free_one_thread.
440 (find_inferior): New function.
441 (find_inferior_id): New function.
442 (inferior_target_data): Update argument type.
443 (set_inferior_target_data): Likewise.
444 (inferior_regcache_data): Likewise.
445 (set_inferior_regcache_data): Likewise.
446 * linux-low.c (linux_bp_reinsert): Remove.
447 (all_processes, stopping_threads, using_thrads)
448 (struct pending_signals, debug_threads, pid_of): New.
449 (inferior_pid): Replace with macro.
450 (struct inferior_linux_data): Remove.
451 (get_stop_pc, add_process): New functions.
452 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
453 Use add_process and add_thread.
454 (linux_attach_lwp): New function, based on old linux_attach. Use
455 add_process and add_thread. Set stop_expected for new threads.
456 (linux_attach): New function.
457 (linux_kill_one_process): New function.
458 (linux_kill): Kill all LWPs.
459 (linux_thread_alive): Use find_inferior_id.
460 (check_removed_breakpoints, status_pending_p): New functions.
461 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
462 Update. Use WNOHANG. Wait for cloned processes also. Update process
463 struct for the found process.
464 (linux_wait_for_event): New function.
465 (linux_wait): Use it. Support LWPs.
466 (send_sigstop, wait_for_sigstop, stop_all_processes)
467 (linux_resume_one_process, linux_continue_one_process): New functions.
468 (linux_resume): Support LWPs.
469 (REGISTER_RAW_SIZE): Remove.
470 (fetch_register): Use register_size instead. Call supply_register.
471 (usr_store_inferior_registers): Likewise. Call collect_register.
473 (regsets_fetch_inferior_registers): Improve error message.
474 (regsets_store_inferior_registers): Add debugging.
475 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
476 (unstopped_p, linux_signal_pid): New functions.
477 (linux_target_ops): Add linux_signal_pid.
478 (linux_init_signals): New function.
479 (initialize_low): Call it. Initialize using_threads.
480 * regcache.c (inferior_regcache_data): Add valid
482 (get_regcache): Fetch registers lazily. Add fetch argument
483 and update all callers.
484 (regcache_invalidate_one, regcache_invalidate): New
486 (new_register_cache): Renamed from create_register_cache.
487 Return the new regcache.
488 (free_register_cache): Change argument to a void *.
489 (registers_to_string, registers_from_string): Call get_regcache
491 (register_data): Make static. Pass fetch flag to get_regcache.
492 (supply_register): Call get_regcache with fetch flag clear.
493 (collect_register): Call get_regcache with fetch flag set.
494 (collect_register_as_string): New function.
495 * regcache.h: Update.
496 * remote-utils.c (putpkt): Flush after debug output and use
498 Handle input interrupts while waiting for an ACK.
499 (input_interrupt): Use signal_pid method.
500 (getpkt): Flush after debug output and use stderr.
501 (outreg): Use collect_register_as_string.
502 (new_thread_notify, dead_thread_notify): New functions.
503 (prepare_resume_reply): Check using_threads. Set thread_from_wait
505 (look_up_one_symbol): Flush after debug output.
506 * server.c (step_thread, server_waiting): New variables.
507 (start_inferior): Don't use signal_pid. Update call to mywait.
508 (attach_inferior): Update call to mywait.
509 (handle_query): Handle qfThreadInfo and qsThreadInfo.
510 (main): Don't fetch/store registers explicitly. Use
511 set_desired_inferior. Support proposed ``Hs'' packet. Update
514 (struct inferior_list, struct_inferior_list_entry): New.
515 * target.c (set_desired_inferior): New.
516 (write_inferior_memory): Constify.
517 (mywait): New function.
519 (struct target_ops): New signal_pid method.
520 (mywait): Removed macro, added prototype.
522 * linux-low.h (regset_func): Removed.
523 (regset_fill_func, regset_store_func): New.
524 (enum regset_type): New.
525 (struct regset_info): Add type field. Use new operation types.
526 (struct linux_target_ops): stop_pc renamed to get_pc.
527 Add decr_pc_after_break and breakpoint_at.
528 (get_process, get_thread_proess, get_process_thread)
529 (strut process_info, all_processes, linux_attach_lwp)
530 (thread_db_init): New.
532 * linux-arm-low.c (arm_get_pc, arm_set_pc,
533 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
534 (the_low_target): Add new members.
535 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
536 (i386_store_fpxregset): Constify.
537 (target_regsets): Add new kind identifier.
538 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
539 (i386_set_pc): Add debugging.
540 (i386_breakpoint_at): New function.
541 (the_low_target): Add new members.
542 * linux-mips-low.c (mips_get_pc, mips_set_pc)
543 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
544 (mips_breakpoint_at): New.
545 (the_low_target): Add new members.
546 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
547 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
548 (the_low_target): Add new members.
549 * linux-sh-low.c (sh_get_pc, sh_set_pc)
550 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
551 (the_low_target): Add new members.
552 * linux-x86-64-low.c (target_regsets): Add new kind
558 * server.c (gdbserver_usage): New function.
563 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
568 * Makefile.in: Remove obsolete code.
572 * linux-low.c (regsets_fetch_inferior_registers),
573 (regsets_store_inferior_registers): Removed cast to int from
575 * regcache.h: Added declaration of struct inferior_info.
579 * inferiors.c (struct inferior_info): Add regcache_data.
580 (add_inferior): Call create_register_cache.
581 (clear_inferiors): Call free_register_cache.
582 (inferior_regcache_data, set_inferior_regcache_data): New functions.
583 * regcache.c (struct inferior_regcache_data): New.
585 (get_regcache): New function.
586 (create_register_cache, free_register_cache): New functions.
587 (set_register_cache): Don't initialize the register cache here.
588 (registers_to_string, registers_from_string, register_data): Call
590 * regcache.h: Add prototypes.
591 * server.h: Likewise.
595 * mem-break.c: New file.
596 * mem-break.h: New file.
597 * Makefile.in: Add mem-break.o rule; update server.h
599 * inferiors.c (struct inferior_info): Add target_data
601 (clear_inferiors): Free target_data member if set.
602 (inferior_target_data, set_inferior_target_data): New functions.
603 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
604 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
605 * linux-low.c (linux_bp_reinsert): New variable.
606 (struct inferior_linux_data): New.
607 (linux_create_inferior): Use set_inferior_target_data.
608 (linux_attach): Likewise. Call add_inferior.
609 (linux_wait_for_one_inferior): New function.
610 (linux_wait): Call it.
611 (linux_write_memory): Add const.
612 (initialize_low): Call set_breakpoint_data.
613 * linux-low.h (struct linux_target_ops): Add breakpoint
615 * server.c (attach_inferior): Remove extra add_inferior
617 * server.h: Include mem-break.h. Update inferior.c
619 * target.c (read_inferior_memory)
620 (write_inferior_memory): New functions.
621 * target.h (read_inferior_memory)
622 (write_inferior_memory): Change macros to prototypes.
623 (struct target_ops): Update comments. Add const to write_memory
628 * linux-low.c (usr_store_inferior_registers): Support
629 registers which are allowed to fail to store.
630 * linux-low.h (linux_target_ops): Likewise.
631 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
632 (ppc_cannot_store_register): FPSCR may not be storable.
636 * server.h: Include <string.h> if HAVE_STRING_H.
637 * ChangeLog: Correct paths in last ChangeLog entry.
641 * linux-low.h: Remove obsolete prototypes.
642 (struct linux_target_ops): New.
643 (extern the_low_target): New.
644 * linux-low.c (num_regs, regmap): Remove declarations.
645 (register_addr): Use the_low_target explicitly.
646 (fetch_register): Likewise.
647 (usr_fetch_inferior_registers): Likewise.
648 (usr_store_inferior_registers): Likewise.
649 * linux-arm-low.c (num_regs): Remove.
650 (arm_num_regs): Define.
651 (arm_regmap): Renamed from regmap, made static.
652 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
654 (arm_cannot_store_register): Renamed from cannot_store_register,
656 (the_low_target): New.
657 * linux-i386-low.c (num_regs): Remove.
658 (i386_num_regs): Define.
659 (i386_regmap): Renamed from regmap, made static.
660 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
662 (i386_cannot_store_register): Renamed from cannot_store_register,
664 (the_low_target): New.
665 * linux-ia64-low.c (num_regs): Remove.
666 (ia64_num_regs): Define.
667 (ia64_regmap): Renamed from regmap, made static.
668 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
670 (ia64_cannot_store_register): Renamed from cannot_store_register,
672 (the_low_target): New.
673 * linux-m68k-low.c (num_regs): Remove.
674 (m68k_num_regs): Define.
675 (m68k_regmap): Renamed from regmap, made static.
676 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
678 (m68k_cannot_store_register): Renamed from cannot_store_register,
680 (the_low_target): New.
681 * linux-mips-low.c (num_regs): Remove.
682 (mips_num_regs): Define.
683 (mips_regmap): Renamed from regmap, made static.
684 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
686 (mips_cannot_store_register): Renamed from cannot_store_register,
688 (the_low_target): New.
689 * linux-ppc-low.c (num_regs): Remove.
690 (ppc_num_regs): Define.
691 (ppc_regmap): Renamed from regmap, made static.
692 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
694 (ppc_cannot_store_register): Renamed from cannot_store_register,
696 (the_low_target): New.
697 * linux-s390-low.c (num_regs): Remove.
698 (s390_num_regs): Define.
699 (s390_regmap): Renamed from regmap, made static.
700 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
702 (s390_cannot_store_register): Renamed from cannot_store_register,
704 (the_low_target): New.
705 * linux-sh-low.c (num_regs): Remove.
706 (sh_num_regs): Define.
707 (sh_regmap): Renamed from regmap, made static.
708 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
710 (sh_cannot_store_register): Renamed from cannot_store_register,
712 (the_low_target): New.
713 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
714 (the_low_target): New.
718 * Makefile.in: Add stamp-h target.
719 * configure.in: Create stamp-h.
720 * configure: Regenerated.
724 * inferiors.c: New file.
725 * target.c: New file.
726 * target.h: New file.
727 * Makefile.in: Add target.o and inferiors.o. Update
729 * linux-low.c (inferior_pid): New static variable,
731 (linux_create_inferior): Renamed from create_inferior.
732 Call add_inferior. Return 0 on success instead of a PID.
733 (linux_attach): Renamed from myattach.
734 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
735 (linux_thread_alive): Renamed from mythread_alive.
736 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
738 (linux_resume): Renamed from myresume. Add missing ``return 0''.
739 (regsets_store_inferior_registers): Correct error message.
740 Add missing ``return 0''.
741 (linux_fetch_registers): Renamed from fetch_inferior_registers.
742 (linux_store_registers): Renamed from store_inferior_registers.
743 (linux_read_memory): Renamed from read_inferior_memory.
744 (linux_write_memory): Renamed from write_inferior_memory.
745 (linux_target_ops): New structure.
746 (initialize_low): Call set_target_ops ().
747 * remote-utils.c (unhexify): New function.
748 (hexify): New function.
749 (input_interrupt): Send signals to ``signal_pid''.
750 * server.c (inferior_pid): Remove.
751 (start_inferior): Update create_inferior call.
752 (attach_inferior): Call add_inferior.
753 (handle_query): New function.
754 (main): Call handle_query for `q' packets.
755 * server.h: Include "target.h". Remove obsolete prototypes.
756 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
760 * Makefile.in: Add WARN_CFLAGS. Update configury
762 * configure.in: Check for <string.h>
763 * configure: Regenerate.
764 * config.in: Regenerate.
765 * gdbreplay.c: Include needed system headers.
766 (remote_open): Remove strchr prototype.
767 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
768 * regcache.c (supply_register): Change buf argument to const void *.
769 (supply_register_by_name): Likewise.
770 (collect_register): Change buf argument to void *.
771 (collect_register_by_name): Likewise.
772 * regcache.h: Add missing prototypes.
773 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
774 * server.c (handle_query): New function.
775 (attached): New static variable, moved out of main.
776 (main): Quiet longjmp clobber warnings.
777 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
778 * utils.c (error): Remove NORETURN.