-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
libcdb-cli: add --offline-only
, refactor unstrip and add fetch parser for download libc-database
#2478
base: dev
Are you sure you want to change the base?
Conversation
path = libcdb.search_by_build_id(libc['buildid'], args.unstrip) | ||
if path: | ||
if args.unstrip: | ||
libcdb.unstrip_libc(path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this causes cached libcs to not be unstripped even when unstrip
was set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will unstrip in search_by_hash
(called by search_by_build_id
)
Lines 283 to 285 in b08f4b7
# Try to find debug info for this libc. | |
if unstrip: | |
unstrip_libc(cache) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't if the file was downloaded before and is cached without debug symbols.
Lines 255 to 257 in b08f4b7
cache, cache_valid = _check_elf_cache('libcdb', search_target, search_type) | |
if cache_valid: | |
return cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I overlooked that. But why not unstrip before return cache
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, that's the better place to put this!
--offline-only
, refactor unstrip and add fetch parser for download libc-database
unstrip
as default behavior, except file parserreturn_raw
forsearch_by_symbol_offsets