From: Andrew Cagney <ac131313@cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: [patch/rfc] Switch to generic_func_frame_chain_valid()
Date: Sat, 01 Jun 2002 15:20:00 -0000 [thread overview]
Message-ID: <3CF948A6.5020500@cygnus.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 251 bytes --]
Hello,
This finishes off (I think) the FRAME_CHAIN_VALID debate. It sets it to
generic_func_frame_chain_valid(). That function being tweaked to handle
both generic dummy frame and the old style frame cases.
I'll commit it in a few days.
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 3463 bytes --]
2002-06-01 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (FRAME_CHAIN_VALID): Set default to
generic_func_frame_chain_valid.
* gdbarch.h, gdbarch.c: Re-generate.
* blockframe.c (generic_func_frame_chain_valid): Only check
PC_IN_CALL_DUMMY when generic dummy frames. Don't worry about
passing FP to PC_IN_CALL_DUMMY.
Fix PR gdb/360.
Index: blockframe.c
===================================================================
RCS file: /cvs/src/src/gdb/blockframe.c,v
retrieving revision 1.28
diff -u -r1.28 blockframe.c
--- blockframe.c 1 Jun 2002 20:44:21 -0000 1.28
+++ blockframe.c 1 Jun 2002 22:11:11 -0000
@@ -1298,7 +1298,8 @@
int
generic_func_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
{
- if (PC_IN_CALL_DUMMY ((fi)->pc, fp, fp))
+ if (USE_GENERIC_DUMMY_FRAMES
+ && PC_IN_CALL_DUMMY ((fi)->pc, 0, 0))
return 1; /* don't prune CALL_DUMMY frames */
else /* fall back to default algorithm (see frame.h) */
return (fp != 0
Index: gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.129
diff -u -r1.129 gdbarch.c
--- gdbarch.c 29 May 2002 16:39:54 -0000 1.129
+++ gdbarch.c 1 Jun 2002 22:11:28 -0000
@@ -522,7 +522,7 @@
current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
current_gdbarch->frame_args_skip = -1;
current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
- current_gdbarch->frame_chain_valid = func_frame_chain_valid;
+ current_gdbarch->frame_chain_valid = generic_func_frame_chain_valid;
current_gdbarch->extra_stack_alignment_needed = 1;
current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
current_gdbarch->addr_bits_remove = core_addr_identity;
Index: gdbarch.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.96
diff -u -r1.96 gdbarch.h
--- gdbarch.h 29 May 2002 01:51:16 -0000 1.96
+++ gdbarch.h 1 Jun 2002 22:12:33 -0000
@@ -1888,7 +1887,7 @@
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID)
-#define FRAME_CHAIN_VALID(chain, thisframe) (func_frame_chain_valid (chain, thisframe))
+#define FRAME_CHAIN_VALID(chain, thisframe) (generic_func_frame_chain_valid (chain, thisframe))
#endif
typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.140
diff -u -r1.140 gdbarch.sh
--- gdbarch.sh 29 May 2002 16:39:55 -0000 1.140
+++ gdbarch.sh 1 Jun 2002 22:12:37 -0000
@@ -567,7 +567,7 @@
# XXXX - both default and alternate frame_chain_valid functions are
# deprecated. New code should use dummy frames and one of the generic
# functions.
-f:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe:::func_frame_chain_valid::0
+f:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe:::generic_func_frame_chain_valid::0
f:2:FRAME_SAVED_PC:CORE_ADDR:frame_saved_pc:struct frame_info *fi:fi::0:0
f:2:FRAME_ARGS_ADDRESS:CORE_ADDR:frame_args_address:struct frame_info *fi:fi::0:0
f:2:FRAME_LOCALS_ADDRESS:CORE_ADDR:frame_locals_address:struct frame_info *fi:fi::0:0
next reply other threads:[~2002-06-01 22:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-01 15:20 Andrew Cagney [this message]
2002-06-02 10:18 ` Daniel Jacobowitz
2002-06-03 6:29 ` Andrew Cagney
2002-06-03 11:05 ` Michael Snyder
2002-06-03 11:13 ` Daniel Jacobowitz
2002-06-03 11:49 ` Andrew Cagney
2002-06-03 12:11 ` Daniel Jacobowitz
2002-06-08 11:35 ` 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=3CF948A6.5020500@cygnus.com \
--to=ac131313@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