diff options
author | Tom Tromey <tom@tromey.com> | 2023-03-07 18:16:29 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-03-11 08:48:10 -0700 |
commit | 977a0c161de83a5e5397f9f7950d58173c4b4be2 (patch) | |
tree | 5264db12f959dba8dfddaac35b4008ee02a4253a /gdb/disasm.c | |
parent | 1acc9dca423f78e44553928f0de839b618c13766 (diff) | |
download | binutils-977a0c161de83a5e5397f9f7950d58173c4b4be2.zip binutils-977a0c161de83a5e5397f9f7950d58173c4b4be2.tar.gz binutils-977a0c161de83a5e5397f9f7950d58173c4b4be2.tar.bz2 |
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>
Diffstat (limited to 'gdb/disasm.c')
-rw-r--r-- | gdb/disasm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/disasm.c b/gdb/disasm.c index 2acde04..71d3b97 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -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; |