aboutsummaryrefslogtreecommitdiff
path: root/gdb/record-btrace.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-07 18:16:29 -0700
committerTom Tromey <tom@tromey.com>2023-03-11 08:48:10 -0700
commit977a0c161de83a5e5397f9f7950d58173c4b4be2 (patch)
tree5264db12f959dba8dfddaac35b4008ee02a4253a /gdb/record-btrace.c
parent1acc9dca423f78e44553928f0de839b618c13766 (diff)
downloadgdb-977a0c161de83a5e5397f9f7950d58173c4b4be2.zip
gdb-977a0c161de83a5e5397f9f7950d58173c4b4be2.tar.gz
gdb-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/record-btrace.c')
-rw-r--r--gdb/record-btrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 55fe25e..5b6e33f 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -705,8 +705,8 @@ static struct btrace_line_range
btrace_find_line_range (CORE_ADDR pc)
{
struct btrace_line_range range;
- struct linetable_entry *lines;
- struct linetable *ltable;
+ const linetable_entry *lines;
+ const linetable *ltable;
struct symtab *symtab;
int nlines, i;