[Lldb-commits] [lldb] r374046 - Tweak minidebuginfo-set-and-hit-breakpoint.test

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 8 06:51:05 PDT 2019


Author: labath
Date: Tue Oct  8 06:51:05 2019
New Revision: 374046

URL: http://llvm.org/viewvc/llvm-project?rev=374046&view=rev
Log:
Tweak minidebuginfo-set-and-hit-breakpoint.test

On my system, llvm-objcopy was refusing to remove the .dynsym section
because it was still referenced from .rela.plt. Remove that section too,
and clarify that this is needed only because llvm-objcopy
--only-keep-debug does not work (does not set the sections to
SHT_NOBITS). Also, ensure that the test is not creating temporary files
in the source tree.

Modified:
    lldb/trunk/lit/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test

Modified: lldb/trunk/lit/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test?rev=374046&r1=374045&r2=374046&view=diff
==============================================================================
--- lldb/trunk/lit/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test (original)
+++ lldb/trunk/lit/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test Tue Oct  8 06:51:05 2019
@@ -23,9 +23,9 @@
 # table.
 
 # IGNORE: comm -13 %t.dynsyms %t.funcsyms > %t.keep_symbols
-# The result of the preceeding command can be preprocessed in %p/Inputs/minidebuginfo.keep_symbols
+# The result of the preceeding command can be hardcoded
 # because we know what symbol to keep.
-# RUN: echo "multiplyByFour" > %p/Inputs/minidebuginfo.keep_symbols
+# RUN: echo "multiplyByFour" > %t.keep_symbols
 
 # Separate full debug info into debug binary.
 
@@ -34,12 +34,15 @@
 # Copy the full debuginfo, keeping only a minimal set of symbols and
 # removing some unnecessary sections.
 
-# RUN: llvm-objcopy -S --remove-section .gdb_index --remove-section .comment --keep-symbols=%p/Inputs/minidebuginfo.keep_symbols %t.debug %t.mini_debuginfo
+# RUN: llvm-objcopy -S --remove-section .gdb_index --remove-section .comment --keep-symbols=%t.keep_symbols %t.debug %t.mini_debuginfo
 
 # This command is not from the GDB manual but it slims down embedded minidebug
 # info. On top if that, it ensures that we only have the multiplyByThree symbol
-# in the .dynsym section of the main binary.
-# RUN: llvm-objcopy --remove-section=.rela.dyn --remove-section=.gnu.version --remove-section=.gnu.hash --remove-section=.dynsym %t.mini_debuginfo
+# in the .dynsym section of the main binary. The bits removing .rela.plt,
+# .rela.dyn and .dynsym sections can be removed once llvm-objcopy
+# --only-keep-debug starts to work.
+# RUN: llvm-objcopy --remove-section=.rela.plt --remove-section=.rela.dyn \
+# RUN:   --remove-section=.gnu.version --remove-section=.gnu.hash --remove-section=.dynsym %t.mini_debuginfo
 
 # Drop the full debug info from the original binary.
 




More information about the lldb-commits mailing list