[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH] Fixup invalid return code checks of unw_is_sig
From: |
Chris Redmon |
Subject: |
[Libunwind-devel] [PATCH] Fixup invalid return code checks of unw_is_signal_frame() |
Date: |
Fri, 17 Jun 2016 21:26:45 +0000 |
unw_is_signal_frame() returns <= 0 if not a signal frame. Several places in
code were only checking for a "if (unw_is_signal_frame())", or
"if (!unw_is_signal_frame())".
---
src/aarch64/Gstep.c | 2 +-
src/arm/Gstep.c | 2 +-
src/ppc32/Gstep.c | 2 +-
src/ppc64/Gstep.c | 2 +-
src/sh/Gstep.c | 2 +-
src/tilegx/Gstep.c | 2 +-
src/x86/Gstep.c | 2 +-
src/x86_64/Gstep.c | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/aarch64/Gstep.c b/src/aarch64/Gstep.c
index 0c35f98..44fbb04 100644
--- a/src/aarch64/Gstep.c
+++ b/src/aarch64/Gstep.c
@@ -115,7 +115,7 @@ unw_step (unw_cursor_t *cursor)
c, c->dwarf.ip, c->dwarf.cfa);
/* Check if this is a signal frame. */
- if (unw_is_signal_frame (cursor))
+ if (unw_is_signal_frame (cursor) > 0)
return unw_handle_signal_frame (cursor);
ret = dwarf_step (&c->dwarf);
diff --git a/src/arm/Gstep.c b/src/arm/Gstep.c
index 79f2dd2..37e6c12 100644
--- a/src/arm/Gstep.c
+++ b/src/arm/Gstep.c
@@ -175,7 +175,7 @@ unw_step (unw_cursor_t *cursor)
Debug (1, "(cursor=%p)\n", c);
/* Check if this is a signal frame. */
- if (unw_is_signal_frame (cursor))
+ if (unw_is_signal_frame (cursor) > 0)
return unw_handle_signal_frame (cursor);
#ifdef CONFIG_DEBUG_FRAME
diff --git a/src/ppc32/Gstep.c b/src/ppc32/Gstep.c
index 8506a61..7e0f14d 100644
--- a/src/ppc32/Gstep.c
+++ b/src/ppc32/Gstep.c
@@ -79,7 +79,7 @@ unw_step (unw_cursor_t * cursor)
if (unlikely (ret < 0))
{
- if (likely (!unw_is_signal_frame (cursor)))
+ if (likely (unw_is_signal_frame (cursor) <= 0))
{
/* DWARF unwinding failed. As of 09/26/2006, gcc in 64-bit mode
produces the mandatory level of traceback record in the code, but
diff --git a/src/ppc64/Gstep.c b/src/ppc64/Gstep.c
index 318beee..58a5ad8 100644
--- a/src/ppc64/Gstep.c
+++ b/src/ppc64/Gstep.c
@@ -74,7 +74,7 @@ unw_step (unw_cursor_t * cursor)
if (unlikely (ret < 0))
{
- if (likely (!unw_is_signal_frame (cursor)))
+ if (likely (unw_is_signal_frame (cursor) <= 0))
{
/* DWARF unwinding failed. As of 09/26/2006, gcc in 64-bit mode
produces the mandatory level of traceback record in the code, but
diff --git a/src/sh/Gstep.c b/src/sh/Gstep.c
index 9bbb5ff..9bbb847 100644
--- a/src/sh/Gstep.c
+++ b/src/sh/Gstep.c
@@ -102,7 +102,7 @@ unw_step (unw_cursor_t *cursor)
Debug (1, "(cursor=%p)\n", c);
- if (unw_is_signal_frame (cursor))
+ if (unw_is_signal_frame (cursor) > 0)
return unw_handle_signal_frame (cursor);
ret = dwarf_step (&c->dwarf);
diff --git a/src/tilegx/Gstep.c b/src/tilegx/Gstep.c
index 0d8f8af..1d32f96 100644
--- a/src/tilegx/Gstep.c
+++ b/src/tilegx/Gstep.c
@@ -36,7 +36,7 @@ unw_step (unw_cursor_t *cursor)
c, c->dwarf.ip, c->dwarf.cfa);
/* Special handling the singal frame. */
- if (unw_is_signal_frame (cursor))
+ if (unw_is_signal_frame (cursor) > 0)
return unw_handle_signal_frame (cursor);
/* Try DWARF-based unwinding... */
diff --git a/src/x86/Gstep.c b/src/x86/Gstep.c
index 10e2cbc..517dd62 100644
--- a/src/x86/Gstep.c
+++ b/src/x86/Gstep.c
@@ -55,7 +55,7 @@ unw_step (unw_cursor_t *cursor)
Debug (13, "dwarf_step() failed (ret=%d), trying frame-chain\n", ret);
- if (unw_is_signal_frame (cursor))
+ if (unw_is_signal_frame (cursor) > 0)
{
ret = unw_handle_signal_frame(cursor);
if (ret < 0)
diff --git a/src/x86_64/Gstep.c b/src/x86_64/Gstep.c
index 84b3728..de666a7 100644
--- a/src/x86_64/Gstep.c
+++ b/src/x86_64/Gstep.c
@@ -114,7 +114,7 @@ unw_step (unw_cursor_t *cursor)
Debug (13, "dwarf_step() failed (ret=%d), trying frame-chain\n", ret);
- if (unw_is_signal_frame (cursor))
+ if (unw_is_signal_frame (cursor) > 0)
{
ret = unw_handle_signal_frame(cursor);
if (ret < 0)
--
2.8.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Libunwind-devel] [PATCH] Fixup invalid return code checks of unw_is_signal_frame(),
Chris Redmon <=