[RFA] x86-64 target bugfixes 3

Andrew Cagney ac131313@cygnus.com
Sat Jan 19 09:51:00 GMT 2002


> Index: ChangeLog
> from  Jiri Smid  <smid@suse.cz>
> 
> * 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.
> 


Jiri, I suspect several people looked around and then assumed another 
person was handling this change :-(  Sorry.

One cosmetic tweek for the ChangeLog.  x86-64linux.mh et.al. should read 
config/i386/x86-64linux.mh et.al. - the full path to files in sub 
directories is needed.

Everything is fine except the tweek to xm-i386.h.  The xm file is for 
host configury, not native configury.  I suspect you ment to add it to 
config/i386/nm-<something>.h.

Andrew

> 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 <signal.h>
> --- 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 */
> 
> 




More information about the Gdb-patches mailing list