1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-10-05 21:09:32 +02:00
libunwind-eh_elf/src/ia64/unw_is_signal_frame.c

42 lines
1.4 KiB
C
Raw Normal View History

2002-02-16 00:22:05 +01:00
/* 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;
2002-02-16 00:22:05 +01:00
/* 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;
2002-02-16 00:22:05 +01:00
}