Biarch support for i386/amd64 gdbserver.

* Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
	Add linux-x86-low.c.
	(linux-i386-low.o, linux-x86-64-low.o): Delete.
	(linux-x86-low.o): Add.
	* linux-x86-64-low.c: Delete.
	* linux-i386-low.c: Delete.
	* linux-x86-low.c: New file.
	* configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
	linux-x86-low.o.
	(x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
	linux-x86-low.o.
	(x86_64-linux srv_regobj): Add reg-i386-linux.o.
	* linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
	(linux_child_pid_to_exec_file): New function.
	(elf_64_header_p, elf_64_file_p): New functions.
	(siginfo_fixup): New function.
	(linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
	give target a chance to convert layout.
	* linux-low.h (linux_target_ops): New member siginfo_fixup.
	(linux_child_pid_to_exec_file, elf_64_file_p): Declare.
This commit is contained in:
Doug Evans
2009-05-12 22:25:00 +00:00
parent 1b05fbbd2c
commit d0722149ad
8 changed files with 790 additions and 407 deletions

View File

@@ -43,6 +43,8 @@ struct regset_info
extern struct regset_info target_regsets[];
#endif
struct siginfo;
struct process_info_private
{
/* True if this process has loaded thread_db, and it is active. */
@@ -75,7 +77,6 @@ struct linux_target_ops
int breakpoint_len;
CORE_ADDR (*breakpoint_reinsert_addr) (void);
int decr_pc_after_break;
int (*breakpoint_at) (CORE_ADDR pc);
@@ -89,6 +90,12 @@ struct linux_target_ops
for registers smaller than an xfer unit). */
void (*collect_ptrace_register) (int regno, char *buf);
void (*supply_ptrace_register) (int regno, const char *buf);
/* Hook to convert from target format to ptrace format and back.
Returns true if any conversion was done; false otherwise.
If DIRECTION is 1, then copy from INF to NATIVE.
If DIRECTION is 0, copy from NATIVE to INF. */
int (*siginfo_fixup) (struct siginfo *native, void *inf, int direction);
};
extern struct linux_target_ops the_low_target;
@@ -169,6 +176,9 @@ struct lwp_info
extern struct inferior_list all_lwps;
char *linux_child_pid_to_exec_file (int pid);
int elf_64_file_p (const char *file);
void linux_attach_lwp (unsigned long pid);
int thread_db_init (int use_events);