diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-11-20 08:40:12 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-02-06 15:48:19 -0500 |
commit | 5b6074611edfdd1590e8da1ca443950b47942bbb (patch) | |
tree | a8bd20dacac08b7c4d6ddfe627474e33fe36fb71 /gdb/disasm.c | |
parent | c61596525811d9b0fe79be8f11e5a142ade96dab (diff) | |
download | gdb-5b6074611edfdd1590e8da1ca443950b47942bbb.zip gdb-5b6074611edfdd1590e8da1ca443950b47942bbb.tar.gz gdb-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/disasm.c')
-rw-r--r-- | gdb/disasm.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/disasm.c b/gdb/disasm.c index 5cd1f5a..bfccbfc 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -393,10 +393,10 @@ do_mixed_source_and_assembly_deprecated int num_displayed = 0; print_source_lines_flags psl_flags = 0; - gdb_assert (symtab != NULL && SYMTAB_LINETABLE (symtab) != NULL); + gdb_assert (symtab != nullptr && symtab->linetable () != nullptr); - nlines = SYMTAB_LINETABLE (symtab)->nitems; - le = SYMTAB_LINETABLE (symtab)->item; + nlines = symtab->linetable ()->nitems; + le = symtab->linetable ()->item; if (flags & DISASSEMBLY_FILENAME) psl_flags |= PRINT_SOURCE_LINES_FILENAME; @@ -535,7 +535,7 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct symtab *last_symtab; int last_line; - gdb_assert (main_symtab != NULL && SYMTAB_LINETABLE (main_symtab) != NULL); + gdb_assert (main_symtab != NULL && main_symtab->linetable () != NULL); /* First pass: collect the list of all source files and lines. We do this so that we can only print lines containing code once. @@ -553,8 +553,8 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch, line after the opening brace. We still want to print this opening brace. first_le is used to implement this. */ - nlines = SYMTAB_LINETABLE (main_symtab)->nitems; - le = SYMTAB_LINETABLE (main_symtab)->item; + nlines = main_symtab->linetable ()->nitems; + le = main_symtab->linetable ()->item; first_le = NULL; /* Skip all the preceding functions. */ @@ -850,8 +850,8 @@ gdb_disassembly (struct gdbarch *gdbarch, struct ui_out *uiout, /* Assume symtab is valid for whole PC range. */ symtab = find_pc_line_symtab (low); - if (symtab != NULL && SYMTAB_LINETABLE (symtab) != NULL) - nlines = SYMTAB_LINETABLE (symtab)->nitems; + if (symtab != NULL && symtab->linetable () != NULL) + nlines = symtab->linetable ()->nitems; if (!(flags & (DISASSEMBLY_SOURCE_DEPRECATED | DISASSEMBLY_SOURCE)) || nlines <= 0) |