diff options
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r-- | gdb/mdebugread.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 6fd3b09..13dc789 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -4065,7 +4065,10 @@ mdebug_expand_psymtab (legacy_psymtab *pst, struct objfile *objfile) psymtab_language = cust->primary_filetab ()->language (); - lines = cust->primary_filetab ()->linetable (); + /* This code allocates the line table on the heap and then later + copies it to the obstack. So, while casting away const here + is ugly, it's not incorrect. */ + lines = const_cast<linetable *> (cust->primary_filetab ()->linetable ()); /* Get a new lexical context. */ |