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

Parse /proc/self/maps when the dynamic loader doesn't provide enough info #117

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pedronavf
Copy link
Contributor

When the dynamic loader doesn't provide enough information about a module's location, use /proc/self/maps to figure out the absolute file path and loading address.

The contents of the file are kept cached as they might be useful to resolve other traces.

provide enough information about a module's location
@@ -1676,72 +1676,91 @@ class TraceResolverLinuxImpl<trace_resolver_tag::libdwarf>:
// Let's try to find from which loaded object it comes from.
// The loaded object can be yourself btw.

Dl_info symbol_info;
Dl_info symbol_info = { NULL, NULL, NULL, NULL };
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memset/bzero instead? in the worse case, use nullptr

@@ -1872,9 +1891,29 @@ class TraceResolverLinuxImpl<trace_resolver_tag::libdwarf>:
}
};

typedef std::map<Dwarf_Off, die_cache_entry> die_cache_t;
struct proc_maps_entry {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a big deal, but maybe cleanup the indentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants