From ee143e81426371a93b891ce65891b43034e87347 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 10 Nov 2009 10:05:47 +0000 Subject: [PATCH] 2009-11-10 Tristan Gingold * avr-tdep.c (avr_make_saddr): Return 0 for NULL. --- gdb/ChangeLog | 4 ++++ gdb/avr-tdep.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f532d4bca82..b7b8d56658a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2009-11-10 Tristan Gingold + + * avr-tdep.c (avr_make_saddr): Return 0 for NULL. + 2009-11-10 Tristan Gingold * avr-tdep.c (avr_dwarf_reg_to_regnum): New function. diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 6d04e56684c..6de10f2d1e5 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -240,6 +240,10 @@ avr_convert_iaddr_to_raw (CORE_ADDR x) static CORE_ADDR avr_make_saddr (CORE_ADDR x) { + /* Return 0 for NULL. */ + if (x == 0) + return 0; + return ((x) | AVR_SMEM_START); } -- 2.30.2