This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/16703] New: The program breaks at the next instruction when issuing a memory breakpoint on AVR8.
- From: "pierre.langlois at embecosm dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 14 Mar 2014 10:02:32 +0000
- Subject: [Bug breakpoints/16703] New: The program breaks at the next instruction when issuing a memory breakpoint on AVR8.
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16703
Bug ID: 16703
Summary: The program breaks at the next instruction when
issuing a memory breakpoint on AVR8.
Product: gdb
Version: 7.7
Status: NEW
Severity: normal
Priority: P2
Component: breakpoints
Assignee: unassigned at sourceware dot org
Reporter: pierre.langlois at embecosm dot com
Created attachment 7469
--> https://sourceware.org/bugzilla/attachment.cgi?id=7469&action=edit
Simple program ran on the ATxmega256a3b chip
When setting breakpoints on AVR, using gdb against the simulator models, using
the ATxmega256a3u, the program counter needs to be decremented after a
breakpoint is hit. This only happens with memory breakpoints.
------------------------------------------------------------------------------
GNU gdb (AVR 8-bit toolchain (built 20140310)) 7.7.50.20140313-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) set re[K[Kdebug remote 1
(gdb) target remote :51000
Remote debugging using :51000
0x0000020e in ?? ()
(gdb) file atxmega-test.elf
A program is being debugged already.
Are you sure you want to change the file? (y or n) Reading symbols from
atxmega-test.elf...done.
(gdb) load
Loading section .text, size 0x22e lma 0x0
Start address 0x0, load size 558
Transfer rate: 544 KB/sec, 186 bytes/write.
(gdb) monitor reset
(gdb) break main
Breakpoint 1 at 0x204: file main.c, line 7.
(gdb) continue
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00000206 in main () at main.c:7
7 PORTR.DIRSET = 3;
(gdb) break *(@code void *) 0x106
Breakpoint 2 at 0x20c: file main.c, line 8.
(gdb) continue
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
0x0000020e in main () at main.c:8
8 PORTR.OUTSET = 1;
(gdb) p/x $pc
$1 = 0x20e
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x00000204 in main at main.c:7
2 breakpoint keep y 0x0000020c in main at main.c:8
(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.