Skip to content

Commit 6652a45

Browse files
Jeffrey Tanclayborg
authored andcommitted
Undo format
1 parent 55d5d0c commit 6652a45

File tree

3 files changed

+13
-71
lines changed

3 files changed

+13
-71
lines changed

lldb/include/lldb/Core/LoadedModuleInfoList.h

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ class LoadedModuleInfoList {
2727
e_has_base,
2828
e_has_dynamic,
2929
e_has_link_map,
30-
e_has_uuid,
31-
e_has_file_offset,
32-
e_has_file_size,
33-
e_has_native_memory_address,
34-
e_has_native_memory_size,
3530
e_num
3631
};
3732

@@ -82,51 +77,6 @@ class LoadedModuleInfoList {
8277
return m_has[e_has_dynamic];
8378
}
8479

85-
void set_uuid(const std::string &uuid) {
86-
m_uuid_str = uuid;
87-
m_has[e_has_uuid] = true;
88-
}
89-
bool get_uuid(std::string &out) const {
90-
out = m_uuid_str;
91-
return m_has[e_has_uuid];
92-
}
93-
94-
void set_file_offset(uint64_t offset) {
95-
m_file_offset = offset;
96-
m_has[e_has_file_offset] = true;
97-
}
98-
bool get_file_offset(uint64_t &out) const {
99-
out = m_file_offset;
100-
return m_has[e_has_file_offset];
101-
}
102-
103-
void set_file_size(uint64_t size) {
104-
m_file_size = size;
105-
m_has[e_has_file_size] = true;
106-
}
107-
bool get_file_size(uint64_t &out) const {
108-
out = m_file_size;
109-
return m_has[e_has_file_size];
110-
}
111-
112-
void set_native_memory_address(lldb::addr_t addr) {
113-
m_native_memory_address = addr;
114-
m_has[e_has_native_memory_address] = true;
115-
}
116-
bool get_native_memory_address(lldb::addr_t &out) const {
117-
out = m_native_memory_address;
118-
return m_has[e_has_native_memory_address];
119-
}
120-
121-
void set_native_memory_size(lldb::addr_t size) {
122-
m_native_memory_size = size;
123-
m_has[e_has_native_memory_size] = true;
124-
}
125-
bool get_native_memory_size(lldb::addr_t &out) const {
126-
out = m_native_memory_size;
127-
return m_has[e_has_native_memory_size];
128-
}
129-
13080
bool has_info(e_data_point datum) const {
13181
assert(datum < e_num);
13282
return m_has[datum];
@@ -139,12 +89,7 @@ class LoadedModuleInfoList {
13989
}
14090

14191
return (m_base == rhs.m_base) && (m_link_map == rhs.m_link_map) &&
142-
(m_dynamic == rhs.m_dynamic) && (m_name == rhs.m_name) &&
143-
(m_uuid_str == rhs.m_uuid_str) &&
144-
(m_file_offset == rhs.m_file_offset) &&
145-
(m_file_size == rhs.m_file_size) &&
146-
(m_native_memory_address == rhs.m_native_memory_address) &&
147-
(m_native_memory_size == rhs.m_native_memory_size);
92+
(m_dynamic == rhs.m_dynamic) && (m_name == rhs.m_name);
14893
}
14994

15095
protected:
@@ -154,11 +99,6 @@ class LoadedModuleInfoList {
15499
lldb::addr_t m_base = LLDB_INVALID_ADDRESS;
155100
bool m_base_is_offset = false;
156101
lldb::addr_t m_dynamic = LLDB_INVALID_ADDRESS;
157-
std::string m_uuid_str;
158-
uint64_t m_file_offset = 0;
159-
uint64_t m_file_size = 0;
160-
lldb::addr_t m_native_memory_address = LLDB_INVALID_ADDRESS;
161-
lldb::addr_t m_native_memory_size = 0;
162102
};
163103

164104
LoadedModuleInfoList() = default;

