forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -410,13 +410,12 @@ gdb_disassembly (struct gdbarch *gdbarch, struct ui_out *uiout,
|
||||
struct ui_file *stb = mem_fileopen ();
|
||||
struct cleanup *cleanups = make_cleanup_ui_file_delete (stb);
|
||||
struct disassemble_info di = gdb_disassemble_info (gdbarch, stb);
|
||||
/* To collect the instruction outputted from opcodes. */
|
||||
struct symtab *symtab = NULL;
|
||||
struct symtab *symtab;
|
||||
struct linetable_entry *le = NULL;
|
||||
int nlines = -1;
|
||||
|
||||
/* Assume symtab is valid for whole PC range. */
|
||||
symtab = find_pc_symtab (low);
|
||||
symtab = find_pc_line_symtab (low);
|
||||
|
||||
if (symtab != NULL && symtab->linetable != NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user