From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54591 invoked by alias); 24 May 2015 17:41:01 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 54555 invoked by uid 48); 24 May 2015 17:41:01 -0000 From: "cristiano.dealti at eurotech dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/13519] [avr][Regression 7.1/7.2/7.3/7.4] disassemble command attempts to disassemble SRAM rather than program memory Date: Sun, 24 May 2015 17:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 7.7 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cristiano.dealti at eurotech dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.isobsolete attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q2/txt/msg00314.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=13519 cristiano.dealti at eurotech dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6243|0 |1 is obsolete| | Attachment #7692|0 |1 is obsolete| | --- Comment #13 from cristiano.dealti at eurotech dot com --- Created attachment 8330 --> https://sourceware.org/bugzilla/attachment.cgi?id=8330&action=edit Final patch to broken AVR arch with the latest gdbs This patch obsoletes all previous patches attached to this bug. The patch is trivial and only affects avr-tdep.c. As noted by others, avr_integer_to_address() always returns addresses in SRAM. However, the second parameter of this function, struct type *type, allows to understand if a code or data address is desired. Indeed, patch is so simple that the patched function is simply: static CORE_ADDR avr_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf) { ULONGEST addr = unpack_long (type, buf); if (TYPE_DATA_SPACE (type)) return avr_make_saddr (addr); else return avr_make_iaddr (addr); } Everything works: disassemble, breakpoints at numeric address, breakpoints at source line and watchpoints. -- You are receiving this mail because: You are on the CC list for the bug.