aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2021-11-20 08:40:12 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-02-06 15:48:19 -0500
commit5b6074611edfdd1590e8da1ca443950b47942bbb (patch)
treea8bd20dacac08b7c4d6ddfe627474e33fe36fb71 /gdb/buildsym.c
parentc61596525811d9b0fe79be8f11e5a142ade96dab (diff)
downloadbinutils-5b6074611edfdd1590e8da1ca443950b47942bbb.zip
binutils-5b6074611edfdd1590e8da1ca443950b47942bbb.tar.gz
binutils-5b6074611edfdd1590e8da1ca443950b47942bbb.tar.bz2
gdb: remove SYMTAB_LINETABLE macro, add getter/setter
Add a getter and a setter for a symtab's linetable. Remove the corresponding macro and adjust all callers. Change-Id: I159183fc0ccd8e18ab937b3c2f09ef2244ec6e9c
Diffstat (limited to 'gdb/buildsym.c')
-rw-r--r--gdb/buildsym.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index b42c408..2a99a96 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -977,15 +977,13 @@ buildsym_compunit::end_symtab_with_blockvector (struct block *static_block,
if (subfile->line_vector)
{
/* Reallocate the line table on the symbol obstack. */
- SYMTAB_LINETABLE (symtab) = (struct linetable *)
- obstack_alloc (&m_objfile->objfile_obstack, linetablesize);
- memcpy (SYMTAB_LINETABLE (symtab), subfile->line_vector,
- linetablesize);
+ symtab->set_linetable
+ ((struct linetable *)
+ obstack_alloc (&m_objfile->objfile_obstack, linetablesize));
+ memcpy (symtab->linetable (), subfile->line_vector, linetablesize);
}
else
- {
- SYMTAB_LINETABLE (symtab) = NULL;
- }
+ symtab->set_linetable (nullptr);
/* Use whatever language we have been using for this
subfile, not the one that was deduced in allocate_symtab