1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-16 05:08:12 +01:00
Commit graph

100 commits

Author SHA1 Message Date
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
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
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
hp.com!davidm
d9e100753f Include "libunwind_i.h" instead of "tdep.h".
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
b7adf160ee Include "dwarf_i.h" instead of "dwarf.h".
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
df3d6af467 Don't include <string.h>.
Include "libunwind_i.h" instead of "tdep.h".

(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
9fac7579ee Don't include <string.h> and "tdep.h".
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
03ba50ccaa Don't include <stdlib.h> and <string.h>.
Include "libunwind_i.h" instead of "tdep.h".

(Logical change 1.294)
2005-05-20 09:48:08 +00:00
mostang.com!davidm
9bc79a618b Rename: src/dwarf/dwarf-eh.h -> include/dwarf-eh.h
}(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm
1f5ac0f5bd Adjust for sigset_t to intrmask_t renaming.
2004/11/17 02:43:39-08:00 mostang.com!davidm
(struct callback_data): New structure.
(linear_search): New function.
(callback): Convert to getting auxiliary info passed via a pointer to
	a callback_data structure, rather than an unw_dyn_info_t
	structure.
	Keep track of the maximum load address in max_load_addr.
	If an object doesn't have a binary search-table, fall back
	on a linear search.
(dwarf_find_proc_info): Fill in callback-data structure before calling
	dl_iterate_phdr().  Upon returning, check whether
	cb_data.single_fde is set and, if so, return directly, without
	searching the DWARF unwind-table.
(dwarf_search_unwind_table): Adjust for renaming of
	dwarf_parse_fde() to dwarf_extract_proc_info_from_fde().
	If IP doesn't fall into the IP-range of the FDE-entry found
	by the search, return UNW_ENOINFO.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm
46b7b8196c (is_cie_id): New function.
(parse_cie): Adjust for moving DWARF2 extra-info from
	unw_dyn_dwarf_fde_info_t to dwarf_cie_info.
	Add support for `S' augmentation ("special frames").
(dwarf_extract_proc_info_from_fde): Rename frm dwarf_parse_fde().
	Convert to returning data via dwarf_cie_info rather than
	unw_dyn-dwarf_fde_info_t.  Allow 0-length FDE since those
	can be used to indicate the end of the FDE-table.  Return
	the end of the FDE via *ADDRP.  Ignore CIEs (we may pick them
	up during linear searches through the FDE-table).
	Fill in the unwind-info only if really needed.  When needed,
	return the info via a dynamically allocated dwarf_cie_info
	structure.  Add support for `S' augmentation (ABI/tag pairs).

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm
c14371409a (fetch_proc_info): Decrement IP before searching for dynamic/static
unwind-info, since DWARF expects us to do so (unlikey for ia64,
	where we are guaranteed that the (return) IP points to the
	correct unwind-info).

2004/11/17 02:43:39-08:00 mostang.com!davidm
(run_cfi_program): Switch over to using dwarf_cie_info instead of
	unw_dyn_dwarf_fde_info_t.
(fetch_proc_info): Clear c->pi before filling it in.
(put_unwind_info): If we got non-dynamic unwind-info, free it
	via a call to mempool_free().
(parse_fde): Switch over to using dwarf_cie_info instead of
	unw_dyn_dwarf_fde_info_t.
(apply_reg_state): Drop accessees to c->cfa_is_sp.

2004/10/25 17:38:51+02:00 homeip.net!davidm
Fix typo: DW_CFA_CFA_expression -> DW_CFA_expression.

2004/10/21 11:15:44+02:00 homeip.net!davidm
Auto merged

2004/10/21 11:15:12+02:00 homeip.net!davidm
(run_cfi_program): Add missing newline in Debug statement.
(apply_reg_state): It was wrong to do a dwarf_get() on the CFA-location
	returned by eval_location_expr().  Instead, we must make sure
	we're dealing with a memory-location and, if so, just extract
	the memory address as the CFA.
	Also, update c->cfa only _after_ the other frame-state has
	been updated.  This seems to be necessary for correct parsing
	of the sigtramp unwind info.  Not sure yet this is 100% correct,
	but it gets us through Gtest-resume-sig.

2004/10/19 23:24:56-07:00 mostang.com!davidm
(run_cfi_program): Fix typos in Debug statements.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm
4502aa0ff2 (dwarf_read_encoded_pointer): Implement simply by calling
dwarf_read_encoded_pointer_inlined().

2004/11/17 02:43:39-08:00 mostang.com!davidm
(dwarf_read_encoded_pointer): Declare proc-info-pointer argument
	as "const".

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
mostang.com!davidm
3239e7db60 (dwarf_cie_info_pool): New variable.
(dwarf_init): Initialize dwarf_cie_info_pool.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
homeip.net!davidm
bb03dca33e Add Debug statement for return-value.
2004/10/19 23:15:02-07:00 mostang.com!davidm
(update_frame_state): Take additional argument "prev_cfa".
	When we detect a NULL-frame, debug-print the IP and the CFA
	so we know where things went wrong.
(dwarf_step): Get "prev_cfa" before we call dwarf_find_save_locs(),
	since update_frame_state() doesn't actually update
	the CFA.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
homeip.net!davidm
670399d357 (pop): Returning the right element does help...
(pick): Likewise.
(dwarf_eval_expr): Fix "while" conditional so we see all operators.
	Fix DW_OP_litN typo: "opcode = DW_OP_lit0" to
	"opcode - DW_OP_lit0".
	Add lots of Debug() statements so we can see what's going
	on.  Debug level 15 will show just entry/return values.
	Debug level 16 shows all operators.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
com[davidm]!marky
271f706944 dwarf: fix local & remote table lookup
(Logical change 1.256)
2004-08-24 08:19:00 +00:00
homeip.net!davidm
642607dbaa Cast register indices of type unw_word_t to (unsigned int) before
printing them.  Avoids compiler-warning for 64-bit targets.

(apply_reg_state): Handle the special case where the stack-pointer
	plays the role of the CFA and the stack-pointer hasn't
	been saved.  This is based on a patch by Max Asbock.

(Logical change 1.253)
2004-08-20 11:23:15 +00:00
homeip.net!davidm
9ac7a860d1 (parse_cie): Clarify the comment about the default FDE-encoding a bit.
(Logical change 1.253)
2004-08-20 11:23:15 +00:00
homeip.net!davidm
077322d414 Drop DWARF-parsing debug prints from level 16 to 15.
(parse_cie): Pick correct default for FDE-encoding, not just DW_EH_PE_omit.

(Logical change 1.248)
2004-08-19 12:26:11 +00:00
homeip.net!davidm
aae368ace2 Drop DWARF-parsing debug prints from level 16 to 15.
(Logical change 1.248)
2004-08-19 12:26:11 +00:00
homeip.net!davidm
e9045e3cca Add include of dwarf_i.h now that we need dwarf_reads32().
Drop DWARF-parsing debug prints from level 16 to 15.
(struct table_entry): Change member types from unw_word_t to int32_t.  The members
	need to be of a signed type and forcing them to 32 bits makes the type
	work for both 32-bit and 64-bit executables (up to 4GB of text-size).
(callback): Only allow search tables which have 32-bit members.
	Fix initialization of di->u.rti.table_len to express table-length as a count
	of unw_word_t, as it's defined to be (we get lucky here: even with 32-bit
	members, each table-entry contains two members so we're guaranteed that the
	table has a size that is an integer-multiple of unw_word_t even on 64-bit
	platforms).
