Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Question about Dwarf2 for VLIW processor
@ 2007-11-07  6:17 wangjiong
  2007-11-07 19:17 ` Joel Brobecker
  0 siblings, 1 reply; 7+ messages in thread
From: wangjiong @ 2007-11-07  6:17 UTC (permalink / raw)
  To: gdb

Dear all:

        Suppose I have a c file example.c, the 15th line is " int i=1 "
 
        ...
        ...

        int i=1;    // the 15th line

        ...
        ...

       And this statement corresponds to two instruction groups, the first 
instruction group ranges from from 0x800003c5 to 0x800003ca and the second 
from 0x800003cb to 0x800003cf.

       But the dwarf2 information of the line range generated is:

         Special opcode 89: advance Address by 6 to 0x800003bd and Line by 
0 to 14
         Special opcode 6: advance Address by 0 to 0x800003bd and Line by 
1 to 15           ****
        Special opcode 117: advance Address by 8 to 0x800003c5 and Line by 
0 to 15         ****  These three lines should be compressed to one ???
        Special opcode 89: advance Address by 6 to 0x800003cb and Line by 
0 to 15          ****
        Special opcode 76: advance Address by 5 to 0x800003d0 and Line by 
1 to 16

      that is one line for each instruction group which should be one 
statement. 
 
      so gdb will think the statement "int i=1" is from 0x800003c5 to 
0x800003cb which should be 0x800003c5 to 0x800003cf.

      How should I handle this situation, wish your advice .
 

Wang Jiong 

  tel:2254


^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Question about Dwarf2 for VLIW processor
@ 2007-11-08  1:27 wangjiong
  2007-11-08  1:41 ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: wangjiong @ 2007-11-08  1:27 UTC (permalink / raw)
  To: gdb

Dear Joel:

        I am using GDB6.1.1

        GDB did not stop at the wrong location now, but I have see that 
the function:

        find_pc_line_pc_range (stop_pc, &step_range_start, 
&step_range_end) didn`t work correctly.

       when stop_pc is 0x8000035 the returned value of step_range_start 
and step_range_end is

        0x800003c5 and 0x800003cb

        but they should be

        0x800003c5 and 0x800003cf


        I have found all these are because there is something wrong with 
the Dwarf2 .debug_line section. 
        Now every instruction has a entry in this section, maybe it should 
be every c statement.

        Cause I can not modify compiler or assembler now, So I want to 
know How can I solve this problem
        just within GDB.

        Thanks.

Wang Jiong 

  tel:2254


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-11-08  2:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-07  6:17 Question about Dwarf2 for VLIW processor wangjiong
2007-11-07 19:17 ` Joel Brobecker
2007-11-08  1:25   ` wangjiong
2007-11-08  1:27 wangjiong
2007-11-08  1:41 ` Daniel Jacobowitz
2007-11-08  1:54   ` wangjiong
2007-11-08  2:12     ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox