http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55794

--- Comment #4 from Cary Coutant <ccoutant at gcc dot gnu.org> ---
> On hppa64-hp-hpux11.11, I don't see any debug information at all unless
> I add "-g" to compile options.

The dg-options line adds -g2 -dA to the compile options.

In the assembly output you posted, the two thunks don't have any line number
info at all:

    .globl    _ZThn16_N1CD1Ev
    .type    _ZThn16_N1CD1Ev, @function
_ZThn16_N1CD1Ev:
    .PROC
    .CALLINFO FRAME=0,NO_CALLS
    .ENTRY
    b _ZN1CD2Ev
    ldo -16(%r26),%r26
    .EXIT
    .PROCEND
    .size    _ZThn16_N1CD1Ev, .-_ZThn16_N1CD1Ev

    .globl    _ZThn16_N1CD0Ev
    .type    _ZThn16_N1CD0Ev, @function
_ZThn16_N1CD0Ev:
    .PROC
    .CALLINFO FRAME=0,NO_CALLS
    .ENTRY
    b _ZN1CD0Ev
    ldo -16(%r26),%r26
    .EXIT
    .PROCEND
    .size    _ZThn16_N1CD0Ev, .-_ZThn16_N1CD0Ev

The patch that this test case was part of was supposed to fix that problem by
adding a call to debug_hooks->source_line from assemble_thunk.

Either the PA code generator doesn't go through assemble_thunk when generating
these thunks, or the call to debug_hooks->source_line is being ignored. Richard
Henderson expressed some concerns here:

http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00312.html

I convinced him that the patch was OK, but perhaps he was right, and something
more is needed for PA.

Reply via email to