Check func against 0 rather than NULL
authorYao Qi <yao.qi@linaro.org>
Wed, 30 Mar 2016 16:02:46 +0000 (17:02 +0100)
committerYao Qi <yao.qi@linaro.org>
Wed, 30 Mar 2016 16:03:29 +0000 (17:03 +0100)
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.

gdb/ChangeLog
gdb/arm-tdep.c

index bb9b974..9e016ae 100644 (file)
@@ -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.
index 01f53d6..0412f71 100644 (file)
@@ -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);