public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cristiano.dealti at eurotech dot com" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-13519-4717-LeHL5tqJcS@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-13519-4717@http.sourceware.org/bugzilla/>

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.


  parent reply	other threads:[~2015-05-24 17:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19 12:44 [Bug gdb/13519] New: [avr] " 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-13519-4717-LeHL5tqJcS@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).