diff options
author | Doug Evans <xdje42@gmail.com> | 2014-11-15 10:08:34 -0800 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2014-11-15 10:08:34 -0800 |
commit | 34248c3af73049fe1f8b7a4b9eb7ae09f42eed95 (patch) | |
tree | 4ee18ab40e0acfad0e4524ba74c58005394b8752 /gdb/tui | |
parent | 2097ae2584c1018a7a58d93d9edd7f6d1d9654c8 (diff) | |
download | gdb-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/tui')
-rw-r--r-- | gdb/tui/tui-disasm.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-hooks.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-source.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-win.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-winsource.c | 10 |
5 files changed, 9 insertions, 9 deletions
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index 1c89a14..88b14de 100644 --- a/gdb/tui/tui-disasm.c +++ b/gdb/tui/tui-disasm.c @@ -275,7 +275,7 @@ tui_set_disassem_content (struct gdbarch *gdbarch, CORE_ADDR pc) void tui_show_disassem (struct gdbarch *gdbarch, CORE_ADDR start_addr) { - struct symtab *s = find_pc_symtab (start_addr); + struct symtab *s = find_pc_line_symtab (start_addr); struct tui_win_info *win_with_focus = tui_win_with_focus (); struct tui_line_or_address val; diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c index 7db392a..4c6e450 100644 --- a/gdb/tui/tui-hooks.c +++ b/gdb/tui/tui-hooks.c @@ -202,7 +202,7 @@ tui_selected_frame_level_changed_hook (int level) { struct symtab *s; - s = find_pc_symtab (pc); + s = find_pc_line_symtab (pc); /* elz: This if here fixes the problem with the pc not being displayed in the tui asm layout, with no debug symbols. The value of s would be 0 here, and select_source_symtab would diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c index 7aceaa8..9842bb3 100644 --- a/gdb/tui/tui-source.c +++ b/gdb/tui/tui-source.c @@ -357,7 +357,7 @@ tui_vertical_source_scroll (enum tui_scroll_direction scroll_direction, struct symtab_and_line cursal = get_current_source_symtab_and_line (); if (cursal.symtab == (struct symtab *) NULL) - s = find_pc_symtab (get_frame_pc (get_selected_frame (NULL))); + s = find_pc_line_symtab (get_frame_pc (get_selected_frame (NULL))); else s = cursal.symtab; diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 9c7a23f..d17a1e4 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -1386,7 +1386,7 @@ make_visible_with_new_height (struct tui_win_info *win_info) struct frame_info *frame = deprecated_safe_get_selected_frame (); struct gdbarch *gdbarch = get_frame_arch (frame); - s = find_pc_symtab (get_frame_pc (frame)); + s = find_pc_line_symtab (get_frame_pc (frame)); if (win_info->generic.type == SRC_WIN) { line.loa = LOA_LINE; diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 171b171..48a95e4 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -51,12 +51,12 @@ tui_display_main (void) tui_get_begin_asm_address (&gdbarch, &addr); if (addr != (CORE_ADDR) 0) { - struct symtab_and_line sal; + struct symtab *s; tui_update_source_windows_with_addr (gdbarch, addr); - sal = find_pc_line (addr, 0); - if (sal.symtab) - tui_update_locator_fullname (symtab_to_fullname (sal.symtab)); + s = find_pc_line_symtab (addr); + if (s != NULL) + tui_update_locator_fullname (symtab_to_fullname (s)); else tui_update_locator_fullname ("??"); } @@ -331,7 +331,7 @@ tui_horizontal_source_scroll (struct tui_win_info *win_info, = get_current_source_symtab_and_line (); if (cursal.symtab == NULL) - s = find_pc_symtab (get_frame_pc (get_selected_frame (NULL))); + s = find_pc_line_symtab (get_frame_pc (get_selected_frame (NULL))); else s = cursal.symtab; } |