jason.vas.dias at gmail dot com
2018-03-20 02:14:33 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=22984
Bug ID: 22984
Summary: please add enhanced support for compressed separate
debug_info files
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: jason.vas.dias at gmail dot com
Target Milestone: ---
Created attachment 10903
--> https://sourceware.org/bugzilla/attachment.cgi?id=10903&action=edit
basic simplest version that just checks if a compressed debug_info file exists
and uncompresses before loading if so
Please make gdb look for compressed versions of separate debug_info
files , and in some configurable location or list of such -
Reading the manual :
(gdb) Separate Debug Files
* For the "build ID" method, GDB looks in the '.build-id'
subdirectory of each one of the global debug directories for a file
named 'NN/NNNNNNNN.debug', where NN are the first 2 hex characters
of the build ID bit string, and NNNNNNNN are the rest of the bit
string. (Real build ID strings are 32 or more hex characters, not
10.)
Great! But, if it fails to find a file with plain '.debug' suffix,
and some new configuration variable eg. 'compressors' has a non-empty value,
then please let it try a list of expected extensions, eg. '.xz', '.gz', '.bz2'
... that map to configured compressors whose executable exists, eg
'/usr/bin/xz', '/usr/bin/gzip', '/usr/bin/bzip2', etc
and perhaps use the file command or run some script
to enable decompression of compressed separate debug_info
section files produced by:
$ objdump --only-keep-debug \
${binary_with_debuginfo} ${separate_debuginfo_file}
So, if *.debug does not exist, try a list of extensions that map
to decompression executables, and if one of those exists,
decompress the file to $(mktemp /tmp/${UID}_XXXXXX.debug_info)
or to a temporary file in some configured default writable directory .
I am attaching a patch that implements the version I use that,
if the .debug file does not exist, just checks if the
xz compressed .debug.xz file exists and if so, decompresses it
before loading - this could easily be extended to handle a list
of decompressors / a decompression script.
I need something like this feature so I can keep debug_info files
in compressed format.
It would also nice to have a default command-line argument or
environment variable setting to initialize 'debug-file-directory',
and this should automatically include the directory of the currently
loaded file, IMHO .
Bug ID: 22984
Summary: please add enhanced support for compressed separate
debug_info files
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: jason.vas.dias at gmail dot com
Target Milestone: ---
Created attachment 10903
--> https://sourceware.org/bugzilla/attachment.cgi?id=10903&action=edit
basic simplest version that just checks if a compressed debug_info file exists
and uncompresses before loading if so
Please make gdb look for compressed versions of separate debug_info
files , and in some configurable location or list of such -
Reading the manual :
(gdb) Separate Debug Files
* For the "build ID" method, GDB looks in the '.build-id'
subdirectory of each one of the global debug directories for a file
named 'NN/NNNNNNNN.debug', where NN are the first 2 hex characters
of the build ID bit string, and NNNNNNNN are the rest of the bit
string. (Real build ID strings are 32 or more hex characters, not
10.)
Great! But, if it fails to find a file with plain '.debug' suffix,
and some new configuration variable eg. 'compressors' has a non-empty value,
then please let it try a list of expected extensions, eg. '.xz', '.gz', '.bz2'
... that map to configured compressors whose executable exists, eg
'/usr/bin/xz', '/usr/bin/gzip', '/usr/bin/bzip2', etc
and perhaps use the file command or run some script
to enable decompression of compressed separate debug_info
section files produced by:
$ objdump --only-keep-debug \
${binary_with_debuginfo} ${separate_debuginfo_file}
So, if *.debug does not exist, try a list of extensions that map
to decompression executables, and if one of those exists,
decompress the file to $(mktemp /tmp/${UID}_XXXXXX.debug_info)
or to a temporary file in some configured default writable directory .
I am attaching a patch that implements the version I use that,
if the .debug file does not exist, just checks if the
xz compressed .debug.xz file exists and if so, decompresses it
before loading - this could easily be extended to handle a list
of decompressors / a decompression script.
I need something like this feature so I can keep debug_info files
in compressed format.
It would also nice to have a default command-line argument or
environment variable setting to initialize 'debug-file-directory',
and this should automatically include the directory of the currently
loaded file, IMHO .
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.