aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile/scm-symbol.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-10-10 07:47:32 -0600
committerTom Tromey <tromey@adacore.com>2022-10-10 09:34:09 -0600
commit79aafec96b237165e66f14ba963214fb709af847 (patch)
treeb38868cefe0563786159983b7b6951a8c1817878 /gdb/guile/scm-symbol.c
parentc52ce603561128ca3b9bc626f27abd8cda09b4d6 (diff)
downloadgdb-79aafec96b237165e66f14ba963214fb709af847.zip
gdb-79aafec96b237165e66f14ba963214fb709af847.tar.gz
gdb-79aafec96b237165e66f14ba963214fb709af847.tar.bz2
Fix the guile build
The frame_info_ptr patches broke the build with Guile. This patch fixes the problem. In mos cases I chose to preserve the use of frame_info_ptr, at least where I could be sure that the object lifetime did not interact with Guile's longjmp-based exception scheme. Tested on x86-64 Fedora 34.
Diffstat (limited to 'gdb/guile/scm-symbol.c')
-rw-r--r--gdb/guile/scm-symbol.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/guile/scm-symbol.c b/gdb/guile/scm-symbol.c
index 4344a63..b5704cd 100644
--- a/gdb/guile/scm-symbol.c
+++ b/gdb/guile/scm-symbol.c
@@ -520,7 +520,6 @@ gdbscm_symbol_value (SCM self, SCM rest)
int frame_pos = -1;
SCM frame_scm = SCM_BOOL_F;
frame_smob *f_smob = NULL;
- struct frame_info *frame_info = NULL;
struct value *value = NULL;
gdbscm_parse_function_args (FUNC_NAME, SCM_ARG2, keywords, "#O",
@@ -537,9 +536,11 @@ gdbscm_symbol_value (SCM self, SCM rest)
gdbscm_gdb_exception exc {};
try
{
+ frame_info_ptr frame_info;
+
if (f_smob != NULL)
{
- frame_info = frscm_frame_smob_to_frame (f_smob);
+ frame_info = frame_info_ptr (frscm_frame_smob_to_frame (f_smob));
if (frame_info == NULL)
error (_("Invalid frame"));
}
@@ -598,12 +599,11 @@ gdbscm_lookup_symbol (SCM name_scm, SCM rest)
}
else
{
- struct frame_info *selected_frame;
-
gdbscm_gdb_exception exc {};
try
{
- selected_frame = get_selected_frame (_("no frame selected"));
+ frame_info_ptr selected_frame
+ = get_selected_frame (_("no frame selected"));
block = get_frame_block (selected_frame, NULL);
}
catch (const gdb_exception &ex)