diff options
Diffstat (limited to 'gdb/scm-lang.c')
-rw-r--r-- | gdb/scm-lang.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c index 00d6797..318a51d 100644 --- a/gdb/scm-lang.c +++ b/gdb/scm-lang.c @@ -29,6 +29,7 @@ #include "c-lang.h" #include "scm-lang.h" #include "scm-tags.h" +#include "source.h" #include "gdb_string.h" #include "gdbcore.h" @@ -133,9 +134,12 @@ scm_unpack (struct type *type, char *valaddr, enum type_code context) static int in_eval_c (void) { - if (current_source_symtab && current_source_symtab->filename) + struct symtab_and_line cursal = + get_current_or_default_source_symtab_and_line (); + + if (cursal.symtab && cursal.symtab->filename) { - char *filename = current_source_symtab->filename; + char *filename = cursal.symtab->filename; int len = strlen (filename); if (len >= 6 && strcmp (filename + len - 6, "eval.c") == 0) return 1; |