aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-03-29 16:14:36 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-04-07 13:05:22 -0400
commit3c86fae3d99bf7b5360b810cc5b19522430ce39d (patch)
tree0e7ee506318e69330af2d7655826f7bf124001e0 /gdb/cli
parent44281e6c08cae11d4e116d87ea34ad391d58ae91 (diff)
downloadbinutils-3c86fae3d99bf7b5360b810cc5b19522430ce39d.zip
binutils-3c86fae3d99bf7b5360b810cc5b19522430ce39d.tar.gz
binutils-3c86fae3d99bf7b5360b810cc5b19522430ce39d.tar.bz2
gdb: remove symtab::objfile
Same idea as previous patch, but for symtab::objfile. I find it clearer without this wrapper, as it shows that the objfile is common to all symtabs of a given compunit. Otherwise, you could think that each symtab (of a given compunit) can have a specific objfile. Change-Id: Ifc0dbc7ec31a06eefa2787c921196949d5a6fcc6
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-cmds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 31b493e..424a874 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1007,7 +1007,7 @@ edit_command (const char *arg, int from_tty)
error (_("No source file for address %s."),
paddress (get_current_arch (), sal.pc));
- gdbarch = sal.symtab->objfile ()->arch ();
+ gdbarch = sal.symtab->compunit ()->objfile ()->arch ();
sym = find_pc_function (sal.pc);
if (sym)
gdb_printf ("%s is in %s (%s:%d).\n",
@@ -1346,7 +1346,7 @@ list_command (const char *arg, int from_tty)
error (_("No source file for address %s."),
paddress (get_current_arch (), sal.pc));
- gdbarch = sal.symtab->objfile ()->arch ();
+ gdbarch = sal.symtab->compunit ()->objfile ()->arch ();
sym = find_pc_function (sal.pc);
if (sym)
gdb_printf ("%s is in %s (%s:%d).\n",