Fix computation of object address for safe object frames. I forgot to do this as part of a528aa8e0b, also related to #104
This commit is contained in:
parent
499bea182c
commit
4f94f20d41
@ -235,7 +235,9 @@ namespace cpptrace {
|
||||
);
|
||||
struct CPPTRACE_EXPORT safe_object_frame {
|
||||
frame_ptr raw_address;
|
||||
frame_ptr address_relative_to_object_start; // base must still be added
|
||||
// This ends up being the real object address. It was named at a time when I thought the object base address
|
||||
// still needed to be added in
|
||||
frame_ptr address_relative_to_object_start;
|
||||
char object_path[CPPTRACE_PATH_MAX + 1];
|
||||
// To be called outside a signal handler. Not signal safe.
|
||||
object_frame resolve() const;
|
||||
|
||||
@ -169,13 +169,9 @@ namespace detail {
|
||||
""
|
||||
};
|
||||
}
|
||||
auto base = get_module_image_base(frame.object_path);
|
||||
if(base.is_error()) {
|
||||
throw base.unwrap_error(); // This throw is intentional
|
||||
}
|
||||
return {
|
||||
frame.raw_address,
|
||||
frame.address_relative_to_object_start + base.unwrap_value(),
|
||||
frame.address_relative_to_object_start,
|
||||
std::move(object_path)
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user