From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15497 invoked by alias); 20 Dec 2001 09:04:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15445 invoked from network); 20 Dec 2001 09:04:53 -0000 Received: from unknown (HELO naga.suse.cz) (213.210.157.162) by sources.redhat.com with SMTP; 20 Dec 2001 09:04:53 -0000 Received: (from smid@localhost) by naga.suse.cz (8.11.6/8.11.6/SuSE Linux 0.5) id fBK94kv11240; Thu, 20 Dec 2001 10:04:46 +0100 X-Authentication-Warning: naga.suse.cz: smid set sender to smid@suse.cz using -f To: gdb-patches@sources.redhat.com Subject: [RFA] x86-64 target bugfixes 3 From: Jiri Smid Date: Thu, 20 Dec 2001 01:04:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2001-12/txt/msg00505.txt.bz2 Index: ChangeLog from Jiri Smid * x86-64linux.mh (NATDEPFILES): x86-64-nat.o removed. * x86-64-linux-nat.c (x86_64_register_u_addr): New function. * nm-x86-64.h (ATTACH_LWP): Removed. * Makefile.in (x86-64-tdep.o, x86-64-linux-tdep.o, x86-64-linux-nat.o): Fix dependencies. * xm-i386.h (solib.h): Include. Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.144 diff -c -3 -p -r1.144 Makefile.in *** Makefile.in 2001/12/19 02:45:35 1.144 --- Makefile.in 2001/12/20 08:25:41 *************** values.o: values.c $(defs_h) $(expressio *** 2130,2143 **** vax-tdep.o: vax-tdep.c $(OP_INCLUDE)/vax.h $(defs_h) $(symtab_h) x86-64-linux-tdep.o : x86-64-linux-tdep.c $(defs_h) $(inferior_h) \ ! $(gdbcore_h) $(regcache_h) x86-64-tdep.h i386-tdep.h ! x86-64-tdep.o : x86-64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \ ! $(gdbcmd_h) $(arch_utils_h) $(regcache_h) $(symfile_h) x86-64-tdep.h \ ! i386-tdep.h $(value_h) ! x86-64-linux-tdep.o : x86-64-linux-tdep.c $(defs_h) $(inferior_h) \ ! $(gdbcore_h) $(regcache_h) i387-nat.h x86-64-tdep.h i386-tdep.h win32-nat.o: win32-nat.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h) \ $(gdb_string_h) $(regcache_h) $(completer_h) --- 2130,2144 ---- vax-tdep.o: vax-tdep.c $(OP_INCLUDE)/vax.h $(defs_h) $(symtab_h) x86-64-linux-tdep.o : x86-64-linux-tdep.c $(defs_h) $(inferior_h) \ ! $(gdbcore_h) $(regcache_h) x86-64-tdep.h i386-tdep.h $(dwarf2cfi_h) ! x86-64-tdep.o : x86-64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) $(gdbcmd_h) \ ! $(arch_utils_h) $(regcache_h) $(symfile_h) x86-64-tdep.h i386-tdep.h \ ! $(dwarf2cfi_h) gdb_assert.h ! x86-64-linux-nat.o : x86-64-linux-nat.c $(defs_h) $(inferior_h) \ ! $(gdbcore_h) $(regcache_h) i387-nat.h gdb_assert.h x86-64-tdep.h \ ! i386-tdep.h win32-nat.o: win32-nat.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h) \ $(gdb_string_h) $(regcache_h) $(completer_h) Index: x86-64-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-linux-nat.c,v retrieving revision 1.1 diff -c -3 -p -r1.1 x86-64-linux-nat.c *** x86-64-linux-nat.c 2001/09/21 12:19:15 1.1 --- x86-64-linux-nat.c 2001/12/20 08:25:42 *************** static long debug_control_mirror; *** 556,561 **** --- 556,584 ---- /* Record which address associates with which register. */ static CORE_ADDR address_lookup[DR_LASTADDR - DR_FIRSTADDR + 1]; + /* Return the address of register REGNUM. BLOCKEND is the value of + u.u_ar0, which should point to the registers. */ + CORE_ADDR + x86_64_register_u_addr (CORE_ADDR blockend, int regnum) + { + struct user u; + CORE_ADDR fpstate; + CORE_ADDR ubase; + ubase = blockend; + if (IS_FP_REGNUM(regnum)) + { + fpstate = ubase + ((char *) &u.i387.st_space - (char *) &u); + return (fpstate + 16 * (regnum - FP0_REGNUM)); + } + else if (IS_SSE_REGNUM(regnum)) + { + fpstate = ubase + ((char *) &u.i387.xmm_space - (char *) &u); + return (fpstate + 16 * (regnum - XMM0_REGNUM)); + } + else + return (ubase + 8 * x86_64_regmap[regnum]); + } + void _initialize_x86_64_linux_nat (void) { Index: config/i386/nm-x86-64.h =================================================================== RCS file: /cvs/src/src/gdb/config/i386/nm-x86-64.h,v retrieving revision 1.1 diff -c -3 -p -r1.1 nm-x86-64.h *** nm-x86-64.h 2001/09/21 12:19:15 1.1 --- nm-x86-64.h 2001/12/20 08:25:42 *************** extern int kernel_u_size (void); *** 85,96 **** /* Override child_resume in `infptrace.c'. */ #define CHILD_RESUME - // extern int lin_lwp_prepare_to_proceed (void); #undef PREPARE_TO_PROCEED - // #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () - - extern void lin_lwp_attach_lwp (ptid_t pid, int verbose); - #define ATTACH_LWP(pid, verbose) lin_lwp_attach_lwp ((pid), (verbose)) #include --- 85,91 ---- Index: config/i386/x86-64linux.mh =================================================================== RCS file: /cvs/src/src/gdb/config/i386/x86-64linux.mh,v retrieving revision 1.1 diff -c -3 -p -r1.1 x86-64linux.mh *** x86-64linux.mh 2001/09/21 12:19:15 1.1 --- x86-64linux.mh 2001/12/20 08:25:42 *************** XDEPFILES= *** 5,11 **** NAT_FILE= nm-x86-64.h NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o \ ! core-aout.o i386-nat.o x86-64-nat.o x86-64-linux-nat.o \ ! i387-nat.o proc-service.o thread-db.o lin-lwp.o LOADLIBES = -ldl -rdynamic --- 5,11 ---- NAT_FILE= nm-x86-64.h NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o \ ! core-aout.o i386-nat.o x86-64-linux-nat.o i387-nat.o \ ! proc-service.o thread-db.o lin-lwp.o LOADLIBES = -ldl -rdynamic Index: config/i386/xm-i386.h =================================================================== RCS file: /cvs/src/src/gdb/config/i386/xm-i386.h,v retrieving revision 1.2 diff -c -3 -p -r1.2 xm-i386.h *** xm-i386.h 2001/08/30 21:53:47 1.2 --- xm-i386.h 2001/12/20 08:25:42 *************** *** 27,30 **** --- 27,32 ---- #define HOST_DOUBLE_FORMAT &floatformat_ieee_double_little #define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext + #define SVR4_SHARED_LIBS + #include "solib.h" #endif /* XM_386_H */ -- Jiri Smid --------------------------------------------------------------------- SuSE CR, s.r.o. e-mail: smid@suse.cz Drahobejlova 27 tel:+420 2 96542 373 190 00 Praha 9 fax:+420 2 96542 374 Ceska republika http://www.suse.cz