From fb3f3d25c3cbf561d33b258ff11fd8139f6ad75d Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Wed, 30 Mar 2016 17:02:46 +0100 Subject: [PATCH] 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 * arm-tdep.c (arm_epilogue_frame_this_id): Check 'func' against 0 rather than NULL. --- gdb/ChangeLog | 5 +++++ gdb/arm-tdep.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bb9b9745609..9e016aeae44 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-03-30 Yao Qi + + * arm-tdep.c (arm_epilogue_frame_this_id): Check 'func' against + 0 rather than NULL. + 2016-03-30 Yao Qi * arm-tdep.c: (arm_make_epilogue_frame_cache): New function. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 01f53d6095c..0412f71d24a 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); -- 2.30.2