public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/13519] New: [avr] disassemble command attempts to disassemble SRAM rather than program memory
@ 2011-12-19 12:44 j at uriah dot heep.sax.de
  2011-12-19 13:37 ` [Bug gdb/13519] " j at uriah dot heep.sax.de
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: j at uriah dot heep.sax.de @ 2011-12-19 12:44 UTC (permalink / raw)
  To: gdb-prs

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

             Bug #: 13519
           Summary: [avr] disassemble command attempts to disassemble SRAM
                    rather than program memory
           Product: gdb
           Version: 7.2
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: j@uriah.heep.sax.de
                CC: eric.weddington@atmel.com
    Classification: Unclassified
            Target: avr-*-*


The dissassemble command now attempts to disassemble SRAM locations
rather than program memory:

% ./gdb-7.2/gdb/gdb -q foo.elf
Reading symbols from /simtemp/jw/foo.elf...done.

(gdb) disas 0x1, 0x3
Dump of assembler code from 0x800001 to 0x800003:
   0x00800001:  Cannot access memory at address 0x800001

(Due to the AVR's Harvard architecture, SRAM is remapped internally in
the GNU tools to an offset of 0x800000 which is beyond the addressable
program memory area of an AVR.  In contrast, program memory starts at
offset 0.)

Previous versions of GDB didn't experience this problem:

% ./gdb-7.0.1/gdb/gdb -q foo.elf
Reading symbols from /simtemp/jw/foo.elf...done.
(gdb) disas 1 3
Dump of assembler code from 0x1 to 0x3:
0x00000001 <__vectors+1>:       sbci    r25, 0x64       ; 100
End of assembler dump.

The difference is that, obviously, the start and end locations are now
being treated as expressions rather than numbers (which also caused
the requirement to separate them by a comma rather than a space).
Somehow, during evaluation of the expression, the offset 0x800000 gets
added.

-- 
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] 18+ messages in thread

end of thread, other threads:[~2020-05-25 15:59 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-19 12:44 [Bug gdb/13519] New: [avr] disassemble command attempts to disassemble SRAM rather than program memory j at uriah dot heep.sax.de
2011-12-19 13:37 ` [Bug gdb/13519] " j at uriah dot heep.sax.de
2011-12-19 14:55 ` [Bug gdb/13519] [avr][Regression 7.1/7.2/7.3/7.4] " eric.weddington at atmel dot com
2012-02-24 11:27 ` mnl at mnl dot de
2012-02-24 11:28 ` mnl at mnl dot de
2012-02-24 11:31 ` mnl at mnl dot de
2012-02-27 19:34 ` tromey at redhat dot com
2012-03-09 16:01 ` eric.weddington at atmel dot com
2014-05-25 21:32 ` dwt at pobox dot com
2014-05-29 15:12 ` palves at redhat dot com
2014-05-30 18:40 ` dwt at pobox dot com
2014-07-07 18:17 ` cristiano.dealti at eurotech dot com
2014-07-08 19:52 ` cristiano.dealti at eurotech dot com
2015-05-24 17:41 ` cristiano.dealti at eurotech dot com
2020-05-21  3:57 ` msquirogac at gmail dot com
2020-05-21 14:03 ` mnl at mnl dot de
2020-05-25 15:57 ` cvs-commit at gcc dot gnu.org
2020-05-25 15:59 ` simark at simark dot ca

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).