public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/12299] New: AVR ATMEGA128 Assembly Files lead to RAM Breakpoint Addr. 0x00800000++
@ 2010-12-08 18:55 bugzilla at dr dot eit.h-da.de
  2010-12-10 16:07 ` [Bug gdb/12299] " news at schildmann dot info
  0 siblings, 1 reply; 2+ messages in thread
From: bugzilla at dr dot eit.h-da.de @ 2010-12-08 18:55 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12299

           Summary: AVR ATMEGA128 Assembly Files lead to RAM Breakpoint
                    Addr. 0x00800000++
           Product: gdb
           Version: 7.2
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: bugzilla@dr.eit.h-da.de


Created attachment 5148
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5148
avr ATMEGA128 elf file with startaddr 0x50 (symbol main)

Assembler only Project.

When using gcc to assemble *.s files, the avr-gdb treats all addresses
as RAM addresses 0x0080XXXX (Harvard mapping RAM to von-Neumann addr space)
f.ex. a gdb command 'disass 0x50,0x56' goes into the RAM-location
0x00800050 and disassembles there:
(gdb) disass 0x50,0x56
Dump of assembler code from 0x800050 to 0x800056:
   0x00800050:  Cannot access memory at address 0x800050
(gdb) 


In disasm.c/390 the code
   low  &= 0x007fffff;
   high &= 0x007fffff;
would repair this but probably at the wrong place since in breakpoint.c/5285
   return bpaddr & 0x007FFFFF
repairs (some) wrong breakpoint addresses...

If calling a assembly language routine from within a C-pgm and running into
the assembler part with breakpoints is working.

Attaching a elf binary to allow for disasm 0x50,0x56.
   0x00000050 <main+0>: ldi     r16, 0xFF       ; 255
   0x00000052 <main+2>: sts     0x005D, r16

The symbol 'main' should have the addr 0x50. The debugger reports 0x52 (wrong):
(gdb) b main
Breakpoint 1 at 0x52: file ../main.s, line 12.
(gdb)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug gdb/12299] AVR ATMEGA128 Assembly Files lead to RAM Breakpoint Addr. 0x00800000++
  2010-12-08 18:55 [Bug gdb/12299] New: AVR ATMEGA128 Assembly Files lead to RAM Breakpoint Addr. 0x00800000++ bugzilla at dr dot eit.h-da.de
@ 2010-12-10 16:07 ` news at schildmann dot info
  0 siblings, 0 replies; 2+ messages in thread
From: news at schildmann dot info @ 2010-12-10 16:07 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12299

Peter Schildmann <news at schildmann dot info> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |news at schildmann dot info

--- Comment #1 from Peter Schildmann <news at schildmann dot info> 2010-12-10 13:34:11 UTC ---
The disassemble command does not work when called with arguments, see Bug
12105.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-10 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-08 18:55 [Bug gdb/12299] New: AVR ATMEGA128 Assembly Files lead to RAM Breakpoint Addr. 0x00800000++ bugzilla at dr dot eit.h-da.de
2010-12-10 16:07 ` [Bug gdb/12299] " news at schildmann dot info

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).