From 5b6074611edfdd1590e8da1ca443950b47942bbb Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 20 Nov 2021 08:40:12 -0500 Subject: 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 --- gdb/mi/mi-symbol-cmds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/mi') diff --git a/gdb/mi/mi-symbol-cmds.c b/gdb/mi/mi-symbol-cmds.c index 2177354..2078ab8 100644 --- a/gdb/mi/mi-symbol-cmds.c +++ b/gdb/mi/mi-symbol-cmds.c @@ -53,12 +53,12 @@ mi_cmd_symbol_list_lines (const char *command, char **argv, int argc) gdbarch = SYMTAB_OBJFILE (s)->arch (); ui_out_emit_list list_emitter (uiout, "lines"); - if (SYMTAB_LINETABLE (s) != NULL && SYMTAB_LINETABLE (s)->nitems > 0) - for (i = 0; i < SYMTAB_LINETABLE (s)->nitems; i++) + if (s->linetable () != NULL && s->linetable ()->nitems > 0) + for (i = 0; i < s->linetable ()->nitems; i++) { ui_out_emit_tuple tuple_emitter (uiout, NULL); - uiout->field_core_addr ("pc", gdbarch, SYMTAB_LINETABLE (s)->item[i].pc); - uiout->field_signed ("line", SYMTAB_LINETABLE (s)->item[i].line); + uiout->field_core_addr ("pc", gdbarch, s->linetable ()->item[i].pc); + uiout->field_signed ("line", s->linetable ()->item[i].line); } } -- cgit v1.1