aboutsummaryrefslogtreecommitdiff
path: root/gdb/avr-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/avr-tdep.c')
-rw-r--r--gdb/avr-tdep.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 6d04e56..6de10f2 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);
}