aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-03-30 17:02:46 +0100
committerYao Qi <yao.qi@linaro.org>2016-03-30 17:03:29 +0100
commitfb3f3d25c3cbf561d33b258ff11fd8139f6ad75d (patch)
tree59975bca53c87d965bf98cd62c38f37aa59aec14 /gdb
parent779aa56f2c160ef508ca98fac1ffd23cad6fc63f (diff)
downloadgdb-fb3f3d25c3cbf561d33b258ff11fd8139f6ad75d.zip
gdb-fb3f3d25c3cbf561d33b258ff11fd8139f6ad75d.tar.gz
gdb-fb3f3d25c3cbf561d33b258ff11fd8139f6ad75d.tar.bz2
Check func against 0 rather than NULL
Variable 'func''s type is CORE_ADDR, so it should be compared with 0 rather than NULL. This causes a build error. This patch fixes this. gdb: 2016-03-30 Yao Qi <yao.qi@linaro.org> * arm-tdep.c (arm_epilogue_frame_this_id): Check 'func' against 0 rather than NULL.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/arm-tdep.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bb9b974..9e016ae 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2016-03-30 Yao Qi <yao.qi@linaro.org>
+ * arm-tdep.c (arm_epilogue_frame_this_id): Check 'func' against
+ 0 rather than NULL.
+
+2016-03-30 Yao Qi <yao.qi@linaro.org>
+
* arm-tdep.c: (arm_make_epilogue_frame_cache): New function.
(arm_epilogue_frame_this_id): New function.
(arm_epilogue_frame_prev_register): New function.
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 01f53d6..0412f71 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -2714,7 +2714,7 @@ arm_epilogue_frame_this_id (struct frame_info *this_frame,
fall back to just using the current PC. */
pc = get_frame_pc (this_frame);
func = get_frame_func (this_frame);
- if (func == NULL)
+ if (func == 0)
func = pc;
(*this_id) = frame_id_build (cache->prev_sp, pc);