From: Elena Zannoni <ezannoni@cygnus.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: Elena Zannoni <ezannoni@cygnus.com>,
gdb-patches@sources.redhat.com, vmakarov@redhat.com
Subject: Re: [RFA] config/rs6000/tm-rs6000.h STAB_REG_TO_REGNUM
Date: Fri, 30 Nov 2001 13:08:00 -0000 [thread overview]
Message-ID: <15367.63139.561172.481628@krustylu.cygnus.com> (raw)
In-Reply-To: <3C07CD1A.4010403@cygnus.com>
Andrew Cagney writes:
> Just FYI,
>
> It should be using the multi-arch method.
>
> Andrew
Damn, yes, overlooked it.
Here is a new patch. Retested as well.
This shouldn't effect the linux-ppc platform.
I'll look at that next.
Elena
2001-11-22 Elena Zannoni <ezannoni@redhat.com>
Based on a patch from Vladimir Makarov <vmakarov@redhat.com>:
* config/rs6000/tm-rs6000.h (STAB_REG_TO_REGNUM): Delete it.
It is now multiarched.
* rs6000-tdep.c (rs6000_stab_reg_to_regnum): New function.
(rs6000_gdbarch_init): Set gdbarch_stab_to_regnum.
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.28
diff -u -p -r1.28 rs6000-tdep.c
--- rs6000-tdep.c 2001/10/21 17:19:37 1.28
+++ rs6000-tdep.c 2001/11/30 20:58:50
@@ -1613,6 +1613,32 @@ rs6000_register_convert_to_raw (struct t
memcpy (to, from, REGISTER_RAW_SIZE (n));
}
+/* Convert a dbx stab register number (from `r' declaration) to a gdb
+ REGNUM */
+static int
+rs6000_stab_reg_to_regnum (int num)
+{
+ int regnum;
+ switch (num)
+ {
+ case 64: /* mq */
+ if (TARGET_ARCHITECTURE->mach == bfd_mach_ppc_601)
+ regnum = 124;
+ else
+ regnum = 70;
+ break;
+ case 65: regnum = 67; /* lr */
+ break;
+ case 66: regnum = 68; /* ctr */
+ break;
+ case 76: regnum = 69; /* xer */
+ break;
+ default: regnum = num;
+ break;
+ }
+ return regnum;
+}
+
/* Store the address of the place in which to copy the structure the
subroutine will return. This is called from call_function.
@@ -2340,6 +2366,7 @@ rs6000_gdbarch_init (struct gdbarch_info
rs6000_frameless_function_invocation);
set_gdbarch_frame_chain (gdbarch, rs6000_frame_chain);
set_gdbarch_frame_saved_pc (gdbarch, rs6000_frame_saved_pc);
+ set_gdbarch_stab_reg_to_regnum (gdbarch, rs6000_stab_reg_to_regnum);
set_gdbarch_frame_init_saved_regs (gdbarch, rs6000_frame_init_saved_regs);
set_gdbarch_init_extra_frame_info (gdbarch, rs6000_init_extra_frame_info);
Index: config/rs6000/tm-rs6000.h
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/tm-rs6000.h,v
retrieving revision 1.13
diff -u -p -r1.13 tm-rs6000.h
--- tm-rs6000.h 2001/05/01 19:36:11 1.13
+++ tm-rs6000.h 2001/11/30 20:58:58
@@ -86,10 +86,6 @@ extern void aix_process_linenos (void);
#define FIRST_UISA_SP_REGNUM 64 /* first special register number */
#define LAST_UISA_SP_REGNUM 70 /* last special register number */
-/* convert a dbx stab register number (from `r' declaration) to a gdb REGNUM */
-
-#define STAB_REG_TO_REGNUM(value) (value)
-
/* Define other aspects of the stack frame. */
#define INIT_FRAME_PC_FIRST(fromleaf, prev) \
WARNING: multiple messages have this Message-ID
From: Elena Zannoni <ezannoni@cygnus.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: Elena Zannoni <ezannoni@cygnus.com>,
gdb-patches@sources.redhat.com, vmakarov@redhat.com
Subject: Re: [RFA] config/rs6000/tm-rs6000.h STAB_REG_TO_REGNUM
Date: Sat, 24 Nov 2001 06:47:00 -0000 [thread overview]
Message-ID: <15367.63139.561172.481628@krustylu.cygnus.com> (raw)
Message-ID: <20011124064700.3K6I8mxF-Yo6k5NbxiXJJOzA5IigoduTljZx25HKP8A@z> (raw)
In-Reply-To: <3C07CD1A.4010403@cygnus.com>
Andrew Cagney writes:
> Just FYI,
>
> It should be using the multi-arch method.
>
> Andrew
Damn, yes, overlooked it.
Here is a new patch. Retested as well.
This shouldn't effect the linux-ppc platform.
I'll look at that next.
Elena
2001-11-22 Elena Zannoni <ezannoni@redhat.com>
Based on a patch from Vladimir Makarov <vmakarov@redhat.com>:
* config/rs6000/tm-rs6000.h (STAB_REG_TO_REGNUM): Delete it.
It is now multiarched.
* rs6000-tdep.c (rs6000_stab_reg_to_regnum): New function.
(rs6000_gdbarch_init): Set gdbarch_stab_to_regnum.
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.28
diff -u -p -r1.28 rs6000-tdep.c
--- rs6000-tdep.c 2001/10/21 17:19:37 1.28
+++ rs6000-tdep.c 2001/11/30 20:58:50
@@ -1613,6 +1613,32 @@ rs6000_register_convert_to_raw (struct t
memcpy (to, from, REGISTER_RAW_SIZE (n));
}
+/* Convert a dbx stab register number (from `r' declaration) to a gdb
+ REGNUM */
+static int
+rs6000_stab_reg_to_regnum (int num)
+{
+ int regnum;
+ switch (num)
+ {
+ case 64: /* mq */
+ if (TARGET_ARCHITECTURE->mach == bfd_mach_ppc_601)
+ regnum = 124;
+ else
+ regnum = 70;
+ break;
+ case 65: regnum = 67; /* lr */
+ break;
+ case 66: regnum = 68; /* ctr */
+ break;
+ case 76: regnum = 69; /* xer */
+ break;
+ default: regnum = num;
+ break;
+ }
+ return regnum;
+}
+
/* Store the address of the place in which to copy the structure the
subroutine will return. This is called from call_function.
@@ -2340,6 +2366,7 @@ rs6000_gdbarch_init (struct gdbarch_info
rs6000_frameless_function_invocation);
set_gdbarch_frame_chain (gdbarch, rs6000_frame_chain);
set_gdbarch_frame_saved_pc (gdbarch, rs6000_frame_saved_pc);
+ set_gdbarch_stab_reg_to_regnum (gdbarch, rs6000_stab_reg_to_regnum);
set_gdbarch_frame_init_saved_regs (gdbarch, rs6000_frame_init_saved_regs);
set_gdbarch_init_extra_frame_info (gdbarch, rs6000_init_extra_frame_info);
Index: config/rs6000/tm-rs6000.h
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/tm-rs6000.h,v
retrieving revision 1.13
diff -u -p -r1.13 tm-rs6000.h
--- tm-rs6000.h 2001/05/01 19:36:11 1.13
+++ tm-rs6000.h 2001/11/30 20:58:58
@@ -86,10 +86,6 @@ extern void aix_process_linenos (void);
#define FIRST_UISA_SP_REGNUM 64 /* first special register number */
#define LAST_UISA_SP_REGNUM 70 /* last special register number */
-/* convert a dbx stab register number (from `r' declaration) to a gdb REGNUM */
-
-#define STAB_REG_TO_REGNUM(value) (value)
-
/* Define other aspects of the stack frame. */
#define INIT_FRAME_PC_FIRST(fromleaf, prev) \
next prev parent reply other threads:[~2001-11-30 13:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-30 9:35 Elena Zannoni
2001-11-22 1:18 ` Elena Zannoni
2001-11-22 4:32 ` Andrew Cagney
2001-11-30 10:16 ` Andrew Cagney
2001-11-30 13:08 ` Elena Zannoni [this message]
2001-11-24 6:47 ` Elena Zannoni
2001-11-30 13:36 ` Daniel Jacobowitz
2001-11-24 11:03 ` Daniel Jacobowitz
2001-12-05 13:58 ` Kevin Buettner
2001-12-05 14:25 ` Elena Zannoni
2001-12-05 14:30 ` Daniel Jacobowitz
2001-12-05 14:34 ` Elena Zannoni
2001-12-05 14:53 ` Kevin Buettner
2001-12-05 14:57 ` Elena Zannoni
2001-11-30 9:53 ` Daniel Jacobowitz
2001-11-22 3:39 ` Daniel Jacobowitz
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=15367.63139.561172.481628@krustylu.cygnus.com \
--to=ezannoni@cygnus.com \
--cc=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
--cc=vmakarov@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