Skip to content

Commit 42e84ed

Browse files
committed
Run GCF
1 parent 6742dc1 commit 42e84ed

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

lldb/include/lldb/Target/Process.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,15 +1594,14 @@ class Process : public std::enable_shared_from_this<Process>,
15941594
// Status, the status returned from ReadMemoryFromInferior
15951595
// DataBufferHeap, buffer with bytes potentially written to it
15961596
// addr_t, the current_addr, start + bytes read so far.
1597-
// uint64_t bytes_to_read, the expected bytes read, this
1597+
// uint64_t bytes_to_read, the expected bytes read, this
15981598
// is important if it's a partial read
1599-
// uint64_t bytes_read_for_chunk, the actual count of bytes read for this
1599+
// uint64_t bytes_read_for_chunk, the actual count of bytes read for this
16001600
// chunk
1601-
typedef std::function<IterationAction(lldb_private::Status&,
1602-
lldb_private::DataBufferHeap&,
1603-
lldb::addr_t,
1604-
uint64_t,
1605-
uint64_t)> ReadMemoryChunkCallback;
1601+
typedef std::function<IterationAction(lldb_private::Status &,
1602+
lldb_private::DataBufferHeap &,
1603+
lldb::addr_t, uint64_t, uint64_t)>
1604+
ReadMemoryChunkCallback;
16061605

16071606
/// Read of memory from a process in discrete chunks, terminating
16081607
/// either when all bytes are read, or the supplied callback returns

lldb/source/Target/Process.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,7 +2234,8 @@ size_t Process::ReadMemoryFromInferior(addr_t addr, void *buf, size_t size,
22342234
}
22352235

22362236
size_t Process::ReadMemoryInChunks(lldb::addr_t vm_addr, DataBufferHeap &data,
2237-
size_t size, ReadMemoryChunkCallback callback) {
2237+
size_t size,
2238+
ReadMemoryChunkCallback callback) {
22382239
// Safety check to prevent an infinite loop.
22392240
if (data.GetByteSize() == 0)
22402241
return 0;
@@ -2245,14 +2246,13 @@ size_t Process::ReadMemoryInChunks(lldb::addr_t vm_addr, DataBufferHeap &data,
22452246
while (bytes_remaining > 0) {
22462247
// Get the next read chunk size as the minimum of the remaining bytes and
22472248
// the write chunk max size.
2248-
const size_t bytes_to_read =
2249-
std::min(bytes_remaining, data.GetByteSize());
2249+
const size_t bytes_to_read = std::min(bytes_remaining, data.GetByteSize());
22502250
const lldb::addr_t current_addr = vm_addr + bytes_read;
2251-
const size_t bytes_read_for_chunk =
2252-
ReadMemoryFromInferior(current_addr,
2253-
data.GetBytes(), bytes_to_read, error);
2251+
const size_t bytes_read_for_chunk = ReadMemoryFromInferior(
2252+
current_addr, data.GetBytes(), bytes_to_read, error);
22542253

2255-
if (callback(error, data, current_addr, bytes_to_read, bytes_read_for_chunk) == IterationAction::Stop)
2254+
if (callback(error, data, current_addr, bytes_to_read,
2255+
bytes_read_for_chunk) == IterationAction::Stop)
22562256
break;
22572257

22582258
bytes_read += bytes_read_for_chunk;

0 commit comments

Comments
 (0)