(lookup): Change type of "rel_ip" from unw_word_t to int32_t.  Simplify the
	code a bit.
(remote_read): Delete.
(remote_lookup): Use dwarf_reads32() instead of remote_read() to read out table
	members.  Simplify code a bit.

(Logical change 1.248)
2004-08-19 12:26:11 +00:00
homeip.net!davidm
02d4112138 Rename: src/dwarf/global-dwarf.c -> src/dwarf/global.c
}(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
08d29fd0ab Rename: src/dwarf/global-dwarf.c -> src/dwarf/global.c
(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
16213e9846 Rename: src/dwarf/Gstep-dwarf.c -> src/dwarf/Gstep.c
}(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
6037c78f41 Rename: src/dwarf/Gstep-dwarf.c -> src/dwarf/Gstep.c
(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
e3066cb69a Rename: src/dwarf/Gpe-dwarf.c -> src/dwarf/Gpe.c
}(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
fa5c508536 Rename: src/dwarf/Gpe-dwarf.c -> src/dwarf/Gpe.c
(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
9636cfef38 Rename: src/dwarf/Gparser-dwarf.c -> src/dwarf/Gparser.c
}(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
88160e0f66 Rename: src/dwarf/Gparser-dwarf.c -> src/dwarf/Gparser.c
(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
91c9e6a384 Rename: src/dwarf/Gfde-dwarf.c -> src/dwarf/Gfde.c
}(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
32f3a1e58f Rename: src/dwarf/Gfde-dwarf.c -> src/dwarf/Gfde.c
(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
c7d65772a7 Rename: src/dwarf/Gexpr-dwarf.c -> src/dwarf/Gexpr.c
}(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
b79f7d1424 Rename: src/dwarf/Gexpr-dwarf.c -> src/dwarf/Gexpr.c
(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
b29905fdc9 Regenerate.
}(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
7e7c187712 Regenerate.
2004/08/17 16:33:56+02:00 homeip.net!davidm
Rename: src/dwarf/Lstep-dwarf.c -> src/dwarf/Lstep.c

(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
a26c1196b8 Regenerate.
2004/08/17 16:33:56+02:00 homeip.net!davidm
Rename: src/dwarf/Lpe-dwarf.c -> src/dwarf/Lpe.c

(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
9084efe60a Regenerate.
2004/08/17 16:33:56+02:00 homeip.net!davidm
Rename: src/dwarf/Lparser-dwarf.c -> src/dwarf/Lparser.c

(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
65c3977dbd Regenerate.
2004/08/17 16:33:56+02:00 homeip.net!davidm
Rename: src/dwarf/Lfde-dwarf.c -> src/dwarf/Lfde.c

(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
c7957fa943 Regenerate.
2004/08/17 16:33:56+02:00 homeip.net!davidm
Rename: src/dwarf/Lexpr-dwarf.c -> src/dwarf/Lexpr.c

(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm
3f9d2e9c5c Initial revision 2004-08-17 15:34:28 +00:00
mostang.com!davidm
8241bb15a8 (struct table_entry): Move declrataion outside of !UNW_REMOTE_ONLY
bracket so the file compiles for UNW_REMOTE_ONLY, too.

(Logical change 1.224)
2004-05-05 01:54:53 +00:00
mostang.com!davidm
8fd300ae66 (fetch_proc_info): Call tdep_find_proc_info() instead of
dwarf_find_proc_info() so that the remote-case works, too.

(Logical change 1.224)
2004-05-05 01:54:53 +00:00
mostang.com!davidm
d3fad3af12 (dwarf_find_proc_info): Mask signal-delivery during dl_iterate_phdr().
(Logical change 1.203)
2004-04-01 08:09:28 +00:00
hp.com!davidm
3351beeb0b Include "dwarf_i.h" instead of "dwarf.h".
(Logical change 1.162)
2004-01-30 00:01:24 +00:00
hp.com!davidm
21595821bf (dwarf_search_unwind_table): Declare as PROTECTED, not HIDDEN.
(Logical change 1.162)
2004-01-30 00:01:24 +00:00
hp.com!davidm
eb51b4294a (Logical change 1.145) 2003-12-20 11:43:08 +00:00
hp.com!davidm
0bbb2fab68 Initial revision 2003-12-20 11:38:49 +00:00