PR symtab/17559
authorDoug Evans <xdje42@gmail.com>
Sat, 15 Nov 2014 18:08:34 +0000 (10:08 -0800)
committerDoug Evans <xdje42@gmail.com>
Sat, 15 Nov 2014 18:08:34 +0000 (10:08 -0800)
commit34248c3af73049fe1f8b7a4b9eb7ae09f42eed95
tree4ee18ab40e0acfad0e4524ba74c58005394b8752
parent2097ae2584c1018a7a58d93d9edd7f6d1d9654c8
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.
13 files changed:
gdb/ChangeLog
gdb/disasm.c
gdb/symtab.c
gdb/symtab.h
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/line-symtabs.c [new file with mode: 0644]
gdb/testsuite/gdb.base/line-symtabs.exp [new file with mode: 0644]
gdb/testsuite/gdb.base/line-symtabs.h [new file with mode: 0644]
gdb/tui/tui-disasm.c
gdb/tui/tui-hooks.c
gdb/tui/tui-source.c
gdb/tui/tui-win.c
gdb/tui/tui-winsource.c