mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-30 00:52:16 +08:00
PR gdb/14704:
* gdb_bfd.c (gdb_bfd_ref): Set BFD_DECOMPRESS. (zlib_decompress_section): Remove. (gdb_bfd_map_section): Only check for compressed section in mmap case. Use bfd_get_full_section_contents. * osabi.c (check_note): Add 'sectsize' argument. Read section data. (generic_elf_osabi_sniff_abi_tag_sections): Don't read section data. Update for check_note change. * xcoffread.c (xcoff_initial_scan): Use bfd_get_full_section_contents. * py-auto-load.c (auto_load_section_scripts): Use bfd_get_full_section_contents. * contrib/cc-with-tweaks.sh: Add -Z option. testsuite * gdb.base/comprdebug.exp: New file.
This commit is contained in:
@ -36,6 +36,7 @@
|
||||
# (More documentation is to come.)
|
||||
|
||||
# ARGS determine what is done. They can be:
|
||||
# -Z invoke objcopy --compress-debug-sections
|
||||
# -z compress using dwz
|
||||
# -m compress using dwz -m
|
||||
# -i make an index
|
||||
@ -74,9 +75,11 @@ want_index=false
|
||||
want_dwz=false
|
||||
want_multi=false
|
||||
want_dwp=false
|
||||
want_objcopy_compress=false
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-Z) want_objcopy_compress=true ;;
|
||||
-z) want_dwz=true ;;
|
||||
-i) want_index=true ;;
|
||||
-m) want_multi=true ;;
|
||||
@ -138,6 +141,12 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$want_objcopy_compress" = true ]; then
|
||||
$OBJCOPY --compress-debug-sections "$output_file"
|
||||
rc=$?
|
||||
[ $rc != 0 ] && exit $rc
|
||||
fi
|
||||
|
||||
if [ "$want_index" = true ]; then
|
||||
$GDB --batch-silent -nx -ex "set auto-load no" -ex "file $output_file" -ex "save gdb-index $output_dir"
|
||||
rc=$?
|
||||
|
Reference in New Issue
Block a user