1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-07-07 15:45:36 +02:00
libunwind-eh_elf/src/ia64/unw_is_signal_frame.c
mostang.com!davidm 118746f9e5 (unw_is_signal_frame): Need to (re-)create state record before we can check
IA64_FLAG_SIGTRAMP.

(Logical change 1.18)
2002-04-25 06:47:29 +00:00

42 lines
1.4 KiB
C

/* libunwind - a platform-independent unwind library
Copyright (C) 2001-2002 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
libunwind is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
libunwind is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public
License. */
#include "unwind_i.h"
int
unw_is_signal_frame (unw_cursor_t *cursor)
{
struct ia64_cursor *c = (struct ia64_cursor *) cursor;
struct ia64_state_record sr;
int ret;
/* Crude and slow, but we need to peek ahead into the unwind
descriptors to find out if the current IP is inside the signal
trampoline. */
ret = ia64_create_state_record (c, &sr);
if (ret < 0)
return ret;
return (c->pi.flags & IA64_FLAG_SIGTRAMP) != 0;
}