Skip to content

Commit faa3cb0

Browse files
committed
Correctly update reproducer hooks for SB API I added
In 9ea6dd5 / https://reviews.llvm.org/D88387 where I added skinny corefile creation, I added new SB API and tried to manually update the hooks for the reproducers. I missed a spot, and I should have used lldb-instr to update the instrumentation automatically. (cherry picked from commit 65bc8ba)
1 parent d825321 commit faa3cb0

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

lldb/source/API/SBMemoryRegionInfo.cpp

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ const char *SBMemoryRegionInfo::GetName() {
116116
return m_opaque_up->GetName().AsCString();
117117
}
118118

119-
bool SBMemoryRegionInfo::HasDirtyMemoryPageList() {
120-
LLDB_RECORD_METHOD_NO_ARGS(bool, SBMemoryRegionInfo, HasDirtyMemoryPageList);
119+
bool SBMemoryRegionInfo::HasDirtyMemoryPageList() {LLDB_RECORD_METHOD_NO_ARGS(bool, SBMemoryRegionInfo, HasDirtyMemoryPageList);
120+
121121

122122
return m_opaque_up->GetDirtyPageList().hasValue();
123123
}
124124

125-
uint32_t SBMemoryRegionInfo::GetNumDirtyPages() {
126-
LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBMemoryRegionInfo, GetNumDirtyPages);
125+
uint32_t SBMemoryRegionInfo::GetNumDirtyPages() {LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBMemoryRegionInfo, GetNumDirtyPages);
126+
127127

128128
uint32_t num_dirty_pages = 0;
129129
llvm::Optional<std::vector<addr_t>> dirty_page_list =
@@ -134,9 +134,8 @@ uint32_t SBMemoryRegionInfo::GetNumDirtyPages() {
134134
return num_dirty_pages;
135135
}
136136

137-
addr_t SBMemoryRegionInfo::GetDirtyPageAddressAtIndex(uint32_t idx) {
138-
LLDB_RECORD_METHOD(addr_t, SBMemoryRegionInfo, GetDirtyPageAddressAtIndex,
139-
(uint32_t), idx);
137+
addr_t SBMemoryRegionInfo::GetDirtyPageAddressAtIndex(uint32_t idx) {LLDB_RECORD_METHOD(lldb::addr_t, SBMemoryRegionInfo, GetDirtyPageAddressAtIndex, (uint32_t), idx);
138+
140139

141140
addr_t dirty_page_addr = LLDB_INVALID_ADDRESS;
142141
const llvm::Optional<std::vector<addr_t>> &dirty_page_list =
@@ -147,8 +146,9 @@ addr_t SBMemoryRegionInfo::GetDirtyPageAddressAtIndex(uint32_t idx) {
147146
return dirty_page_addr;
148147
}
149148

150-
int SBMemoryRegionInfo::GetPageSize() {
151-
LLDB_RECORD_METHOD_NO_ARGS(int, SBMemoryRegionInfo, GetPageSize);
149+
int SBMemoryRegionInfo::GetPageSize() {LLDB_RECORD_METHOD_NO_ARGS(int, SBMemoryRegionInfo, GetPageSize);
150+
151+
152152
return m_opaque_up->GetPageSize();
153153
}
154154

@@ -196,6 +196,10 @@ void RegisterMethods<SBMemoryRegionInfo>(Registry &R) {
196196
LLDB_REGISTER_METHOD(const char *, SBMemoryRegionInfo, GetName, ());
197197
LLDB_REGISTER_METHOD(bool, SBMemoryRegionInfo, GetDescription,
198198
(lldb::SBStream &));
199+
LLDB_REGISTER_METHOD(bool, SBMemoryRegionInfo, HasDirtyMemoryPageList, ());
200+
LLDB_REGISTER_METHOD(uint32_t, SBMemoryRegionInfo, GetNumDirtyPages, ());
201+
LLDB_REGISTER_METHOD(lldb::addr_t, SBMemoryRegionInfo, GetDirtyPageAddressAtIndex, (uint32_t));
202+
LLDB_REGISTER_METHOD(int, SBMemoryRegionInfo, GetPageSize, ());
199203
}
200204

201205
}

0 commit comments

Comments
 (0)