1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-05-16 10:25:18 +02:00
Commit graph

2384 commits

Author SHA1 Message Date
David Mosberger-Tang 63a6a95489 Delete obsolete BitKeeper files, add LICENSE file. 2006-07-27 21:26:16 -06:00
David Mosberger-Tang 1fdb08e5fc Various fixes to get x86 to compile and work again.
include/dwarf.h: Declare dwarf_reg_state_pool and dwarf_cie_info_pool.
include/dwarf_i.h: Include libunwind_i.h instead of tdep.h.
	Make dwarf_to_unw_regnum() a macro so it doesn't get compiled
	into an object file merely because it include dwarf_i.h (important
	when optimization is turned off).
	(dwarf_read_encoded_pointer_inlined): New function.
include/tdep-x86/libunwind_i.h: Add include of "mempool.h".
include/tdep-x86_64/libunwind_i.h: Add include of "mempool.h".
2006-07-26 22:36:03 -06:00
Arun Sharma 11ea1275bd [dwarf] The sword() function in Gexpr.c doesn't do what's intended.
Yes, it casts to signed, but then converts right back to
unsigned via the return type.  Fixed thus.

Signed-off-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Arun Sharma <arun.sharma@google.com>
2006-07-26 22:12:10 -06:00
Arun Sharma cdb96f333c [x86] (common_init): Fix spurious errors caused by uninitialized members.
Signed-off-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Arun Sharma <arun.sharma@google.com>
2006-07-26 22:09:10 -06:00
Arun Sharma 8297866bd4 [x86-64] (unw_step): Further refine handling of functions without unwind-info.
CFA should be incremented by 16 in the hope that the previous frame
may have valid unwind info.

Also increase the default frame pointer recognition heuristic from 4k
to 16k.

Signed-off-by: Andrey Veskov <Andrey.Veskov@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@google.com>
2006-07-26 22:06:48 -06:00
Arun Sharma 06d2ffa41a [x86-64] (unw_step): Improve handling of functions which lack unwind info.
If following the frame-chain leads to a frame >= 4KB away, we conclude that
the frame-pointer isn't really valid.
2006-07-26 22:04:40 -06:00
Arun Sharma 7c0907634d [x86-64] (unw_is_signal_frame): If access mem fails, it's not a signal frame. 2006-07-26 21:58:27 -06:00
Arun Sharma 58888a5060 (dwarf_find_save_locs): Also apply register-state after parsing the FDE 2006-07-26 21:55:09 -06:00
Arun Sharma 527225e492 [x86-64] Make a best effort at validating pointers before dereferencing them.
Signed-off-by: Arun Sharma <arun.sharma@google.com>
2006-07-26 21:46:39 -06:00
Arun Sharma 4312719cbc [dwarf] Need to guard against multiple threads accessing the rs cache.
Signed-off-by: Arun Sharma <arun.sharma@google.com>
2006-07-26 21:44:38 -06:00
Arun Sharma 8cdd8bfed8 [x86-64] Make even UNW_LOCAL_ONLY accessors go through validation.
Signed-off-by: Arun Sharma <arun.sharma@google.com>
2006-07-26 21:39:46 -06:00
Arun Sharma c5dc3c150a [dwarf] Allow return address column to differ from function to function.
Signed-off-by: Andrey Veskov <Andrey.Veskov@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@google.com>
2006-07-26 21:29:50 -06:00
Arun Sharma 60b7af702a (dwarf_find_save_locs): Add a comment.
Now that dwarf_find_save_locs() not just finds the save-locations but
also updates the cursor-state, document this fact (the function really
is misnamed now).
2006-07-26 21:25:37 -06:00
Arun Sharma 3dfde7a3f0 (dwarf_find_save_locs): put_unwind_info() is not needed in the cached case. 2006-07-26 21:23:30 -06:00
Arun Sharma 036cbfa020 Fix x86 compilation.
x86 needs the global_cache just like the x86-64 version.

