* [RFA] x86-64 target bugfixes 3
@ 2001-12-20 1:04 Jiri Smid
2002-01-19 9:51 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Smid @ 2001-12-20 1:04 UTC (permalink / raw)
To: gdb-patches
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.
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 */
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFA] x86-64 target bugfixes 3
2001-12-20 1:04 [RFA] x86-64 target bugfixes 3 Jiri Smid
@ 2002-01-19 9:51 ` Andrew Cagney
2002-01-20 1:30 ` Andreas Jaeger
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2002-01-19 9:51 UTC (permalink / raw)
To: Jiri Smid; +Cc: gdb-patches
> 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 */
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFA] x86-64 target bugfixes 3
2002-01-19 9:51 ` Andrew Cagney
@ 2002-01-20 1:30 ` Andreas Jaeger
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Jaeger @ 2002-01-20 1:30 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Jiri Smid, gdb-patches, Michal Ludvig
Andrew Cagney <ac131313@cygnus.com> writes:
>> 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.
I left this patch out, since nm-x86-64.h contains those lines already.
I committed the rest and adjusted the copyright year also,
Andrew, Thanks for the review,
Andreas
* config/i386/x86-64linux.mh (NATDEPFILES): x86-64-nat.o removed.
* x86-64-linux-nat.c (x86_64_register_u_addr): New function.
* config/i386/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.
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-01-20 9:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-20 1:04 [RFA] x86-64 target bugfixes 3 Jiri Smid
2002-01-19 9:51 ` Andrew Cagney
2002-01-20 1:30 ` Andreas Jaeger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox