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

Ron Brender ron.brender@charter.net
Mon May 21 14:13:12 GMT 2007

I looks to me like the .dbgline 0 {or -1 or -2} entries are backdoor 
means to pass thru the prologue/epilogue locations. They indicate which 
instructions should have those flags set. Otherwise they have no effect 
whatsoever on the line numbers associated with any instructions. The 
line number address correlation should be unchanged by the presence or 
absence of such out-of-band operations.

Ramanaiah Nalamothu wrote:
> On 5/21/07, *Ron Brender* <ron.brender at charter.net 
> <mailto:ron.brender at charter.net>> wrote:
>     The prologue beginning and ending location are compiler code generation
>     artifacts that do not correlate usefully with line number. For example,
>     the same source might be input as
>          void foo (...) {...}
>     or
>          void
>          foo (
>              ...)
>          {
>              ...
>          }
>     The compiled code, hence the begin and end prologue addresses, will be
>     identical,
> how the both addresses will be same?? (see below assembly code)

If the source is the same except that the latter has extra newlines 
through in then how could the code, hence the prologue/epilogue 
locations, not be the same?

>     but the line numbers will vary. The "normal" line-address
>     correlation will naturally associate a line number with those same
>     instructions--unrelated to the fact that they are begin or
>     end prologue related; that is expected.
> but with what line numbers i need to associate them with?? As i told you 
> in my first mail -1, -2 and 0 are the special line numbers that my 
> compiler will generate. I can't propagate them because they are not 
> valid source line numbers.
> Here i am providing a sample source code and corresponding assembly 
> code. See my comments with # ......#.
> .dbgline -1, .dbgline -2 and .dbgline 0 represents prologue_end, 
> epilogue_begin and end of function or epilogue.

More information about the Dwarf-discuss mailing list