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

708 commits

Author SHA1 Message Date
David Mosberger-Tang
e6b9f350f7 Introduce a tdep_get_func_addr_hook() in the ELF lookup_symbol()
routine and add address-space argument.  This is needed because on
PPC64, a the function-name symbol refers to a function descriptor
(unlike, for example, on ia64, where the @fptr() operator is needed to
refer to a function descriptor).  Thus, in order to look up the name
of a function, we need to dereference the function descriptor.  To
make matters more "interesting", the function descriptors are normally
resolved by the dynamic linker, so we can't get their values from the
ELF file.  Instead, we have to read them from the running image, hence
the need for the address-space argument.
2007-08-22 13:02:09 -06:00
David Mosberger-Tang
a6393c0be1 Merge ../libunwind-v0.98 2007-06-06 20:58:56 -06:00
Andreas Schwab
09c8c7d0f3 (unw_create_addr_space): Fix address-leak that triggered when function
was called with an unsupported "byte_order".

Signed-off-by: David Mosberger-Tang <dmosberger@gmail.com>
2007-06-06 20:55:36 -06:00
David Mosberger-Tang
bde67706ed Delete some backup files that accidentally made it into git. 2006-07-27 21:30:19 -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
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
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
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
cf2a44ca49 Use update_nat() instead of equivalent open code.
(Logical change 1.301)
2005-05-20 14:58:46 +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
399f120c96 Drop unused readonly variable.
(Logical change 1.299)
2005-05-20 14:13:01 +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
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
9724ac492c (common_init): Use rbs_get_base() to determine size of register-backing store.
(Logical change 1.297)
2005-05-20 13:13:07 +00:00
hp.com!davidm
080f8423d9 Read sp and bsp via ia64_get() and then pass them to common_init().
(Logical change 1.296)
2005-05-20 12:47:59 +00:00
hp.com!davidm
50bbc1fe3d (set_as_arg): New function.
(get_initial_stack_pointers): Likewise.
(unw_init_local): Use new functions to make code more readable and add
	Linux kernel support.

(Logical change 1.296)
2005-05-20 12:47:59 +00:00
hp.com!davidm
84bd124a24 (inlined_uc_addr): Remove UNW_IA64_AR_BSP. We no longer need this ugly hack
since the initial BSP is now passed directly into common_init().

(Logical change 1.296)
2005-05-20 12:47:59 +00:00
hp.com!davidm
4992f1c936 (common_init): Take initial sp and bsp values as arguments instead of
reading them via ia64_get().

(Logical change 1.296)
2005-05-20 12:47:59 +00:00
hp.com!davidm
1b63be3f89 (parse_dynamic): Make it a dummy-function of _U_dyn_op isn't defined, i.e.,
if libunwind-dynamic.h isn't in use (as is the case for the kernel at
	the moment).

(Logical change 1.295)
2005-05-20 11:28:16 +00:00
hp.com!davidm
7894f0edc0 (ia64_strloc): Move to Grbs.c.
(Logical change 1.295)
2005-05-20 11:28:16 +00:00
hp.com!davidm
96407911ee (ia64_strloc): Move here from Ginit.c so it can be shared with the kernel.
(Logical change 1.295)
2005-05-20 11:28:16 +00:00
hp.com!davidm
1228462adc Include "rse.h" instead of "ia64/rse.h".
Include "libunwind_i.h" instead of "internal.h" and "tdep.h".
Define rbs_cover_and_flush() only for the !UNW_REMOTE_ONLY case.
(ia64_is_big_endian): New macro.
(ia64_get_abi): Likewise.
(ia64_set_abi): Likewise.
(ia64_get_abi_marker): Likewise.

