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: [RFC/RFA?] Should break FILE:LINENO skip prologue?


Hi Daniel,

> > 2008-01-09  Joel Brobecker  <brobecker@adacore.com>
> > 
> >         * breakpoint.c (skip_prologue_sal): New function.
> >         (resolve_sal_pc): Adjust SAL past prologue if the SAL was
> >         computed from a line number.
> 
> I tried to reread the thread below this patch, but eventually got
> lost.  What was the verdict?

As I said yesterday, the idea eventually got accepted by everyone.
Here is the patch again, together with the associated adjustments
to the testsuite.

2008-02-01  Joel Brobecker  <brobecker@adacore.com>

        * breakpoint.c (skip_prologue_sal): New function.
        (resolve_sal_pc): Adjust SAL past prologue if the SAL was
        computed from a line number.

2008-02-01  Joel Brobecker  <brobecker@adacore.com>

        * gdb.base/ending-run.exp: Use the first line of code inside
        function body to test breakpoints.
        * gdb.mi/mi-break.exp, gdb.mi/mi2-break.exp: Adjust the actual
        location where the breakpoint is inserted when using the line
        where a function is declared. Fix typo in the description of
        one of the tests.
        * gdb.mi/mi-simplerun.exp, gdb.mi/mi2-simplerun.exp: Likewise.

Tested on x86-linux.

In the first testcase, the adjustment I made was by avoiding the use
of the line where the function is declared or where the open curly
brace is.  By looking at the testcase, I think it still preserves
the intent of the testcase.  In the second case, I kept the breakpoints
where they are, but adjusted the expected output to reflect the new
behavior.

That leaves the documentation to be updated (and perhaps a NEWS entry?)

OK to apply?

Thanks,
-- 
Joel

Attachment: skip-prologue.diff
Description: Text document

Attachment: skip-prologue-tc.diff
Description: Text document


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