public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/44610]  New: VTA produces wrong variable location information
@ 2010-06-21 13:51 hariharans at picochip dot com
  2010-06-21 13:55 ` [Bug debug/44610] " hariharans at picochip dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: hariharans at picochip dot com @ 2010-06-21 13:51 UTC (permalink / raw)
  To: gcc-bugs

If i compile the attached testcase for picochip under -O2, i get the following
location information for variable arg0 in main.

.ascii 16#61# 16#72# 16#67# 16#30# 16#0#   ; arg0\0
.initByte 0x1
.initByte 0x2a
.unalignedInitLong 0x9e
.initByte 0xc
.initByte 0x5b
.initByte 0x93
        .uleb128 0x2
.initByte 0x5b
.initByte 0x93
        .uleb128 0x2
.initByte 0x5b
.initByte 0x93
        .uleb128 0x2
.initByte 0x5b
.initByte 0x93
        .uleb128 0x2
        .uleb128 0xc
.unalignedInitLong _picoMark_Ldebug_ranges0+0xc
        .uleb128 0xa

which my dwarflib reader translates to mean

      <0x42f> (19) Lexical Block:
        Address Ranges: [0x18, 0x8d) [0x94, 0x99)
        <0x434> (20) Data:
          Name: arg0
          Type: <0xe0>
          Is External: false
          Location: DW_OP_reg11 DW_OP_piece: 2 DW_OP_reg11 DW_OP_piece: 2
DW_OP_reg11 DW_OP_piece: 2 DW_OP_reg11 DW_OP_piece: 2

R11 obviously does not contain all 4 piece os this 8-byte variable (a register
is 16-bit in picochip). I have tried to see if this was bug 43982, but the
mainline as of 20Jun with fix for that bug still reproduces this problem. 

The problem with this is that it doesn't actually say variable value is not
present, which is generally okay with -O2. It just gives wrong value silently!
Can you have a look at this, please?

I will attach the source file and the assembly. Please ask me if you need any
other information.


-- 
           Summary: VTA produces wrong variable location information
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hariharans at picochip dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: picochip-unknown-none


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44610


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

end of thread, other threads:[~2010-06-25 21:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-21 13:51 [Bug debug/44610] New: VTA produces wrong variable location information hariharans at picochip dot com
2010-06-21 13:55 ` [Bug debug/44610] " hariharans at picochip dot com
2010-06-21 13:56 ` hariharans at picochip dot com
2010-06-21 13:59 ` hariharans at picochip dot com
2010-06-23  4:30 ` aoliva at gcc dot gnu dot org
2010-06-23  4:35 ` aoliva at gcc dot gnu dot org
2010-06-25 21:12 ` aoliva at gcc dot gnu dot org
2010-06-25 21:12 ` aoliva at gcc dot gnu dot org
2010-06-25 21:14 ` aoliva at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).