llvm-6502/test/DebugInfo/PDB/pdbdump-symbol-format.test
Zachary Turner 92d755ea65 [llvm-pdbdump] Add an option to dump full class definitions.
This adds the --class-definitions flag.  If specified, when dumping
types, instead of "class Foo" you will see the full class definition,
with member functions, constructors, access specifiers.

NOTE: Using this option can be very slow, as generating a full class
definition requires accessing many different parts of the PDB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230203 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-23 05:58:34 +00:00

49 lines
2.1 KiB
Plaintext

; RUN: llvm-pdbdump -symbols %p/Inputs/symbolformat.pdb | FileCheck --check-prefix=SYM_FORMAT %s
; RUN: llvm-pdbdump -types %p/Inputs/symbolformat.pdb | FileCheck --check-prefix=TYPES_FORMAT %s
; RUN: llvm-pdbdump -types -class-definitions %p/Inputs/symbolformat.pdb | FileCheck --check-prefix=FULL_CLASS %s
; The format is func [0x<rva_start>+<prologue_length> - 0x<rva_end>-<epilogue_length>]
; SYM_FORMAT: symbolformat-fpo.obj
; SYM_FORMAT-DAG: func [0x001130+0 - 0x001137-1] (FPO) uint32_t __cdecl fpo_func(uint32_t n)
; SYM_FORMAT: symbolformat.obj
; SYM_FORMAT-DAG: func [0x001140+3 - 0x001147-2] (EBP) int32_t __cdecl _purecall()
; SYM_FORMAT-DAG: func [0x001150+6 - 0x0011b6-4] (EBP) int32_t __cdecl main(int32_t argc, char** argv)
; SYM_FORMAT-DAG: func [0x0010b0+7 - 0x0010c7-4] (EBP) void A::A()
; SYM_FORMAT-DAG: func [0x0011c0+7 - 0x0011f1-6] (EBP) void B::B()
; SYM_FORMAT-DAG: thunk [0x000010f6 - 0x000010fa] (Pcode) B::`vcall'{0}'
; SYM_FORMAT-DAG: func [0x001100+7 - 0x00110b-4] (EBP) virtual void B::PureFunc()
; SYM_FORMAT-DAG: func [0x001110+7 - 0x00111b-4] (EBP) void A::RegularFunc()
; SYM_FORMAT-DAG: func [0x001120+7 - 0x00112b-4] (EBP) virtual void A::VirtualFunc()
; TYPES_FORMAT: Enums
; TYPES_FORMAT-DAG: enum TestEnum
; TYPES_FORMAT-DAG: enum TestEnumClass
; TYPES_FORMAT: Function Signatures
; TYPES_FORMAT-DAG: int32_t __cdecl ()
; TYPES_FORMAT-DAG: int32_t __cdecl (int32_t, char**)
; TYPES_FORMAT-DAG: void (A::)()
; TYPES_FORMAT-DAG: void (B::)()
; TYPES_FORMAT-DAG: void (B::)(B&)
; TYPES_FORMAT-DAG: void (B::)()
; TYPES_FORMAT-DAG: B& (B::)(B&)
; TYPES_FORMAT-DAG: void (A::)(A&)
; TYPES_FORMAT-DAG: void (A::)()
; TYPES_FORMAT-DAG: A& (A::)(A&)
; TYPES_FORMAT: Typedefs
; TYPES_FORMAT-DAG: typedef int32_t IntType
; TYPES_FORMAT-DAG: typedef class A ClassAType
; TYPES_FORMAT: Classes
; TYPES_FORMAT-DAG: class A
; TYPES_FORMAT-DAG: class B
; FULL_CLASS: Classes
; FULL_CLASS-DAG: class A {
; FULL_CLASS: public:
; FULL_CLASS: virtual void PureFunc() = 0
; FULL_CLASS: virtual void VirtualFunc()
; FULL_CLASS: void RegularFunc()
; FULL_CLASS: }
; FULL_CLASS-DAG: class B {
; FULL_CLASS: public:
; FULL_CLASS: virtual void PureFunc()
; FULL_CLASS: }