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 backtrace/16832] New: Erroneous backtrace on avrxmega architectures


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

            Bug ID: 16832
           Summary: Erroneous backtrace on avrxmega architectures
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: normal
          Priority: P2
         Component: backtrace
          Assignee: pierre.langlois at embecosm dot com
          Reporter: pierre.langlois at embecosm dot com
            Target: avr

Created attachment 7548
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7548&action=edit
Simple test program

Stack unwinding does not work properly for avrxmega architectures with more
than 128k of flash memory.

This is due to GDB not being aware of avrxmega architectures, and defaulting
having 2 bytes on the stack for the program counter when devices with more than
128k of memory store it in 3 bytes.

This GDB session was done with the axtenge256a3bu chip, debugged with AVaRice.

~~~
GNU gdb (AVR 8-bit toolchain (built 20140310)) 7.7.50.20140408-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=avr".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.atmel.com>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) file atxmega-test.elf 
Reading symbols from atxmega-test.elf...done.
(gdb) target remote :4242
Remote debugging using :4242
0x00000000 in __vectors ()
(gdb) b multiply 
Breakpoint 1 at 0x21a: file main.c, line 8.
(gdb) c
Continuing.
Note: automatically using hardware breakpoints for read-only addresses.

Breakpoint 1, multiply (a=3, b=6) at main.c:8
8      return a * b;
(gdb) bt
#0  multiply (a=3, b=6) at main.c:8
#1  0x0001f000 in ?? ()
(gdb) q
A debugging session is active.

    Inferior 1 [Remote target] will be killed.

Quit anyway? (y or n) 
~~~

-- 
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]