From owner-p4-projects Fri Mar 21 18:45:36 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 10A0437B404; Fri, 21 Mar 2003 18:45:32 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E39937B401 for ; Fri, 21 Mar 2003 18:45:31 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 269A643FBF for ; Fri, 21 Mar 2003 18:45:31 -0800 (PST) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h2M2jU0U044501 for ; Fri, 21 Mar 2003 18:45:30 -0800 (PST) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h2M2jUak044498 for perforce@freebsd.org; Fri, 21 Mar 2003 18:45:30 -0800 (PST) Date: Fri, 21 Mar 2003 18:45:30 -0800 (PST) Message-Id: <200303220245.h2M2jUak044498@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar Subject: PERFORCE change 27210 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=27210 Change 27210 by marcel@marcel_vaio on 2003/03/21 18:45:20 Stub, glue and hack gdb(1) so that it at least compiles. It is possible to run an application within gdb(1) if you know how to do it (instructions left as an excercise for the reader :-) Obtained from: arun Affected files ... .. //depot/projects/ia64/contrib/gdb/gdb/config/ia64/nm-fbsd.h#1 add .. //depot/projects/ia64/contrib/gdb/gdb/config/ia64/tm-fbsd.h#1 add .. //depot/projects/ia64/contrib/gdb/gdb/config/ia64/tm-ia64.h#5 edit .. //depot/projects/ia64/contrib/gdb/gdb/defs.h#5 edit .. //depot/projects/ia64/contrib/gdb/gdb/ia64-fbsd-nat.c#1 add .. //depot/projects/ia64/contrib/gdb/gdb/ia64-fbsd-tdep.c#1 add .. //depot/projects/ia64/contrib/gdb/gdb/ia64-tdep.c#5 edit .. //depot/projects/ia64/gnu/usr.bin/binutils/Makefile#7 edit .. //depot/projects/ia64/gnu/usr.bin/binutils/gdb/Makefile.ia64#2 edit .. //depot/projects/ia64/gnu/usr.bin/binutils/gdb/freebsd-uthread.c#5 edit .. //depot/projects/ia64/gnu/usr.bin/binutils/gdb/kvm-fbsd.c#8 edit Differences ... ==== //depot/projects/ia64/contrib/gdb/gdb/config/ia64/tm-ia64.h#5 (text+ko) ==== @@ -21,6 +21,8 @@ #ifndef TM_IA64_H #define TM_IA64_H +#include "regcache.h" + #if !defined(GDBSERVER) #define GDB_MULTI_ARCH 1 ==== //depot/projects/ia64/contrib/gdb/gdb/defs.h#5 (text+ko) ==== @@ -1027,6 +1027,8 @@ extern char *savestring (const char *, size_t); +extern char *tilde_expand (const char *); + extern char *msavestring (void *, const char *, size_t); extern char *mstrsave (void *, const char *); ==== //depot/projects/ia64/contrib/gdb/gdb/ia64-tdep.c#5 (text+ko) ==== @@ -79,9 +79,11 @@ #define BUNDLE_LEN 16 +#ifdef __linux__ /* FIXME: These extern declarations should go in ia64-tdep.h. */ extern CORE_ADDR ia64_linux_sigcontext_register_address (CORE_ADDR, int); extern CORE_ADDR ia64_aix_sigcontext_register_address (CORE_ADDR, int); +#endif static gdbarch_init_ftype ia64_gdbarch_init; @@ -2106,12 +2108,15 @@ native_find_global_pointer is nonzero to indicate that we're on AIX is kind of hokey, but I can't think of a better way to do it. */ +#ifdef __linux__ if (os_ident == ELFOSABI_LINUX) tdep->sigcontext_register_address = ia64_linux_sigcontext_register_address; else if (native_find_global_pointer != 0) tdep->sigcontext_register_address = ia64_aix_sigcontext_register_address; else +#else tdep->sigcontext_register_address = 0; +#endif /* We know that GNU/Linux won't have to resort to the native_find_global_pointer hackery. But that's the only one we ==== //depot/projects/ia64/gnu/usr.bin/binutils/Makefile#7 (text+ko) ==== @@ -10,7 +10,8 @@ TARGET_ARCH?= ${MACHINE_ARCH} .if (${TARGET_ARCH} == "alpha" \ - || ${TARGET_ARCH} == "i386" ) \ + || ${TARGET_ARCH} == "i386" \ + || ${TARGET_ARCH} == "ia64") \ && !defined(NO_GDB) SUBDIR+= gdb gdbreplay .endif ==== //depot/projects/ia64/gnu/usr.bin/binutils/gdb/Makefile.ia64#2 (text+ko) ==== @@ -2,4 +2,4 @@ XSRCS+= ia64-tdep.c ia64-fbsd-nat.c \ core-regset.c -CFLAGS+= -DDEFAULT_BFD_VEC=bfd_elf64_ia64_vec +CFLAGS+= -DDEFAULT_BFD_VEC=bfd_elf64_ia64_little_vec ==== //depot/projects/ia64/gnu/usr.bin/binutils/gdb/freebsd-uthread.c#5 (text+ko) ==== @@ -461,6 +461,14 @@ #endif +#ifdef __ia64__ + +static char jmpmap[125] = { + -1 +}; + +#endif + static void freebsd_uthread_fetch_registers (int regno) { ==== //depot/projects/ia64/gnu/usr.bin/binutils/gdb/kvm-fbsd.c#8 (text+ko) ==== @@ -596,6 +596,17 @@ #endif /* __sparc64__ */ +#ifdef __ia64__ + +#define SPARC_INTREG_SIZE 8 + +static void +fetch_kcore_registers (struct pcb *pcbp) +{ +} + +#endif /* __ia64__ */ + /* Get the registers out of a core file. This is the machine- independent part. Fetch_core_registers is the machine-dependent part, typically implemented in the xm-file for each architecture. */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message