aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-09-11 08:31:44 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-09-11 08:31:44 +0000
commitedf9f00c51bc274219a12a2b572abc9ad259af96 (patch)
tree5af7a118a503547d87fc7a27c5bcb49f86cf712d /gdb/doc
parent1d236d23086bc8ce7d85ed03e9721631e4145538 (diff)
downloadfsf-binutils-gdb-edf9f00c51bc274219a12a2b572abc9ad259af96.zip
fsf-binutils-gdb-edf9f00c51bc274219a12a2b572abc9ad259af96.tar.gz
fsf-binutils-gdb-edf9f00c51bc274219a12a2b572abc9ad259af96.tar.bz2
minidebuginfo: Fix stripping/debuginfo
gdb/doc/ 2013-09-11 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.texinfo (MiniDebugInfo): Prepare file debug and use it to create mini_debuginfo. Strip binary before adding mini_debuginfo to it. gdb/testsuite/ 2013-09-11 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.base/gnu-debugdata.exp (objcopy 1): Move it lower and use only debug part of the binary.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo8
2 files changed, 12 insertions, 1 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 442b601..1b3e45c 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,5 +1,10 @@
2013-09-11 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * gdb.texinfo (MiniDebugInfo): Prepare file debug and use it to create
+ mini_debuginfo. Strip binary before adding mini_debuginfo to it.
+
+2013-09-11 Jan Kratochvil <jan.kratochvil@redhat.com>
+
Sync documentation with gdb.base/gnu-debugdata.exp.
* gdb.texinfo (MiniDebugInfo): Add comment and "D" in the example.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 00f8e77..b6ba239 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -17340,10 +17340,16 @@ nm @var{binary} --format=posix --defined-only \
# table.
comm -13 dynsyms funcsyms > keep_symbols
+# Separate full debug info into debug binary.
+objcopy --only-keep-debug @var{binary} debug
+
# Copy the full debuginfo, keeping only a minimal set of symbols and
# removing some unnecessary sections.
objcopy -S --remove-section .gdb_index --remove-section .comment \
- --keep-symbols=keep_symbols @var{binary} mini_debuginfo
+ --keep-symbols=keep_symbols debug mini_debuginfo
+
+# Drop the full debug info from the original binary.
+strip --strip-all -R .comment @var{binary}
# Inject the compressed data into the .gnu_debugdata section of the
# original binary.