aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 75f1c3d..63a85ee 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -4056,15 +4056,14 @@ static struct value *
ada_read_renaming_var_value (struct symbol *renaming_sym,
struct block *block)
{
- char *sym_name;
+ const char *sym_name;
struct expression *expr;
struct value *value;
struct cleanup *old_chain = NULL;
- sym_name = xstrdup (SYMBOL_LINKAGE_NAME (renaming_sym));
- old_chain = make_cleanup (xfree, sym_name);
+ sym_name = SYMBOL_LINKAGE_NAME (renaming_sym);
expr = parse_exp_1 (&sym_name, 0, block, 0);
- make_cleanup (free_current_contents, &expr);
+ old_chain = make_cleanup (free_current_contents, &expr);
value = evaluate_expression (expr);
do_cleanups (old_chain);
@@ -11385,7 +11384,7 @@ create_excep_cond_exprs (struct ada_catchpoint *c)
if (!bl->shlib_disabled)
{
volatile struct gdb_exception e;
- char *s;
+ const char *s;
s = cond_string;
TRY_CATCH (e, RETURN_MASK_ERROR)