This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PING] [PATCH] PR gdb/13519, disassemble command attempts to disassemble SRAM rather than program memory.
- From: cristiano de alti <cristiano_dealti at hotmail dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 6 Oct 2016 21:11:38 +0000
- Subject: Re: [PING] [PATCH] PR gdb/13519, disassemble command attempts to disassemble SRAM rather than program memory.
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=softfail (sender IP is 10.152.12.52) smtp.mailfrom=hotmail.com; sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=fail action=none header.from=hotmail.com;
- References: <BLU436-SMTP174C641CBB21D15D7CDF01DF78B0@phx.gbl>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 03/17/2016 11:25 PM, Cristiano De Alti wrote:
> gdb/ChangeLog:
> 2016-03-17 Cristiano De Alti <cristiano_dealti@hotmail.com>
>
> PR gdb/13519
> * avr-tdep.c (avr_integer_to_address): return data or
> code address accordingly to the second 'type' argument
> of the function.
> ---
> gdb/avr-tdep.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
> index 088fe51..993e92b 100644
> --- a/gdb/avr-tdep.c
> +++ b/gdb/avr-tdep.c
> @@ -362,7 +362,10 @@ avr_integer_to_address (struct gdbarch *gdbarch,
> {
> ULONGEST addr = unpack_long (type, buf);
>
> - return avr_make_saddr (addr);
> + if (TYPE_DATA_SPACE (type))
> + return avr_make_saddr (addr);
> + else
> + return avr_make_iaddr (addr);
> }
>
> static CORE_ADDR