• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Check that memory region parsing works correctly, with a particular emphasis
2# on the boundary conditions.
3
4# RUN: yaml2obj --docnum=1 %s -o %t1.dmp
5# RUN: yaml2obj --docnum=2 %s -o %t2.dmp
6# RUN: yaml2obj %S/Inputs/basic-elf.yaml -o %T/memory-region-from-module.exe
7
8# RUN: %lldb -b -c %t1.dmp %T/memory-region-from-module.exe \
9# RUN:   -o "memory region 0" -o "memory region 0x4000" \
10# RUN:   -o "memory region 0x5000" -o "memory region 0x6000" \
11# RUN:   | FileCheck --check-prefix=ALL --check-prefix=CHECK1 %s
12
13# RUN: %lldb -b -c %t2.dmp %T/memory-region-from-module.exe \
14# RUN:   -o "memory region 0" -o "memory region 0x4000" \
15# RUN:   -o "memory region 0x5000" -o "memory region 0x6000" \
16# RUN:   | FileCheck --check-prefix=ALL --check-prefix=CHECK2 %s
17
18# ALL-LABEL: (lldb) memory region 0
19# ALL: [0x0000000000000000-0x0000000000004000) ---
20# ALL-LABEL: (lldb) memory region 0x4000
21# CHECK1: [0x0000000000004000-0x00000000000040b0) r-x {{.*}}memory-region-from-module.exe PT_LOAD[0]
22# CHECK2: [0x0000000000004000-0x0000000000004010) r??
23# ALL-LABEL: (lldb) memory region 0x5000
24# ALL: [0x0000000000005000-0x000000000000505c) rw- {{.*}}memory-region-from-module.exe PT_LOAD[1]
25# ALL-LABEL: (lldb) memory region 0x6000
26# ALL: [0x000000000000505c-0xffffffffffffffff) ---
27
28--- !minidump
29Streams:
30  - Type:            ModuleList
31    Modules:
32      - Base of Image:   0x0000000000004000
33        Size of Image:   0x00002000
34        Module Name:     'memory-region-from-module.exe'
35        CodeView Record: 4C457042DEADBEEFBAADF00D
36
37  - Type:            SystemInfo
38    Processor Arch:  AMD64
39    Platform ID:     Linux
40    CPU:
41      Vendor ID:       GenuineIntel
42      Version Info:    0x00000000
43      Feature Info:    0x00000000
44  - Type:            LinuxProcStatus
45    Text:             |
46      Name:	memory-region-from-module.exe
47      State:	t (tracing stop)
48      Tgid:	29939
49      Ngid:	0
50      Pid:	29939
51      PPid:	29370
52      TracerPid:	29940
53      Uid:	1001	1001	1001	1001
54      Gid:	1001	1001	1001	1001
55
56...
57
58--- !minidump
59Streams:
60  - Type:            MemoryList
61    Memory Ranges:   
62      - Start of Memory Range: 0x0000000000004000
63        Content:         30044000000000000000000000000000
64  - Type:            ModuleList
65    Modules:
66      - Base of Image:   0x0000000000004000
67        Size of Image:   0x00002000
68        Module Name:     'memory-region-from-module.exe'
69        CodeView Record: 4C457042DEADBEEFBAADF00D
70
71  - Type:            SystemInfo
72    Processor Arch:  AMD64
73    Platform ID:     Linux
74    CPU:
75      Vendor ID:       GenuineIntel
76      Version Info:    0x00000000
77      Feature Info:    0x00000000
78  - Type:            LinuxProcStatus
79    Text:             |
80      Name:	memory-region-from-module.exe
81      State:	t (tracing stop)
82      Tgid:	29939
83      Ngid:	0
84      Pid:	29939
85      PPid:	29370
86      TracerPid:	29940
87      Uid:	1001	1001	1001	1001
88      Gid:	1001	1001	1001	1001
89
90...
91