aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2009-11-10 10:05:47 +0000
committerTristan Gingold <gingold@adacore.com>2009-11-10 10:05:47 +0000
commitee143e81426371a93b891ce65891b43034e87347 (patch)
tree4cf9d4266fff85a0fda2e2e66a9bdf1c0fa76fd3 /gdb
parent53f6a2c9fa05574449d01931ed87a7619810dced (diff)
downloadgdb-ee143e81426371a93b891ce65891b43034e87347.zip
gdb-ee143e81426371a93b891ce65891b43034e87347.tar.gz
gdb-ee143e81426371a93b891ce65891b43034e87347.tar.bz2
2009-11-10 Tristan Gingold <gingold@adacore.com>
* avr-tdep.c (avr_make_saddr): Return 0 for NULL.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/avr-tdep.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f532d4b..b7b8d56 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2009-11-10 Tristan Gingold <gingold@adacore.com>
+ * avr-tdep.c (avr_make_saddr): Return 0 for NULL.
+
+2009-11-10 Tristan Gingold <gingold@adacore.com>
+
* avr-tdep.c (avr_dwarf_reg_to_regnum): New function.
(avr_gdbarch_init): Call set_gdbarch_dwarf2_reg_to_regnum.
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);
}