1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-05-19 19:45:17 +02:00
Commit graph

23 commits

Author SHA1 Message Date
Arun Sharma 781d5d5263 One time whitespace fixup.
for f in $(find src include -name '*.[ch]'); do
  expand -t 8 $f > $tmp; mv $tmp $f;
done
2014-09-27 09:47:23 -07:00
Luca Clementi af23f0a04b Add Cflags keyword to pkg-config metadata files
pkg-config metadata template files are missing Cflags keyword
which is required to properly compile against libunwind using
PKG_* autoconf macros

Acked-by: Mike Frysinger <vapier@gentoo.org>
2013-08-26 05:40:19 -07:00
Alexander Toresson ea5e90fd9f Create and install pkg-config .pc files
[Edit: renamed to libunwind-generic.pc and some .pc files
 created only when needed -- asharma@fb.com]
2012-09-15 11:34:43 -07:00
Arun Sharma 814bd79fb1 Fix some compiler warnings 2012-08-04 12:48:56 -07:00
Konstantin Belousov 59328832f7 Provide the FreeBSD implementation for _UI_siglongjmp_cont on x86.
On FreeBSD, _NSIG is at least 128, so just pass a pointer to the
signal mask in the register.
Add my copyright.
2012-02-05 11:47:47 +02:00
Konstantin Belousov 2b606faa21 Fix compilation on non-glibc machines.
Commit 297d9cd07d (Fix for failing test-setjmp)
breaks non glibc systems, since __GLIBC_PREREQ is not defined there.
As a consequence, preprocessor aborts with an error.

Trying to hide __GLIBC_PREREQ under #ifdef __GLIBC would require
either code duplication, or moving the longjmp implementation into
the separate file, which is included twice. In fact, I am not sure
in any use of the __GLIBC_PREREQ at the compile time, because the
compiled code can be run on the later version of glibc.

Below is the patch, tested on FreeBSD x86/x86_64 and Scientific Linux 6.1
x86_64. I compile the code always, but keep it in under unused static
symbol. In principle, the code could be optimized out by linker.

[ Minor formatting edits: asharma@fb.com ]
2011-11-30 21:59:09 -08:00
Paul Pluzhnikov 297d9cd07d Fix for failing test-setjmp
On Mon, Nov 14, 2011 at 5:02 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:

> P.S. test-setjmp is failing for me (before or after the patch).
> When I enable assertions (to confirm my new assertions are correct), I see:
>
>  lt-test-setjmp: ../../src/dwarf/Gparser.c:754: apply_reg_state: \
>    Assertion `rs->reg[17].where == DWARF_WHERE_EXPR' failed.
>
> which likely explains that failure.

The problem is actually two-fold:

First, the loops in {sig,}longjmp.c are "do { ... } while (unw_step() >= 0);"

But unw_step() returns 0 on reaching the end of the chain (_start),
and the loop should stop there.

The second problem is that with this commit:
  c67da0b50e
glibc obfuscates value of SP in jmp_buf, so we might as well just give up.

Patch attached.

Thanks,
--
Paul Pluzhnikov
2011-11-19 15:37:35 -08:00
Arun Sharma c4133e879b undef FORTIFY_SOURCE
It's a bit annoying to undefine at configure or compile time.

Signed-off-by: Arun Sharma <asharma@fb.com>
2011-10-15 23:10:00 -07:00
Konstantin Belousov 5715d912f4 Make setjmp/longjmp work at least on FreeBSD/amd64.
FreeBSD-supplied setjmp() saves incremented stack pointer into jmpbuf.

I have no idea whether siglongjmp ever worked on amd64, since
UNW_NUM_EH_REGS == 2 and abort at siglongjmp.c:81 is firing.
2010-04-03 19:02:43 +03:00
Konstantin Belousov 093855f12a Remove unneeded includes of sys/types.h 2010-03-08 00:25:22 +02:00
Konstantin Belousov 3eabce18b1 Include sys/types.h when needed. 2010-03-06 16:43:39 +02:00
Konstantin Belousov 29c110265f _NSIG. 2010-03-06 16:43:18 +02:00
Daniel Jacobowitz 3842dac733 Add initial ARM and MIPS support. To support this, also enable the
reading of .debug_frame sections (used in lieu of .eh_frame sections
when they're not available).
2008-02-04 17:16:37 -07:00
David Mosberger-Tang fd2fa63a6c Fix missed merge on setjmp_i.h and siglongjmp.c. 2006-07-26 15:21:52 -06:00
David Mosberger-Tang a369768c27 Revert "Initial revision"
This reverts 06d223e924 commit.
2006-07-26 14:47:44 -06:00
hp.com!davidm 83820a78d1 Include "libunwind_i.h" instead of "tdep.h".
Include "tdep-ia64/rse.h" instead of "ia64/rse.h".

(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm d9e100753f Include "libunwind_i.h" instead of "tdep.h".
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
mostang.com!davidm 4d7f2a5be7 Rename: src/sigsetjmp.c -> src/setjmp/sigsetjmp.c
(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm 8e06df0e52 Rename: src/setjmp.c -> src/setjmp/setjmp.c
(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm 06d223e924 Initial revision 2005-05-03 09:13:17 +00:00
mostang.com!davidm 4f16756123 Include "setjmp_i.h".
Abstract ia64-specific code into bsp_match() routine.
Support any platform with at least 2 EH argument registers.

2004/12/06 01:33:16-08:00 mostang.com!davidm
Rename: src/longjmp.c -> src/setjmp/longjmp.c

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm acf90b1f82 Include "setjmp_i.h".
Abstract ia64-specific code into bsp_match() and
resume_restores_sigmask() routines.

2004/12/06 01:33:01-08:00 mostang.com!davidm
Rename: src/siglongjmp.c -> src/setjmp/siglongjmp.c

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm 3f73836b87 Adjust for "ia64_rse" to "rse" prefix change.
2004/12/15 15:40:09-08:00 hp.com!davidm
Include "tdep.h" on ia64 (we need the cursor).
(bsp_match): Fix it so it compiles again.
(resume_restore_sigmask): Likewise.

2004/12/06 10:40:49-08:00 mostang.com!davidm

(Logical change 1.290)
2005-05-03 09:13:17 +00:00