Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print DSO base address in DWARF stack trace #41880

Open
chingjun opened this issue May 12, 2020 · 2 comments
Open

Print DSO base address in DWARF stack trace #41880

chingjun opened this issue May 12, 2020 · 2 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@chingjun
Copy link
Contributor

(From the discussion in https://docs.google.com/document/d/1HjFIJJSo1pRKo6FH84yafKbeEoSjPOXtFwwZfIeQNM0/edit?disco=AAAAJe7uY38)

Many existing symbolication tools need to use the offset relative to the DSO, but in the current dwarf stack trace format, there is no way to obtain this offset. We could print the DSO base address so that it is possible to calculate the relative offset for each stack frame.

cc @mraleph @sstrickl

Thanks.

@sstrickl sstrickl self-assigned this May 13, 2020
@sstrickl sstrickl added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label May 13, 2020
dart-bot pushed a commit that referenced this issue May 20, 2020
Bug: #41880

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: Ie68248a81167dfe05cbe65960fac8a8e029b9db3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147907
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
dart-bot pushed a commit that referenced this issue May 26, 2020
The relocated addresses are populated during BSS::Initialize() for
natively loaded ELF snapshots, and during the non-native loader when it
is used. Putting this information in the BSS segment avoids having to
change the embedder interface, since we only need this information for
AOT snapshots. This also avoids depending on our ELF snapshot layout
to reverse-engineer the DSO base for ELF-compiled snapshots.

We now always print the DSO base for both the VM and isolate in
non-symbolic stack traces, not just for ELF-compiled snapshots. However,
we still only print the relocated addresses in individual stack frames
if we're guaranteed they match those in separately saved debugging
information.

Bug: #41880

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-precomp-mac-release-simarm64-try
Change-Id: I4837262f78e6e73a32eb7e24ef7a68ccb8ec2669
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148441
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
@sstrickl
Copy link
Contributor

This is done for non-symbolic stack traces. The only reason I haven't closed it yet is because I'd also like to add the DSO bases to the stack traces produced by the signal handler, now that it's accessible via the BSS sections and so we don't need signal-unsafe function calls to get it.

@mkustermann
Copy link
Member

@sstrickl is there anything remaining here or can this be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

3 participants