[Dwarf-discuss] dwarf - debug line number information program state machine registers

Michael Eager eager@eagercon.com
Mon May 14 15:01:27 GMT 2007


Ramanaiah Nalamothu wrote:
> So, basically an end_sequence tells the end of sequential instructions. 
> am I wrong??

That's correct.

> In that case,  the basic_block, tells start of new sequence, and 
> 'memory', tells the address, pair is enough to represent what 
> end_sequence tells.

Basic block indicates that an instruction is the start of a block.
It may or may not indicate the end of a previous instruction sequence.

> Again i am repeating, why we need or in what exact scenario we need to 
> use this end_sequence???

An end_sequence is used when one instruction sequence
is not followed by another instruction sequence.

> 
> Sorry, i am not convinced with the above answers/explanation. Please 
> help me, i need this urgent.
> 
> Thanks for your replies.
> 
> Regards,
> Ramana
> 
> On 5/11/07, *Michael Eager* <eager at eagercon.com 
> <mailto:eager at eagercon.com>> wrote:
> 
>     Daniel Jacobowitz wrote:
>      > On Fri, May 11, 2007 at 11:28:13AM +0530, Ramanaiah Nalamothu wrote:
>      >> The immediate instruction following .LM2 and .LM3 sets start of
>     the basic
>      >> block i.e. "basic_block". And that instructions' address flags
>     end of
>      >> sequence i.e. "end_sequence".
>      >
>      > That's not what end_sequence means.  It should be used for each
>      > segment of the line number table that is not contiguous.  Suppose you
>      > have a file containing one instruction; it should have a line table
>      > entry for that instruction, advance to after the instruction and have
>      > an end of sequence.  This ensures that random memory after that
>     object
>      > file in memory will not be associated with the same line.
> 
>     For another example, switch statements can be compiled into a jump
>     table:
> 
>           ld  r1,value      ; switch (value) {
>           shl r1,2
>           ld  r1,tbl(r1)
>           br  r1
>     tbl  .word   target0
>           .word   target1
>           .word   target2
>           ...
> 
>     There would be a end_sequence after the br instruction,
>     indicating that this is the end of the line with switch.
> 
> 
>     --
>     Michael Eager     eager at eagercon.com <mailto:eager at eagercon.com>
>     1960 Park Blvd., Palo Alto, CA 94306  650-325-8077
> 
> 


-- 
Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077




More information about the Dwarf-discuss mailing list