aboutsummaryrefslogtreecommitdiff
path: root/gdb/contrib
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-11-08 19:52:42 +0000
committerTom Tromey <tromey@redhat.com>2012-11-08 19:52:42 +0000
commitea9f10bb87523d421e6c863a7ec66dfee41692b4 (patch)
tree4ffaabac48c8d7f9209e224d1de031c7db0f3406 /gdb/contrib
parentd071a26bbc15eff9beaa74baef98ffdf4ae2653d (diff)
downloadgdb-ea9f10bb87523d421e6c863a7ec66dfee41692b4.zip
gdb-ea9f10bb87523d421e6c863a7ec66dfee41692b4.tar.gz
gdb-ea9f10bb87523d421e6c863a7ec66dfee41692b4.tar.bz2
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.
Diffstat (limited to 'gdb/contrib')
-rwxr-xr-xgdb/contrib/cc-with-tweaks.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/contrib/cc-with-tweaks.sh b/gdb/contrib/cc-with-tweaks.sh
index ccc9c5a..fbb2b88 100755
--- a/gdb/contrib/cc-with-tweaks.sh
+++ b/gdb/contrib/cc-with-tweaks.sh
@@ -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=$?