summaryrefslogtreecommitdiff
path: root/gdb/frame.h
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-05-07 23:19:14 +0000
committerMark Kettenis <kettenis@gnu.org>2004-05-07 23:19:14 +0000
commit666eab2553219b2832caf2995cdd8a0e65282840 (patch)
treee4be2cde6c869f66b37c601818b1073aa3747f4e /gdb/frame.h
parent49a61d011537d5aa339b49a00996be3790e6d538 (diff)
downloadgdb-666eab2553219b2832caf2995cdd8a0e65282840.tar.gz
* frame.c (get_prev_frame_1): Work around GCC bug.
* frame.h: Add comment about GCC bug.
Diffstat (limited to 'gdb/frame.h')
-rw-r--r--gdb/frame.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/gdb/frame.h b/gdb/frame.h
index 2ab8b8edf6b..55d357cf14d 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -310,7 +310,22 @@ extern CORE_ADDR get_frame_base (struct frame_info *);
/* Return the per-frame unique identifer. Can be used to relocate a
frame after a frame cache flush (and other similar operations). If
- FI is NULL, return the null_frame_id. */
+ FI is NULL, return the null_frame_id.
+
+ NOTE: kettenis/20040508: These functions return a structure. On
+ platforms where structures are returned in static storage (vax,
+ m68k), this may trigger compiler bugs in code like:
+
+ if (frame_id_eq (get_frame_id (l), get_frame_id (r)))
+
+ where the return value from the first get_frame_id (l) gets
+ overwritten by the second get_frame_id (r). Please avoid writing
+ code like this. Use code like:
+
+ struct frame_id id = get_frame_id (l);
+ if (frame_id_eq (id, get_frame_id (r)))
+
+ instead, since that avoids the bug. */
extern struct frame_id get_frame_id (struct frame_info *fi);
extern struct frame_id frame_unwind_id (struct frame_info *next_frame);