Signed-off-by: Andrey.Veskov@intel.com
Signed-off-by: Arun Sharma <arun.sharma@google.com>
2006-07-26 21:20:59 -06:00
Arun Sharma 00db7f752a Implement a ip -> dwarf_reg_state cache.
Signed-off-by: Arun Sharma <arun.sharma@google.com>
2006-07-26 21:18:49 -06:00
David Mosberger-Tang 1a0af36731 Fix forgotten copyright year update. 2006-07-26 15:48:48 -06:00
David Mosberger-Tang 03395a1c4b Turn back on execute-permission on script files. 2006-07-26 15:46:15 -06:00
David Mosberger-Tang 6a89d40236 Fix missed "tdep.h" -> "libunwind_i.h" conversions. 2006-07-26 15:44:23 -06:00
David Mosberger-Tang 8c94e12429 (_UPT_find_proc_info): Fix potential crash due to uninitialized pointer.
Be sure to clear pi->unwind_info when looking up the kernel table and
not needing the unwind-info.  Otherwise, _UPT_put_unwind_info() may
erroneously call free() on the pointer, even though that space wasn't
malloc'd, leading to crashes..
2006-07-26 15:43:23 -06: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 3c109eef98 Update ChangeLog to point to GIT log instead of Bitkeeper log. 2006-07-26 15:12:18 -06:00
David Mosberger-Tang 69d85f7c14 Restore mi/Ldyn-remote.c. 2006-07-26 15:10:48 -06:00
David Mosberger-Tang 37be21c01e Restore more files wiped out by Bitkeeper->CVS->GIT transition. 2006-07-26 15:09:39 -06:00
David Mosberger-Tang 9e927e7087 Restore tests/perf-startup.
Another file that got wiped out during the Bitkeeper->CVS->GIT translation.
2006-07-26 14:57:51 -06:00
David Mosberger-Tang 236e370dc5 Remove three Emacs backup-files which accidentially got checked into git. 2006-07-26 14:54:50 -06:00
David Mosberger-Tang 6daeeac60a Revert "Initial revision"
This reverts e6446885f4 commit.
2006-07-26 14:53:49 -06:00
David Mosberger-Tang a369768c27 Revert "Initial revision"
This reverts 06d223e924 commit.
2006-07-26 14:47:44 -06:00
David Mosberger-Tang ca69fee8bb Merge ../libunwind-v0.98
Conflicts:

	include/dwarf_i.h
	include/x86/jmpbuf.h
	include/x86_64/jmpbuf.h
	src/hppa/init.h
	src/mi/Gget_fpreg.c
	src/mi/Gset_fpreg.c
	src/mi/strerror.c
2006-07-25 21:41:43 -06:00
David Mosberger-Tang af2503e223 Fix bug in libunwind-ptrace which can cause reading of random data.
(maps_next): After reading less than a full buffer of data, copy
remaining data to the top of the buffer so as to maintain the
invariant that all data between mi->buf and mi->buf_end is valid.
This avoids maps_next() parsing uninitialized data.
2006-07-25 21:35:30 -06:00
David Mosberger-Tang cbd8648b33 Make libunwind compile with recent versions of GAS.
Don't test read-only access to F0 and F1 registers --- according to
the SCRA manual, those locations cannot even be expressed in SPILL
descriptors and newer versions of GAS (as well as IAS) won't accept
.spillreg directives targeting those registers.
2006-07-25 21:34:32 -06:00
David Mosberger-Tang f176ad6fc6 Bring git v0.98.5 tree in sync with released v0.98.5.
Sadly, the conversion from Bitkeeper -> CVS -> git wasn't perfect.  Or
so it seems.
2006-07-25 21:32:28 -06:00
hp.com!davidm bc09a82735 ia64: Allow write-access to UNW_IA64_BSP and UNW_IA64_SP.
Writing UNW_IA64_BSP and UNW_IA64_SP can wreak havoc if not done
properly but can also be extremely useful when done correctly.  For
example, the Linux kernel can use this to update a cursor with the
MIN_STATE info which is saved by firmware due to an MCA or INIT event.

