From: Andrew Cagney <cagney@gnu.org>
To: Joel Brobecker <brobecker@gnat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Fix build failure on AiX...
Date: Fri, 19 Mar 2004 00:09:00 -0000 [thread overview]
Message-ID: <4043EFDD.6070801@gnu.org> (raw)
In-Reply-To: <20040301200835.GL1051@gnat.com>
[-- Attachment #1: Type: text/plain, Size: 1494 bytes --]
> This is a following on the following change:
>
> http://sources.redhat.com/ml/gdb-patches/2004-03/msg00000.html
>
> GDB fails to build on AiX because we're trying to dereference an
> opaque structure (struct frame_info).
>
> I suggest the following patch to fix the build failure:
>
> * rs6000-tdep.c (rs6000_init_frame_pc_first): Fix compilation failure.
>
> OK to apply? (it may appear obvious to the usual maintainers, but the
> frame stuff still makes me nervous sometimes, especially the easy
> confusion with next, prev, inner most, etc...)
Bah! The check that this built must have got lost between my machines.
I've checked in the attached.
Andrew
> Index: rs6000-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
> retrieving revision 1.182
> diff -u -p -r1.182 rs6000-tdep.c
> --- rs6000-tdep.c 1 Mar 2004 00:50:56 -0000 1.182
> +++ rs6000-tdep.c 1 Mar 2004 20:02:05 -0000
> @@ -213,8 +213,10 @@ rs6000_frame_init_saved_regs (struct fra
> static CORE_ADDR
> rs6000_init_frame_pc_first (int fromleaf, struct frame_info *prev)
> {
> - return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next)
> - : prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ());
> + struct frame_info* next = get_next_frame (prev);
> +
> + return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (next)
> + : next ? DEPRECATED_FRAME_SAVED_PC (next) : read_pc ());
> }
>
> static CORE_ADDR
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 910 bytes --]
2004-03-01 Andrew Cagney <cagney@redhat.com>
* rs6000-tdep.c (rs6000_init_frame_pc_first): Fix compiler error,
use frame_relative_level and get_next_frame.
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.182
diff -u -r1.182 rs6000-tdep.c
--- rs6000-tdep.c 1 Mar 2004 00:50:56 -0000 1.182
+++ rs6000-tdep.c 2 Mar 2004 02:17:30 -0000
@@ -213,8 +213,11 @@
static CORE_ADDR
rs6000_init_frame_pc_first (int fromleaf, struct frame_info *prev)
{
- return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next)
- : prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ());
+ return (fromleaf
+ ? DEPRECATED_SAVED_PC_AFTER_CALL (get_next_frame (prev))
+ : frame_relative_level (prev) > 0
+ ? DEPRECATED_FRAME_SAVED_PC (get_next_frame (prev))
+ : read_pc ());
}
static CORE_ADDR
WARNING: multiple messages have this Message-ID
From: Andrew Cagney <cagney@gnu.org>
To: Joel Brobecker <brobecker@gnat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Fix build failure on AiX...
Date: Tue, 02 Mar 2004 02:22:00 -0000 [thread overview]
Message-ID: <4043EFDD.6070801@gnu.org> (raw)
Message-ID: <20040302022200.nPRV3dd-uAhAqJPgZTLXOD6KOb8j9MxP75IoOymRNnA@z> (raw)
In-Reply-To: <20040301200835.GL1051@gnat.com>
[-- Attachment #1: Type: text/plain, Size: 1494 bytes --]
> This is a following on the following change:
>
> http://sources.redhat.com/ml/gdb-patches/2004-03/msg00000.html
>
> GDB fails to build on AiX because we're trying to dereference an
> opaque structure (struct frame_info).
>
> I suggest the following patch to fix the build failure:
>
> * rs6000-tdep.c (rs6000_init_frame_pc_first): Fix compilation failure.
>
> OK to apply? (it may appear obvious to the usual maintainers, but the
> frame stuff still makes me nervous sometimes, especially the easy
> confusion with next, prev, inner most, etc...)
Bah! The check that this built must have got lost between my machines.
I've checked in the attached.
Andrew
> Index: rs6000-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
> retrieving revision 1.182
> diff -u -p -r1.182 rs6000-tdep.c
> --- rs6000-tdep.c 1 Mar 2004 00:50:56 -0000 1.182
> +++ rs6000-tdep.c 1 Mar 2004 20:02:05 -0000
> @@ -213,8 +213,10 @@ rs6000_frame_init_saved_regs (struct fra
> static CORE_ADDR
> rs6000_init_frame_pc_first (int fromleaf, struct frame_info *prev)
> {
> - return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next)
> - : prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ());
> + struct frame_info* next = get_next_frame (prev);
> +
> + return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (next)
> + : next ? DEPRECATED_FRAME_SAVED_PC (next) : read_pc ());
> }
>
> static CORE_ADDR
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 910 bytes --]
2004-03-01 Andrew Cagney <cagney@redhat.com>
* rs6000-tdep.c (rs6000_init_frame_pc_first): Fix compiler error,
use frame_relative_level and get_next_frame.
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.182
diff -u -r1.182 rs6000-tdep.c
--- rs6000-tdep.c 1 Mar 2004 00:50:56 -0000 1.182
+++ rs6000-tdep.c 2 Mar 2004 02:17:30 -0000
@@ -213,8 +213,11 @@
static CORE_ADDR
rs6000_init_frame_pc_first (int fromleaf, struct frame_info *prev)
{
- return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next)
- : prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ());
+ return (fromleaf
+ ? DEPRECATED_SAVED_PC_AFTER_CALL (get_next_frame (prev))
+ : frame_relative_level (prev) > 0
+ ? DEPRECATED_FRAME_SAVED_PC (get_next_frame (prev))
+ : read_pc ());
}
static CORE_ADDR
next prev parent reply other threads:[~2004-03-02 2:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-01 20:08 Joel Brobecker
2004-03-19 0:09 ` Joel Brobecker
2004-03-19 0:09 ` Andrew Cagney [this message]
2004-03-02 2:22 ` Andrew Cagney
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=4043EFDD.6070801@gnu.org \
--to=cagney@gnu.org \
--cc=brobecker@gnat.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