lldb/include/lldb/Target/Target.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,7 @@ class Target : public std::enable_shared_from_this<Target>,
14581458
ScriptBased,
14591459
CodeBased,
14601460
};
1461+
14611462
enum class StopHookResult : uint32_t {
14621463
KeepStopped = 0,
14631464
RequestContinue,

lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ size_t ProcessElfCore::DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
434434
const lldb::addr_t file_start = address_range->data.GetRangeBase();
435435
const lldb::addr_t file_end = address_range->data.GetRangeEnd();
436436
size_t bytes_to_read = size; // Number of bytes to read from the core file
437-
size_t bytes_copied = 0; // Number of bytes actually read from the core file
437+
size_t bytes_copied = 0; // Number of bytes actually read from the core file
438438
lldb::addr_t bytes_left =
439439
0; // Number of bytes available in the core file from the given address
440440

@@ -517,7 +517,8 @@ lldb::addr_t ProcessElfCore::GetImageInfoAddress() {
517517

518518
// Parse a FreeBSD NT_PRSTATUS note - see FreeBSD sys/procfs.h for details.
519519
static void ParseFreeBSDPrStatus(ThreadData &thread_data,
520-
const DataExtractor &data, bool lp64) {
520+
const DataExtractor &data,
521+
bool lp64) {
521522
lldb::offset_t offset = 0;
522523
int pr_version = data.GetU32(&offset);
523524

@@ -544,7 +545,8 @@ static void ParseFreeBSDPrStatus(ThreadData &thread_data,
544545

545546
// Parse a FreeBSD NT_PRPSINFO note - see FreeBSD sys/procfs.h for details.
546547
static void ParseFreeBSDPrPsInfo(ProcessElfCore &process,
547-
const DataExtractor &data, bool lp64) {
548+
const DataExtractor &data,
549+
bool lp64) {
548550
lldb::offset_t offset = 0;
549551
int pr_version = data.GetU32(&offset);
550552

@@ -563,7 +565,8 @@ static void ParseFreeBSDPrPsInfo(ProcessElfCore &process,
563565
}
564566

565567
static llvm::Error ParseNetBSDProcInfo(const DataExtractor &data,
566-
uint32_t &cpi_nlwps, uint32_t &cpi_signo,
568+
uint32_t &cpi_nlwps,
569+
uint32_t &cpi_signo,
567570
uint32_t &cpi_siglwp,
568571
uint32_t &cpi_pid) {
569572
lldb::offset_t offset = 0;
@@ -731,8 +734,8 @@ llvm::Error ProcessElfCore::parseNetBSDNotes(llvm::ArrayRef<CoreNote> notes) {
731734

732735
if (name == "NetBSD-CORE") {
733736
if (note.info.n_type == NETBSD::NT_PROCINFO) {
734-
llvm::Error error =
735-
ParseNetBSDProcInfo(note.data, nlwps, signo, siglwp, pr_pid);
737+
llvm::Error error = ParseNetBSDProcInfo(note.data, nlwps, signo,
738+
siglwp, pr_pid);
736739
if (error)
737740
return error;
738741
SetID(pr_pid);
@@ -958,9 +961,7 @@ llvm::Error ProcessElfCore::parseLinuxNotes(llvm::ArrayRef<CoreNote> notes) {
958961
Status status = prpsinfo.Parse(note.data, arch);
959962
if (status.Fail())
960963
return status.ToError();
961-
thread_data.name.assign(
962-
prpsinfo.pr_fname,
963-
strnlen(prpsinfo.pr_fname, sizeof(prpsinfo.pr_fname)));
964+
thread_data.name.assign (prpsinfo.pr_fname, strnlen (prpsinfo.pr_fname, sizeof (prpsinfo.pr_fname)));
964965
SetID(prpsinfo.pr_pid);
965966
m_executable_name = thread_data.name;
966967
break;
@@ -1015,7 +1016,7 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment(
10151016
assert(segment_header.p_type == llvm::ELF::PT_NOTE);
10161017

10171018
auto notes_or_error = parseSegment(segment_data);
1018-
if (!notes_or_error)
1019+
if(!notes_or_error)
10191020
return notes_or_error.takeError();
10201021
switch (GetArchitecture().GetTriple().getOS()) {
10211022
case llvm::Triple::FreeBSD:

0 commit comments

Comments
 (0)