BKrev: 428e03020AqYSMZEt1Q3cCPH0Bj2eA
2005-05-20 15:32:18 +00:00
hp.com!davidm 2211958a9c UNW_IA64_SP and UNW_IA64_BSP are no longer read-only.
(Logical change 1.303)
2005-05-20 15:32:18 +00:00
hp.com!davidm b47b9aa232 UNW_IA64_BSP and UNW_IA64_SP are no longer read-only.
(Logical change 1.303)
2005-05-20 15:32:18 +00:00
hp.com!davidm 11f4871570 Regenerate.
(Logical change 1.303)
2005-05-20 15:32:18 +00:00
hp.com!davidm 36a0275014 Allow write-access to UNW_IA64_BSP and UNW_REG_SP.
(Logical change 1.303)
2005-05-20 15:32:18 +00:00
hp.com!davidm 7c986f6190 ia64: Fix typo in kernel-files.txt.
BKrev: 428e01ddAjr7CJzIA23i8dwJQ5ueug
2005-05-20 15:27:25 +00:00
hp.com!davidm 41db9a8a35 Adjust for renaming of ia64 -> tdep-ia64.
(Logical change 1.302)
2005-05-20 15:27:25 +00:00
hp.com!davidm 4591d090c5 ia64: Use update_nat() instead of equivalent open code in tdep_access_reg().
BKrev: 428dfb26foOQZSriLQ73ORqI0P8TQQ
2005-05-20 14:58:46 +00:00
hp.com!davidm cf2a44ca49 Use update_nat() instead of equivalent open code.
(Logical change 1.301)
2005-05-20 14:58:46 +00:00
hp.com!davidm 2bc0aee843 ia64: Allow r1 to be saved in an ABI-specific frame.
This makes core-dumps contain the proper (user-level) value for r1
when using libunwind in the kernel.

BKrev: 428df94ebHSJQTkoDgFiQ_XgzkMxhg
2005-05-20 14:50:54 +00:00
hp.com!davidm f5de64f9f7 If r1 has been saved in an ABI-specific frame
(such as an interrupt frame), access the saved
value.  Otherwise, pick it up from the unwind-info
for the matching IP.

(Logical change 1.300)
2005-05-20 14:50:54 +00:00
hp.com!davidm 5b1dfeca70 ia64: Remove some dead code.
BKrev: 428df06dTtluXFSTIb7fU0BDyt7ZMw
2005-05-20 14:13:01 +00:00
hp.com!davidm 399f120c96 Drop unused readonly variable.
(Logical change 1.299)
2005-05-20 14:13:01 +00:00
hp.com!davidm 2c08119b53 ia64: Drop early-out-on-zero-IP from unw_step()
The early-out causes problems in the kernel, which wants to unwind to the
end of the kernel-stack (i.e., until IP==0) and then access the user-level
state.

BKrev: 428de7a4kGcNmG2Tv5tDJMbQmqXO4w
2005-05-20 13:35:32 +00:00
hp.com!davidm 3fa950e818 Remove early-out test when IP is zero.
(Logical change 1.298)
2005-05-20 13:35:32 +00:00
hp.com!davidm 3b7eb49469 ia64: Introduce rbs_get_base() to simplify Linux kernel integration.
In the Linux kernel, we want to track the size of all register-backing stores
so we can protect against illegal memory accesses.  Enable this by introducing
an rbs_get_base() macro.

BKrev: 428de263-syBtG-G9-mlstg074gvtA
2005-05-20 13:13:07 +00:00
hp.com!davidm 19e3bf3ea6 (rbs_switch): Use rbs_get_base() to determine the size of the register
backing store.

(Logical change 1.297)
2005-05-20 13:13:07 +00:00
hp.com!davidm 7a8b0ba617 (rbs_get_base): New macro.
(Logical change 1.297)
2005-05-20 13:13:07 +00:00