> Both are supposed to happen.  I can't really debug this without a
> test case.  This works on ia64, which is a non-dwarf-unwind target,
> so that in-and-of itself isn't the problem.

This is from the gdb.base testsuite:

int factorial (int value)
{
  if (value > 1) {  /* set breakpoint 7 here */
    value *= factorial (value - 1);
  }
  return (value); /* set breakpoint 19 here */
}

./cc1 -quiet -gdwarf-2 -fomit-frame-pointer dj.c -o dj.s
v850-elf-gcc -c dj.s
v850-elf-readelf -wio dj.o
v850-elf-objdump -d dj.o

 <1><60>: Abbrev Number: 2 (DW_TAG_subprogram)
     . . .
     DW_AT_frame_base  : 1 byte block: 53       (DW_OP_reg3)
 <2><81>: Abbrev Number: 3 (DW_TAG_formal_parameter)
     . . .
     DW_AT_location    : 2 byte block: 91 0     (DW_OP_fbreg: 0)

Which indicates the parameter is at 0[sp].  However...

00000000 <_factorial>:
   0:   03 1e ec ff     addi    -20, sp, sp
   4:   63 ff 11 00     st.w    lp, 16[sp]
   8:   63 37 15 00     st.w    r6, 20[sp]
   c:   23 57 15 00     ld.w    20[sp],r10
  10:   61 52           cmp     1, r10

...the parameter is *really* in 20[sp].

Reply via email to