[Dwarf-discuss] dwarf ver3.0: prologue_end and epilogue_begin bits

David Anderson davea42@earthlink.net
Tue May 22 16:17:05 GMT 2007


Ramanaiah Nalamothu wrote:

>    str R4,[R13,#0]
>    mov R4,#10
>    str R4,[R13,#+4]
>    bl _bar
>    .dbline -2                                                 # INDICATES
> EPILOGUE_BEGIN #
> L13:
>    ldmfd R11,{R4,R5,R6,R7,R11,SP,R15}
>    .dbline 0 ; func end                                   # FUNCTION BODY
> END. BUT 0 IS NOT AN VALID SOURCE LINE NUMBER #


There is a problem with the above epilogue hints, I think.
The debugger has two responsibilities if
the user wants to set a breakpoint just before function return (ie,
at epilogue begin).  The first is to know an address to set the 
breakpoint.  The second is  to know what
source line to display when the breakpoint is hit.

Well, .dbline -2 in some sense allows the assembler to know the first
  piece of info, but gives no clue about the second.

So the compiler is not telling the assembler enough.
I am just restating M. Eager's comment in longer form, I think:-)



The assembly information seems (to me) to be incomplete.
Offering no way to generate fully complete DWARF3 info.
If it's not possible to fix the compiler right now, you could
choose to give up setting certain line table flags you cannot
set correctly.     Whether the debugger will notice the omission
depends on the debugger!

David Anderson




More information about the Dwarf-discuss mailing list