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

Michael Eager eager@eagercon.com
Fri May 11 15:19:34 GMT 2007


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
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077




More information about the Dwarf-discuss mailing list