From: Jim Blandy <jimb@zwingli.cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: RFA: i386 Linux: provide correct type for orig_eax register
Date: Fri, 11 Jan 2002 14:23:00 -0000 [thread overview]
Message-ID: <20020111222448.A73EC5E9D8@zwingli.cygnus.com> (raw)
This fixes a failure in callfuncs.exp.
2002-01-11 Jim Blandy <jimb@redhat.com>
Return the correct virtual type for orig_eax.
* i386-linux-tdep.c (i386_linux_register_virtual_type): New function.
* config/i386/tm-linux.h (i386_linux_register_virtual_type): New
declaration.
(REGISTER_VIRTUAL_TYPE): Override definition in tm-i386.h; use the
Linux-specific version.
Index: gdb/i386-linux-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/i386-linux-tdep.c,v
retrieving revision 2.7
diff -c -r2.7 i386-linux-tdep.c
*** gdb/i386-linux-tdep.c 2001/11/10 03:02:19 2.7
--- gdb/i386-linux-tdep.c 2002/01/11 21:51:28
***************
*** 64,69 ****
--- 64,79 ----
return i386_register_raw_size (reg);
}
+
+ struct type *
+ i386_linux_register_virtual_type (int reg)
+ {
+ /* Deal with the extra "orig_eax" pseudo register. */
+ if (reg == I386_LINUX_ORIG_EAX_REGNUM)
+ return builtin_type_int;
+
+ return i386_register_virtual_type (reg);
+ }
\f
/* Recognizing signal handler frames. */
Index: gdb/config/i386/tm-linux.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/config/i386/tm-linux.h,v
retrieving revision 1.28
diff -c -r1.28 tm-linux.h
*** gdb/config/i386/tm-linux.h 2001/11/10 03:02:20 1.28
--- gdb/config/i386/tm-linux.h 2002/01/11 21:51:28
***************
*** 60,65 ****
--- 60,69 ----
#define REGISTER_RAW_SIZE(reg) i386_linux_register_raw_size ((reg))
extern int i386_linux_register_raw_size (int reg);
+ #undef REGISTER_VIRTUAL_TYPE
+ #define REGISTER_VIRTUAL_TYPE(reg) i386_linux_register_virtual_type ((reg))
+ extern struct type *i386_linux_register_virtual_type (int reg);
+
/* Linux/ELF uses stabs-in-ELF with the DWARF register numbering
scheme by default, so we must redefine STAB_REG_TO_REGNUM. This
messes up the floating-point registers for a.out, but there is not
next reply other threads:[~2002-01-11 22:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-11 14:23 Jim Blandy [this message]
2002-01-12 5:13 ` Mark Kettenis
2002-01-12 15:14 ` Jim Blandy
2002-01-12 15:40 ` Andrew Cagney
2002-01-14 13:58 ` Jim Blandy
2002-01-14 14:31 ` Mark Kettenis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020111222448.A73EC5E9D8@zwingli.cygnus.com \
--to=jimb@zwingli.cygnus.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox