This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug sim/19401] New: AVR: simulator fails with illegal instruction when function call present as argument


https://sourceware.org/bugzilla/show_bug.cgi?id=19401

            Bug ID: 19401
           Summary: AVR: simulator fails with illegal instruction when
                    function call present as argument
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: sim
          Assignee: unassigned at sourceware dot org
          Reporter: s.pitchumani at gmail dot com
                CC: vapier at gentoo dot org
  Target Milestone: ---

Debugging with avr-gdb, internal simulator as target.
Following test fails with illegal instruction when step-over function call
statement (Program terminated with signal SIGILL, Illegal instruction).

int volatile a = 23;
int bar ()
{
  return a--;
}
void foo(int i)
{
  a -= i;
}

int main()
{
  foo (bar());
  return 0;
}

steps to re-produce the issue:
1. avr-gcc test.c -mmcu=atmega2560 -g -O1 -o test.elf
2. avr-gdb --args test.elf
   - target sim
   - load
   - b main
   - next

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]