gcc (GCC) 4.5.0 20100117 (experimental)
x86_64-unknown-linux-gnu running -m32
Reproduced on Fedora 12: gcc-4.4.2-20.fc12.x86_64
--------------------------------------------------------------------------------
extern void g (void);

int
f (int a)
{
  g ();

  return a;
}
--------------------------------------------------------------------------------
gcc -o 1.o -c -Wall 1.c -m32 -O1 -g -Wall
--------------------------------------------------------------------------------
   0:   55                      push   %ebp
   1:   89 e5                   mov    %esp,%ebp
   3:   83 ec 08                sub    $0x8,%esp
   6:   e8 fc ff ff ff          call   7 <f+0x7>
   b:   8b 45 08                mov    0x8(%ebp),%eax
   e:   c9                      leave  
   f:   c3                      ret    
--------------------------------------------------------------------------------
Contents of the .debug_info section:
 <2><40>: Abbrev Number: 3 (DW_TAG_formal_parameter)
    <41>   DW_AT_name        : a        
    <49>   DW_AT_location    : 0x38     (location list)

Contents of the .debug_loc section:
    Offset   Begin    End      Expression
    00000038 00000000 0000000a (DW_OP_fbreg: 0)
    00000038 <End of list>
--------------------------------------------------------------------------------
Offsets 0xb .. 0xf miss the A location.
The function must know it when it returns A.
--------------------------------------------------------------------------------
Practical impact:
Backtrace missed parameters of elf_lookup_lib_symbol() in:
https://bugzilla.redhat.com/show_bug.cgi?id=556310


-- 
           Summary: VTA missed location: parameter via stack
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jan dot kratochvil at redhat dot com
GCC target triplet: i386-unknown-linux-gnu


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

Reply via email to