mirror of
https://github.com/FEX-Emu/libunwind.git
synced 2024-11-27 16:30:50 +00:00
Fixup invalid return code checks of unw_is_signal_frame()
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())".
This commit is contained in:
parent
67d4137ba7
commit
cf2bc87561
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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... */
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user