aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile/scm-symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/guile/scm-symbol.c')
-rw-r--r--gdb/guile/scm-symbol.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/gdb/guile/scm-symbol.c b/gdb/guile/scm-symbol.c
index 8802706..8495ca5 100644
--- a/gdb/guile/scm-symbol.c
+++ b/gdb/guile/scm-symbol.c
@@ -582,16 +582,12 @@ gdbscm_lookup_symbol (SCM name_scm, SCM rest)
int block_arg_pos = -1, domain_arg_pos = -1;
struct field_of_this_result is_a_field_of_this;
struct symbol *symbol = NULL;
- struct cleanup *cleanups;
- struct gdb_exception except = exception_none;
gdbscm_parse_function_args (FUNC_NAME, SCM_ARG1, keywords, "s#Oi",
name_scm, &name, rest,
&block_arg_pos, &block_scm,
&domain_arg_pos, &domain);
- cleanups = make_cleanup (xfree, name);
-
if (block_arg_pos >= 0)
{
SCM except_scm;
@@ -600,7 +596,7 @@ gdbscm_lookup_symbol (SCM name_scm, SCM rest)
&except_scm);
if (block == NULL)
{
- do_cleanups (cleanups);
+ xfree (name);
gdbscm_throw (except_scm);
}
}
@@ -615,11 +611,13 @@ gdbscm_lookup_symbol (SCM name_scm, SCM rest)
}
CATCH (except, RETURN_MASK_ALL)
{
- GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS (except, cleanups);
+ xfree (name);
+ GDBSCM_HANDLE_GDB_EXCEPTION (except);
}
END_CATCH
}
+ struct gdb_exception except = exception_none;
TRY
{
symbol = lookup_symbol (name, block, (domain_enum) domain,
@@ -631,7 +629,7 @@ gdbscm_lookup_symbol (SCM name_scm, SCM rest)
}
END_CATCH
- do_cleanups (cleanups);
+ xfree (name);
GDBSCM_HANDLE_GDB_EXCEPTION (except);
if (symbol == NULL)
@@ -652,15 +650,12 @@ gdbscm_lookup_global_symbol (SCM name_scm, SCM rest)
int domain_arg_pos = -1;
int domain = VAR_DOMAIN;
struct symbol *symbol = NULL;
- struct cleanup *cleanups;
struct gdb_exception except = exception_none;
gdbscm_parse_function_args (FUNC_NAME, SCM_ARG1, keywords, "s#i",
name_scm, &name, rest,
&domain_arg_pos, &domain);
- cleanups = make_cleanup (xfree, name);
-
TRY
{
symbol = lookup_global_symbol (name, NULL, (domain_enum) domain).symbol;
@@ -671,7 +666,7 @@ gdbscm_lookup_global_symbol (SCM name_scm, SCM rest)
}
END_CATCH
- do_cleanups (cleanups);
+ xfree (name);
GDBSCM_HANDLE_GDB_EXCEPTION (except);
if (symbol == NULL)