This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] skip_prologue_using_sal: early exit if assembler


On Tue, Sep 2, 2014 at 5:15 PM, Doug Evans <dje@google.com> wrote:
> Hi.
>
> This patch is part of the discussion I started here:
> https://sourceware.org/ml/gdb-patches/2014-08/msg00539.html
>
> The prologue parsing aspect of that discussion is submitted
> as a patch here:
> https://sourceware.org/ml/gdb-patches/2014-09/msg00079.html
>
> This patch fixes a few failures when tested with clang,
> e.g. amd64-disp-step.exp.  There's no point in trying to
> use source line info to parse prologues in assembler code.
>
> Regression tested on amd64, i386, aarch64, ppc64 [all linux].
>
> Note: Most of the patch is due to re-indentation.
>
> 2014-09-02  Doug Evans  <dje@google.com>
>
>         * symtab.c (skip_prologue_using_sal): Return zero if called for
>         assembler code.

btw, I think a case can be made to return func_addr here instead of zero.
IOW define things such that if we know we're in assembler there
is never any prologue (for symtab-and-line based prologue skipping).
If the caller wants to be "clever" for assembler they can do so.

And if ever someone wants symtab-and-line based prologue skipping
for assembler to detect and skip a prologue then
implement support for DW_LNS_set_prologue_end.
[And if a non-DWARF debug format doesn't support its equivalent, punt.]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]