Constify linetables

Linetables no longer change after they are created.  This patch
applies const to them.

Note there is one hack to cast away const in mdebugread.c.  This code
allocates a linetable using 'malloc', then later copies it to the
obstack.  While this could be cleaned up, I chose not to do so because
I have no way of testing it.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-03-07 18:16:29 -07:00
parent 1acc9dca42
commit 977a0c161d
10 changed files with 54 additions and 48 deletions

View File

@@ -573,7 +573,7 @@ do_mixed_source_and_assembly_deprecated
{
int newlines = 0;
int nlines;
struct linetable_entry *le;
const struct linetable_entry *le;
struct deprecated_dis_line_entry *mle;
struct symtab_and_line sal;
int i;