(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
8e6f3c8485 Include "rse.h" instead of "ia64/rse.h".
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
5724bee8c2 Include "libunwind_i.h" instead of "internal.h".
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
c027d98386 Don't include headers already included via unwind_i.h.
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
dda1a6d625 Don't include <string.h>.
Include "libunwind_i.h" instead of "internal.h" and "tdep.h".

(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
9e8ba174e6 Don't include <string.h> and <stdlib.h>.
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
fa2871946a Don't include <assert.h> and <stddef.h>.
Use ia64_get_abi_marker() instead of directly referencing c->last_abi_marker.
(linux_scratch_loc): When accessing an fp-reg, default to IA64_FPREG_LOC.
	Handle more registers for the Linux interrupt-frame case.
(tdep_access_reg): Use ia64_get_abi() instead of c->as->abi.
	Use ia64_is_big_endian() instead of c->as->big_endian.

(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
8bb167d4c1 Don't include <alloca.h> and <stdlib.h>.
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
6675be4926 (linux_interrupt): Enable this code for the kernel, too.
Use ia64_get_abi_marker() instead of c->abi_marker.
	Use ia64_set_abi() instead of storing directly to c->as->abi.

(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
ee6eeb4f7d (get_script_cache): Use HAVE_ATOMIC_H instead of __linux && __KERNEL__.
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
8a1e0a2bcd Auto merged
2005/05/17 14:14:23-07:00 hp.com!davidm
(tdep_access_reg): Access AR.EC via ec_loc instead of cfm_loc.

(Logical change 1.293)
2005-05-17 21:28:19 +00:00
hp.com!davidm
26fdb45d76 Auto merged
2005/05/17 14:14:23-07:00 hp.com!davidm
(linux_sigtramp): Add "prev_cfm_loc" argument.  Use it to set c->ec_loc.
(linux_interrupt): Likewise.
(hpux_sigtramp): Likewise.
(update_frame_state): Copy old cfm_loc to prev_cfm_loc and pass it to
	ABI-specific handlers.  Initialize c->ec_loc to c->cfm_loc by default.

(Logical change 1.293)
2005-05-17 21:28:19 +00:00
hp.com!davidm
a6ba57d556 Auto merged
2005/05/17 06:10:13-07:00 hp.com!davidm
(tdep_access_reg): Don't rotate contents of UNW_IA64_PR.

(Logical change 1.292)
2005-05-17 13:24:49 +00:00
hp.com!davidm
8462f1f87d (pr_ltop): Remove.
(pr_ptol): Remove.

(Logical change 1.292)
2005-05-17 13:24:49 +00:00
mostang.com!davidm
7fbb8a9593 Adjust for sigset_t to intrmask_t renaming.
(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm
9f3360a546 Adjust for "ia64_rse" to "rse" prefix change.
2005/02/23 12:55:45-08:00 mostang.com!davidm
(inlined_uc_addr): Adjust for ALWAYS_INLINE change.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm
7f8b54ae5c Adjust for "ia64_rse" to "rse" prefix change.
2005/02/20 21:42:55-08:00 mostang.com!davidm
Adjust for NELEMS to ARRAY_SIZE renaming.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm
3e00b79170 Adjust for "ia64_rse" to "rse" prefix change.
2004/12/06 10:40:49-08:00 mostang.com!davidm
(tdep_access_reg): Fix typo in code to read EH argument registers.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm
87081cebab Adjust for "ia64_rse" to "rse" prefix change.
2004/10/25 07:52:30-07:00 hp.com!davidm
(unw_step): Add Debug statement to print return-value.

2004/10/25 05:21:51-07:00 hp.com!davidm
(unw_step): Print IP along with cursor address.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm
bf832fc29e Adjust for "ia64_rse" to "rse" prefix change.
(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm
caa61dfec1 (remote_install_cursor): Fix off-by-one error.
2004/10/25 05:21:51-07:00 hp.com!davidm
(unw_resume): Print IP along with cursor-address.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm
7fcb8006a9 (common_init): Adjust for ALWAYS_INLINE change.
(Logical change 1.290)
2005-05-03 09:13:17 +00:00
hp.com!davidm
7c4be6f9bc Auto merged
2005/04/07 12:19:38-07:00 hp.com!davidm
(ia64_make_proc_info): After looking up proc-info, cache it if
	caching is enabled.

2005/02/20 21:42:55-08:00 mostang.com!davidm
Adjust for NELEMS to ARRAY_SIZE renaming.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
hp.com!davidm
6fc50d4ed6 (unw_search_ia64_unwind_table): Always return unwind_info in the
local case since it's trivial to do so and saves us time if
	later on we need to build a script for that procedure.

2005/02/23 14:40:44-08:00 mostang.com!davidm
Adjust for sigset_t to intrmask_t renaming.

2004/10/25 05:21:51-07:00 hp.com!davidm
(unw_search_ia64_unwind_table): Clarify comment and add a Debug() statement
	for the case where we find a bad unwind-header version.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
hp.com!davidm
6ed360df7e (unw_is_signal_frame): Add a Debug statement.
(Logical change 1.290)
2005-05-03 09:13:17 +00:00
hp.com!davidm
23405d02ec (get_script_cache): Fix typo in Debug() statement (missing argument).
(put_script_cache): Fix typo in argument name.

2005/04/07 12:19:38-07:00 hp.com!davidm
(ia64_get_cache_proc_info): Move it to near the end of the file.
(script_init): Also call ia64_fetch_proc_info() if the script was
	found in the cache but it's empty (count == 0 and NULL
	unwind_info pointer).  Also invoke build_script() if
	script has no instructions yet (count==0).  Add assertion
	to ensure that build_script() never returns an empty
	script.
(ia64_cache_proc_info): New function to cache the proc_info only.

2005/02/23 14:40:44-08:00 mostang.com!davidm
Adjust for sigset_t to intrmask_t renaming.

2005/02/23 13:10:05-08:00 mostang.com!davidm
Adjust for "ia64_rse" to "rse" prefix change.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
hp.com!davidm
8efd6d24da (desc_alias): Fix off-by-one bug.
(Logical change 1.287)
2005-04-20 21:01:22 +00:00
hp.com!davidm
4e731a5572 (get_dyn_info_list_addr): When compiling into libunwind-ia64, declare
_U_dyn_info_list_addr as weak and fail if the symbol remained
	undefined.
(get_static_proc_name): Likewise for _Uelf64_get_proc_name().

(Logical change 1.282)
2004-11-16 18:47:39 +00:00
hp.com!davidm
22ac4c078f (__sigsetjmp): Start updating jmp_buf only after sigprocmask() returned
successfully.  This avoids a failure in ia64-test-setjmp which
	was due to the fact that sigprocmask() caused a segfault (due to
	overflowing the stack) and at that point we had a partially updated
	jmp_buf.

(Logical change 1.272)
2004-10-13 14:08:02 +00:00