This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix PR 17559: confusion over result of find_pc_line
- From: Doug Evans <xdje42 at gmail dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Sat, 15 Nov 2014 10:12:55 -0800
- Subject: Re: [PATCH] Fix PR 17559: confusion over result of find_pc_line
- Authentication-results: sourceware.org; auth=none
- References: <m3r3xb29md dot fsf at sspiff dot org>
On Sun, Nov 9, 2014 at 4:16 PM, Doug Evans <xdje42@gmail.com> wrote:
> Hi.
>
> This patch fixes pr 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) ?
> [btw, I have a big data structure reorg patch in my sandbox to fix this]
>
> gdb_disassembly wants the symtab that contains the line table
> but is instead getting the primary symtab.
>
> Regression tested on amd64-linux.
>
> 2014-11-09 Doug Evans <xdje42@gmail.com>
>
> 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.
>
> testsuite/
> * gdb.base/line-symtabs.exp: New file.
> * gdb.base/line-symtabs.c: New file.
> * gdb.base/line-symtabs.h: New file.
Committed.
[I added copyright headers to line-symtabs.[ch].]