[llvm] r174543 - Add a test for checking the current .debug_frame dumping capability.

David Blaikie dblaikie at gmail.com
Wed Feb 6 13:28:06 PST 2013


On Wed, Feb 6, 2013 at 12:55 PM, Eli Bendersky <eliben at google.com> wrote:
> Author: eliben
> Date: Wed Feb  6 14:55:06 2013
> New Revision: 174543
>
> URL: http://llvm.org/viewvc/llvm-project?rev=174543&view=rev
> Log:
> Add a test for checking the current .debug_frame dumping capability.
>
> The test is a binary placed in test/DebugInfo/Inputs, with a source C
> file used for reference/reproducing. The source's first line is a clang
> build command for reproducing the binary.

FWIW in other cases Eric & I have just been putting the source in
comments in the actual test file - makes it obvious. I probably
wouldn't think to look in other files to find the source the test case
was generated from. (though, admittedly, it is a little easier to
build the test case when the source is there, rather than having to
copy/paset it out, trim the comment characters, then compile it)

- David

>
>
> Added:
>     llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.c
>     llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.o   (with props)
>     llvm/trunk/test/DebugInfo/dwarfdump-debug-frame-simple.test
>
> Added: llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.c
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.c?rev=174543&view=auto
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.c (added)
> +++ llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.c Wed Feb  6 14:55:06 2013
> @@ -0,0 +1,14 @@
> +// clang -c -g -o dwarfdump-test-32bit.elf.o -m32 dwarfdump-test-32bit.elf.c
> +
> +extern int glob;
> +
> +int foo(int arg) {
> +  int a = arg * 2;
> +  return a + glob;
> +}
> +
> +int bar(int arg) {
> +  int a = foo(arg) * foo(arg * 2);
> +  return glob - foo(a);
> +}
> +
>
> Added: llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.o
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.o?rev=174543&view=auto
> ==============================================================================
> Binary file - no diff available.
>
> Propchange: llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.o
> ------------------------------------------------------------------------------
>     svn:mime-type = application/octet-stream
>
> Added: llvm/trunk/test/DebugInfo/dwarfdump-debug-frame-simple.test
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/dwarfdump-debug-frame-simple.test?rev=174543&view=auto
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/dwarfdump-debug-frame-simple.test (added)
> +++ llvm/trunk/test/DebugInfo/dwarfdump-debug-frame-simple.test Wed Feb  6 14:55:06 2013
> @@ -0,0 +1,14 @@
> +; RUN: llvm-dwarfdump %p/Inputs/dwarfdump-test-32bit.elf.o -debug-dump=frames | FileCheck %s -check-prefix FRAMES
> +
> +; FRAMES: .debug_frame
> +; FRAMES-NOT: .eh_frame
> +
> +; FRAMES: 00000000 00000010 ffffffff CIE
> +; FRAMES: Version: 1
> +
> +; FRAMES: 00000014 00000010 00000000 FDE cie=00000000 pc=00000000...00000022
> +; FRAMES: 00000028 00000014 00000000 FDE cie=00000000 pc=00000030...00000080
> +
> +; FRAMES-NOT: CIE
> +; FRAMES-NOT: FDE
> +
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list