aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-11-15 10:08:34 -0800
committerDoug Evans <xdje42@gmail.com>2014-11-15 10:08:34 -0800
commit34248c3af73049fe1f8b7a4b9eb7ae09f42eed95 (patch)
tree4ee18ab40e0acfad0e4524ba74c58005394b8752 /gdb/symtab.h
parent2097ae2584c1018a7a58d93d9edd7f6d1d9654c8 (diff)
downloadgdb-34248c3af73049fe1f8b7a4b9eb7ae09f42eed95.zip
gdb-34248c3af73049fe1f8b7a4b9eb7ae09f42eed95.tar.gz
gdb-34248c3af73049fe1f8b7a4b9eb7ae09f42eed95.tar.bz2
PR symtab/17559
Basically the problem is that "symtab" is ambiguous. Is it the primary symtab (where we canonically think of blockvectors as being stored) or is it for a specific file (where each file's line table is stored) ? gdb_disassembly wants the symtab that contains the line table but is instead getting the primary symtab. gdb/ChangeLog: PR symtab/17559 * symtab.c (find_pc_line_symtab): New function. * symtab.h (find_pc_line_symtab): Declare. * disasm.c (gdb_disassembly): Call find_pc_line_symtab instead of find_pc_symtab. * tui/tui-disasm.c (tui_set_disassem_content): Ditto. * tui/tui-hooks.c (tui_selected_frame_level_changed_hook): Ditto. * tui/tui-source.c (tui_vertical_source_scroll): Ditto. * tui/tui-win.c (make_visible_with_new_height): Ditto. * tui/tui-winsource.c (tui_horizontal_source_scroll): Ditto. (tui_display_main): Call find_pc_line_symtab instead of find_pc_line. gdb/testsuite/ChangeLog: PR symtab/17559 * gdb.base/line-symtabs.exp: New file. * gdb.base/line-symtabs.c: New file. * gdb.base/line-symtabs.h: New file.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index d69fbcf..257d3be 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1271,6 +1271,10 @@ extern struct symtab_and_line find_pc_line (CORE_ADDR, int);
extern struct symtab_and_line find_pc_sect_line (CORE_ADDR,
struct obj_section *, int);
+/* Wrapper around find_pc_line to just return the symtab. */
+
+extern struct symtab *find_pc_line_symtab (CORE_ADDR);
+
/* Given a symtab and line number, return the pc there. */
extern int find_line_pc (struct symtab *, int, CORE_ADDR *);