1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
| ## Show that the --disassemble-functions switch takes demangled names when
## --demangle is specified, otherwise the switch takes mangled names.
# RUN: yaml2obj %s -o %t.o
## --disassemble-functions without --demangle.
# RUN: llvm-objdump --disassemble-functions=_Z3foov %t.o | FileCheck %s --check-prefix=MANGLED
# RUN: llvm-objdump --disassemble-functions='foo()' %t.o 2>&1 \
# RUN: | FileCheck %s --check-prefix=MANGLED-MISS
# RUN: llvm-objdump --disassemble-functions=foo %t.o 2>&1 \
# RUN: | FileCheck %s --check-prefix=MANGLED-MISS
# RUN: llvm-objdump --disassemble-functions='i,f' %t.o | FileCheck %s --check-prefix=NOMANGLE
## --disassemble-functions with --demangle.
# RUN: llvm-objdump -C --disassemble-functions='foo()' %t.o | FileCheck %s --check-prefix=DEMANGLED
# RUN: llvm-objdump -C --disassemble-functions='_Z3foov' %t.o 2>&1 \
# RUN: | FileCheck %s --check-prefix=DEMANGLED-MISS
# RUN: llvm-objdump -C --disassemble-functions='i,f' %t.o | FileCheck %s --check-prefix=NOMANGLE
# RUN: llvm-objdump -C --disassemble-functions='std::allocator<wchar_t>::allocator()' %t.o 2>&1 \
# RUN: | FileCheck %s --check-prefix=DEMANGLED-MULTI
# MANGLED: _Z3foov:
# MANGLED-MISS: warning: '{{.*}}': failed to disassemble missing function foo
# DEMANGLED: foo():
# DEMANGLED-MISS: warning: '{{.*}}': failed to disassemble missing function _Z3foov
# NOMANGLE: i:
# NOMANGLE: f:
# DEMANGLED-MULTI: std::allocator<wchar_t>::allocator():
# DEMANGLED-MULTI: std::allocator<wchar_t>::allocator():
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [SHF_ALLOC, SHF_EXECINSTR]
Address: 0x1000
Content: 9090909090
Symbols:
- Name: _Z3foov
Value: 0x1000
Section: .text
- Name: i
Value: 0x1001
Section: .text
- Name: f
Value: 0x1002
Section: .text
- Name: _ZNSaIwEC1Ev
Value: 0x1003
Section: .text
- Name: _ZNSaIwEC2Ev
Value: 0x1004
Section: .text
|