LLDB mainline
ProcessMinidump.cpp
Go to the documentation of this file.
1//===-- ProcessMinidump.cpp -----------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "ProcessMinidump.h"
10
11#include "ThreadMinidump.h"
12
14#include "lldb/Core/Module.h"
17#include "lldb/Core/Section.h"
28#include "lldb/Target/Target.h"
33#include "lldb/Utility/Log.h"
34#include "lldb/Utility/State.h"
35#include "llvm/BinaryFormat/Magic.h"
36#include "llvm/Support/MemoryBuffer.h"
37#include "llvm/Support/Threading.h"
38
42
43#include <memory>
44#include <optional>
45
46using namespace lldb;
47using namespace lldb_private;
48using namespace minidump;
49
51
52namespace {
53
54/// Duplicate the HashElfTextSection() from the breakpad sources.
55///
56/// Breakpad, a Google crash log reporting tool suite, creates minidump files
57/// for many different architectures. When using Breakpad to create ELF
58/// minidumps, it will check for a GNU build ID when creating a minidump file
59/// and if one doesn't exist in the file, it will say the UUID of the file is a
60/// checksum of up to the first 4096 bytes of the .text section. Facebook also
61/// uses breakpad and modified this hash to avoid collisions so we can
62/// calculate and check for this as well.
63///
64/// The breakpad code might end up hashing up to 15 bytes that immediately
65/// follow the .text section in the file, so this code must do exactly what it
66/// does so we can get an exact match for the UUID.
67///
68/// \param[in] module_sp The module to grab the .text section from.
69///
70/// \param[in,out] breakpad_uuid A vector that will receive the calculated
71/// breakpad .text hash.
72///
73/// \param[in,out] facebook_uuid A vector that will receive the calculated
74/// facebook .text hash.
75///
76void HashElfTextSection(ModuleSP module_sp, std::vector<uint8_t> &breakpad_uuid,
77 std::vector<uint8_t> &facebook_uuid) {
78 SectionList *sect_list = module_sp->GetSectionList();
79 if (sect_list == nullptr)
80 return;
81 SectionSP sect_sp = sect_list->FindSectionByName(ConstString(".text"));
82 if (!sect_sp)
83 return;
84 constexpr size_t kMDGUIDSize = 16;
85 constexpr size_t kBreakpadPageSize = 4096;
86 // The breakpad code has a bug where it might access beyond the end of a
87 // .text section by up to 15 bytes, so we must ensure we round up to the
88 // next kMDGUIDSize byte boundary.
89 DataExtractor data;
90 const size_t text_size = sect_sp->GetFileSize();
91 const size_t read_size = std::min<size_t>(
92 llvm::alignTo(text_size, kMDGUIDSize), kBreakpadPageSize);
93 sect_sp->GetObjectFile()->GetData(sect_sp->GetFileOffset(), read_size, data);
94
95 breakpad_uuid.assign(kMDGUIDSize, 0);
96 facebook_uuid.assign(kMDGUIDSize, 0);
97
98 // The only difference between the breakpad hash and the facebook hash is the
99 // hashing of the text section size into the hash prior to hashing the .text
100 // contents.
101 for (size_t i = 0; i < kMDGUIDSize; i++)
102 facebook_uuid[i] ^= text_size % 255;
103
104 // This code carefully duplicates how the hash was created in Breakpad
105 // sources, including the error where it might has an extra 15 bytes past the
106 // end of the .text section if the .text section is less than a page size in
107 // length.
108 const uint8_t *ptr = data.GetDataStart();
109 const uint8_t *ptr_end = data.GetDataEnd();
110 while (ptr < ptr_end) {
111 for (unsigned i = 0; i < kMDGUIDSize; i++) {
112 breakpad_uuid[i] ^= ptr[i];
113 facebook_uuid[i] ^= ptr[i];
114 }
115 ptr += kMDGUIDSize;
116 }
117}
118
119} // namespace
120
122 return "Minidump plug-in.";
123}
124
126 lldb::ListenerSP listener_sp,
127 const FileSpec *crash_file,
128 bool can_connect) {
129 if (!crash_file || can_connect)
130 return nullptr;
131
132 lldb::ProcessSP process_sp;
133 // Read enough data for the Minidump header
134 constexpr size_t header_size = sizeof(Header);
135 auto DataPtr = FileSystem::Instance().CreateDataBuffer(crash_file->GetPath(),
136 header_size, 0);
137 if (!DataPtr)
138 return nullptr;
139
140 lldbassert(DataPtr->GetByteSize() == header_size);
141 if (identify_magic(toStringRef(DataPtr->GetData())) != llvm::file_magic::minidump)
142 return nullptr;
143
144 auto AllData =
145 FileSystem::Instance().CreateDataBuffer(crash_file->GetPath(), -1, 0);
146 if (!AllData)
147 return nullptr;
148
149 return std::make_shared<ProcessMinidump>(target_sp, listener_sp, *crash_file,
150 std::move(AllData));
151}
152
154 bool plugin_specified_by_name) {
155 return true;
156}
157
159 lldb::ListenerSP listener_sp,
160 const FileSpec &core_file,
161 DataBufferSP core_data)
162 : PostMortemProcess(target_sp, listener_sp, core_file),
163 m_core_data(std::move(core_data)), m_is_wow64(false) {}
164
166 Clear();
167 // We need to call finalize on the process before destroying ourselves to
168 // make sure all of the broadcaster cleanup goes as planned. If we destruct
169 // this class, then Process::~Process() might have problems trying to fully
170 // destroy the broadcaster.
171 Finalize(true /* destructing */);
172}
173
175 static llvm::once_flag g_once_flag;
176
177 llvm::call_once(g_once_flag, []() {
181 });
182}
183
186}
187
189 auto expected_parser = MinidumpParser::Create(m_core_data);
190 if (!expected_parser)
191 return Status::FromError(expected_parser.takeError());
192 m_minidump_parser = std::move(*expected_parser);
193
195
196 // Do we support the minidump's architecture?
197 ArchSpec arch = GetArchitecture();
198 switch (arch.GetMachine()) {
199 case llvm::Triple::x86:
200 case llvm::Triple::x86_64:
201 case llvm::Triple::arm:
202 case llvm::Triple::aarch64:
203 // Any supported architectures must be listed here and also supported in
204 // ThreadMinidump::CreateRegisterContextForFrame().
205 break;
206 default:
208 "unsupported minidump architecture: %s", arch.GetArchitectureName());
209 return error;
210 }
211 GetTarget().SetArchitecture(arch, true /*set_platform*/);
212
213 m_thread_list = m_minidump_parser->GetThreads();
214 auto exception_stream_it = m_minidump_parser->GetExceptionStreams();
215 for (auto exception_stream : exception_stream_it) {
216 // If we can't read an exception stream skip it
217 // We should probably serve a warning
218 if (!exception_stream)
219 continue;
220
222 .try_emplace(exception_stream->ThreadId, exception_stream.get())
223 .second) {
225 "Duplicate exception stream for tid {0}", exception_stream->ThreadId);
226 }
227 }
228
230
232 if (ModuleSP module = GetTarget().GetExecutableModule())
233 GetTarget().MergeArchitecture(module->GetArchitecture());
234 std::optional<lldb::pid_t> pid = m_minidump_parser->GetPid();
235 if (!pid) {
236 Debugger::ReportWarning("unable to retrieve process ID from minidump file, "
237 "setting process ID to 1",
238 GetTarget().GetDebugger().GetID());
239 pid = 1;
240 }
241 SetID(*pid);
242
243 return error;
244}
245
247
249
250 for (const auto &[_, exception_stream] : m_exceptions_by_tid) {
251 constexpr uint32_t BreakpadDumpRequested = 0xFFFFFFFF;
252 if (exception_stream.ExceptionRecord.ExceptionCode ==
253 BreakpadDumpRequested) {
254 // This "ExceptionCode" value is a sentinel that is sometimes used
255 // when generating a dump for a process that hasn't crashed.
256
257 // TODO: The definition and use of this "dump requested" constant
258 // in Breakpad are actually Linux-specific, and for similar use
259 // cases on Mac/Windows it defines different constants, referring
260 // to them as "simulated" exceptions; consider moving this check
261 // down to the OS-specific paths and checking each OS for its own
262 // constant.
263 return;
264 }
265
266 lldb::StopInfoSP stop_info;
267 lldb::ThreadSP stop_thread;
268
269 Process::m_thread_list.SetSelectedThreadByID(exception_stream.ThreadId);
271 ArchSpec arch = GetArchitecture();
272
273 if (arch.GetTriple().getOS() == llvm::Triple::Linux) {
274 uint32_t signo = exception_stream.ExceptionRecord.ExceptionCode;
275 if (signo == 0) {
276 // No stop.
277 return;
278 }
279 const char *description = nullptr;
280 if (exception_stream.ExceptionRecord.ExceptionFlags ==
281 llvm::minidump::Exception::LLDB_FLAG)
282 description = reinterpret_cast<const char *>(
283 exception_stream.ExceptionRecord.ExceptionInformation);
284
285 llvm::StringRef description_str(description,
286 Exception::MaxParameterBytes);
288 *stop_thread, signo, description_str.str().c_str());
289 } else if (arch.GetTriple().getVendor() == llvm::Triple::Apple) {
291 *stop_thread, exception_stream.ExceptionRecord.ExceptionCode, 2,
292 exception_stream.ExceptionRecord.ExceptionFlags,
293 exception_stream.ExceptionRecord.ExceptionAddress, 0);
294 } else {
295 std::string desc;
296 llvm::raw_string_ostream desc_stream(desc);
297 desc_stream << "Exception "
298 << llvm::format_hex(
299 exception_stream.ExceptionRecord.ExceptionCode, 8)
300 << " encountered at address "
301 << llvm::format_hex(
302 exception_stream.ExceptionRecord.ExceptionAddress, 8);
303 stop_info =
304 StopInfo::CreateStopReasonWithException(*stop_thread, desc.c_str());
305 }
306
307 stop_thread->SetStopInfo(stop_info);
308 }
309}
310
311bool ProcessMinidump::IsAlive() { return true; }
312
313bool ProcessMinidump::WarnBeforeDetach() const { return false; }
314
315size_t ProcessMinidump::ReadMemory(lldb::addr_t addr, void *buf, size_t size,
316 Status &error) {
317 // Don't allow the caching that lldb_private::Process::ReadMemory does since
318 // we have it all cached in our dump file anyway.
319 return DoReadMemory(addr, buf, size, error);
320}
321
322size_t ProcessMinidump::DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
323 Status &error) {
324
325 llvm::ArrayRef<uint8_t> mem = m_minidump_parser->GetMemory(addr, size);
326 if (mem.empty()) {
327 error = Status::FromErrorString("could not parse memory info");
328 return 0;
329 }
330
331 std::memcpy(buf, mem.data(), mem.size());
332 return mem.size();
333}
334
336 if (!m_is_wow64) {
337 return m_minidump_parser->GetArchitecture();
338 }
339
340 llvm::Triple triple;
341 triple.setVendor(llvm::Triple::VendorType::UnknownVendor);
342 triple.setArch(llvm::Triple::ArchType::x86);
343 triple.setOS(llvm::Triple::OSType::Win32);
344 return ArchSpec(triple);
345}
346
348 std::optional<llvm::ArrayRef<uint8_t>> auxv =
349 m_minidump_parser->GetStream(StreamType::LinuxAuxv);
350 if (!auxv)
351 return DataExtractor();
352
353 return DataExtractor(auxv->data(), auxv->size(), GetByteOrder(),
355}
356
359 return;
360 m_memory_regions.emplace();
361 bool is_complete;
362 std::tie(*m_memory_regions, is_complete) =
363 m_minidump_parser->BuildMemoryRegions();
364
365 if (is_complete)
366 return;
367
368 MemoryRegionInfos to_add;
369 ModuleList &modules = GetTarget().GetImages();
371 modules.ForEach([&](const ModuleSP &module_sp) {
372 SectionList *sections = module_sp->GetSectionList();
373 for (size_t i = 0; i < sections->GetSize(); ++i) {
374 SectionSP section_sp = sections->GetSectionAtIndex(i);
375 addr_t load_addr = load_list.GetSectionLoadAddress(section_sp);
376 if (load_addr == LLDB_INVALID_ADDRESS)
377 continue;
378 MemoryRegionInfo::RangeType section_range(load_addr,
379 section_sp->GetByteSize());
380 MemoryRegionInfo region =
382 if (region.GetMapped() != MemoryRegionInfo::eYes &&
383 region.GetRange().GetRangeBase() <= section_range.GetRangeBase() &&
384 section_range.GetRangeEnd() <= region.GetRange().GetRangeEnd()) {
385 to_add.emplace_back();
386 to_add.back().GetRange() = section_range;
387 to_add.back().SetLLDBPermissions(section_sp->GetPermissions());
388 to_add.back().SetMapped(MemoryRegionInfo::eYes);
389 to_add.back().SetName(module_sp->GetFileSpec().GetPath().c_str());
390 }
391 }
392 return true;
393 });
394 m_memory_regions->insert(m_memory_regions->end(), to_add.begin(),
395 to_add.end());
396 llvm::sort(*m_memory_regions);
397}
398
400 MemoryRegionInfo &region) {
403 return Status();
404}
405
408 region_list = *m_memory_regions;
409 return Status();
410}
411
413
415 ThreadList &new_thread_list) {
416 for (const minidump::Thread &thread : m_thread_list) {
417 LocationDescriptor context_location = thread.Context;
418
419 // If the minidump contains an exception context, use it
420 if (auto it = m_exceptions_by_tid.find(thread.ThreadId);
421 it != m_exceptions_by_tid.end())
422 context_location = it->second.ThreadContext;
423
424 llvm::ArrayRef<uint8_t> context;
425 if (!m_is_wow64)
426 context = m_minidump_parser->GetThreadContext(context_location);
427 else
428 context = m_minidump_parser->GetThreadContextWow64(thread);
429
430 lldb::ThreadSP thread_sp(new ThreadMinidump(*this, thread, context));
431 new_thread_list.AddThread(thread_sp);
432 }
433 return new_thread_list.GetSize(false) > 0;
434}
435
437 llvm::StringRef name,
438 ModuleSpec module_spec) {
441
442 ModuleSP module_sp =
443 GetTarget().GetOrCreateModule(module_spec, true /* notify */, &error);
444 if (!module_sp)
445 return module_sp;
446 // We consider the module to be a match if the minidump UUID is a
447 // prefix of the actual UUID, or if either of the UUIDs are empty.
448 const auto dmp_bytes = minidump_uuid.GetBytes();
449 const auto mod_bytes = module_sp->GetUUID().GetBytes();
450 const bool match = dmp_bytes.empty() || mod_bytes.empty() ||
451 mod_bytes.take_front(dmp_bytes.size()) == dmp_bytes;
452 if (match) {
453 LLDB_LOG(log, "Partial uuid match for {0}.", name);
454 return module_sp;
455 }
456
457 // Breakpad generates minindump files, and if there is no GNU build
458 // ID in the binary, it will calculate a UUID by hashing first 4096
459 // bytes of the .text section and using that as the UUID for a module
460 // in the minidump. Facebook uses a modified breakpad client that
461 // uses a slightly modified this hash to avoid collisions. Check for
462 // UUIDs from the minindump that match these cases and accept the
463 // module we find if they do match.
464 std::vector<uint8_t> breakpad_uuid;
465 std::vector<uint8_t> facebook_uuid;
466 HashElfTextSection(module_sp, breakpad_uuid, facebook_uuid);
467 if (dmp_bytes == llvm::ArrayRef<uint8_t>(breakpad_uuid)) {
468 LLDB_LOG(log, "Breakpad .text hash match for {0}.", name);
469 return module_sp;
470 }
471 if (dmp_bytes == llvm::ArrayRef<uint8_t>(facebook_uuid)) {
472 LLDB_LOG(log, "Facebook .text hash match for {0}.", name);
473 return module_sp;
474 }
475 // The UUID wasn't a partial match and didn't match the .text hash
476 // so remove the module from the target, we will need to create a
477 // placeholder object file.
478 GetTarget().GetImages().Remove(module_sp);
479 module_sp.reset();
480 return module_sp;
481}
482
484 std::vector<const minidump::Module *> filtered_modules =
485 m_minidump_parser->GetFilteredModuleList();
486
488
489 for (auto module : filtered_modules) {
490 std::string name = cantFail(m_minidump_parser->GetMinidumpFile().getString(
491 module->ModuleNameRVA));
492 const uint64_t load_addr = module->BaseOfImage;
493 const uint64_t load_size = module->SizeOfImage;
494 LLDB_LOG(log, "found module: name: {0} {1:x10}-{2:x10} size: {3}", name,
495 load_addr, load_addr + load_size, load_size);
496
497 // check if the process is wow64 - a 32 bit windows process running on a
498 // 64 bit windows
499 if (llvm::StringRef(name).ends_with_insensitive("wow64.dll")) {
500 m_is_wow64 = true;
501 }
502
503 const auto uuid = m_minidump_parser->GetModuleUUID(module);
504 auto file_spec = FileSpec(name, GetArchitecture().GetTriple());
505 ModuleSpec module_spec(file_spec, uuid);
506 module_spec.GetArchitecture() = GetArchitecture();
508 // Try and find a module with a full UUID that matches. This function will
509 // add the module to the target if it finds one.
510 lldb::ModuleSP module_sp = GetTarget().GetOrCreateModule(module_spec,
511 true /* notify */, &error);
512 if (module_sp) {
513 LLDB_LOG(log, "Full uuid match for {0}.", name);
514 } else {
515 // We couldn't find a module with an exactly-matching UUID. Sometimes
516 // a minidump UUID is only a partial match or is a hash. So try again
517 // without specifying the UUID, then again without specifying the
518 // directory if that fails. This will allow us to find modules with
519 // partial matches or hash UUIDs in user-provided sysroots or search
520 // directories (target.exec-search-paths).
521 ModuleSpec partial_module_spec = module_spec;
522 partial_module_spec.GetUUID().Clear();
523 module_sp = GetOrCreateModule(uuid, name, partial_module_spec);
524 if (!module_sp) {
525 partial_module_spec.GetFileSpec().ClearDirectory();
526 module_sp = GetOrCreateModule(uuid, name, partial_module_spec);
527 }
528 }
529 if (module_sp) {
530 // Watch out for place holder modules that have different paths, but the
531 // same UUID. If the base address is different, create a new module. If
532 // we don't then we will end up setting the load address of a different
533 // ObjectFilePlaceholder and an assertion will fire.
534 auto *objfile = module_sp->GetObjectFile();
535 if (objfile &&
536 objfile->GetPluginName() ==
538 if (((ObjectFilePlaceholder *)objfile)->GetBaseImageAddress() !=
539 load_addr)
540 module_sp.reset();
541 }
542 }
543 if (!module_sp) {
544 // We failed to locate a matching local object file. Fortunately, the
545 // minidump format encodes enough information about each module's memory
546 // range to allow us to create placeholder modules.
547 //
548 // This enables most LLDB functionality involving address-to-module
549 // translations (ex. identifing the module for a stack frame PC) and
550 // modules/sections commands (ex. target modules list, ...)
551 LLDB_LOG(log,
552 "Unable to locate the matching object file, creating a "
553 "placeholder module for: {0}",
554 name);
555
556 module_sp = Module::CreateModuleFromObjectFile<ObjectFilePlaceholder>(
557 module_spec, load_addr, load_size);
558 // If we haven't loaded a main executable yet, set the first module to be
559 // main executable
560 if (!GetTarget().GetExecutableModule())
561 GetTarget().SetExecutableModule(module_sp);
562 else
563 GetTarget().GetImages().Append(module_sp, true /* notify */);
564 }
565
566 bool load_addr_changed = false;
567 module_sp->SetLoadAddress(GetTarget(), load_addr, false,
568 load_addr_changed);
569 }
570}
571
573 info.Clear();
574 info.SetProcessID(GetID());
577 if (module_sp) {
578 const bool add_exe_file_as_first_arg = false;
579 info.SetExecutableFile(GetTarget().GetExecutableModule()->GetFileSpec(),
580 add_exe_file_as_first_arg);
581 }
582 return true;
583}
584
585// For minidumps there's no runtime generated code so we don't need JITLoader(s)
586// Avoiding them will also speed up minidump loading since JITLoaders normally
587// try to set up symbolic breakpoints, which in turn may force loading more
588// debug information than needed.
590 if (!m_jit_loaders_up) {
591 m_jit_loaders_up = std::make_unique<JITLoaderList>();
592 }
593 return *m_jit_loaders_up;
594}
595
596#define INIT_BOOL(VAR, LONG, SHORT, DESC) \
597 VAR(LLDB_OPT_SET_1, false, LONG, SHORT, DESC, false, true)
598#define APPEND_OPT(VAR) \
599 m_option_group.Append(&VAR, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1)
600
602private:
629
631 if (m_dump_all.GetOptionValue().GetCurrentValue() ||
632 m_dump_linux_all.GetOptionValue().GetCurrentValue() ||
633 m_fb_all.GetOptionValue().GetCurrentValue() ||
634 m_dump_directory.GetOptionValue().GetCurrentValue() ||
635 m_dump_linux_cpuinfo.GetOptionValue().GetCurrentValue() ||
636 m_dump_linux_proc_status.GetOptionValue().GetCurrentValue() ||
637 m_dump_linux_lsb_release.GetOptionValue().GetCurrentValue() ||
638 m_dump_linux_cmdline.GetOptionValue().GetCurrentValue() ||
639 m_dump_linux_environ.GetOptionValue().GetCurrentValue() ||
640 m_dump_linux_auxv.GetOptionValue().GetCurrentValue() ||
641 m_dump_linux_maps.GetOptionValue().GetCurrentValue() ||
642 m_dump_linux_proc_stat.GetOptionValue().GetCurrentValue() ||
643 m_dump_linux_proc_uptime.GetOptionValue().GetCurrentValue() ||
644 m_dump_linux_proc_fd.GetOptionValue().GetCurrentValue() ||
645 m_fb_app_data.GetOptionValue().GetCurrentValue() ||
646 m_fb_build_id.GetOptionValue().GetCurrentValue() ||
647 m_fb_version.GetOptionValue().GetCurrentValue() ||
648 m_fb_java_stack.GetOptionValue().GetCurrentValue() ||
649 m_fb_dalvik.GetOptionValue().GetCurrentValue() ||
650 m_fb_unwind.GetOptionValue().GetCurrentValue() ||
651 m_fb_error_log.GetOptionValue().GetCurrentValue() ||
652 m_fb_app_state.GetOptionValue().GetCurrentValue() ||
653 m_fb_abort.GetOptionValue().GetCurrentValue() ||
654 m_fb_thread.GetOptionValue().GetCurrentValue() ||
655 m_fb_logcat.GetOptionValue().GetCurrentValue())
656 return;
657 // If no options were set, then dump everything
658 m_dump_all.GetOptionValue().SetCurrentValue(true);
659 }
660 bool DumpAll() const {
661 return m_dump_all.GetOptionValue().GetCurrentValue();
662 }
663 bool DumpDirectory() const {
664 return DumpAll() ||
665 m_dump_directory.GetOptionValue().GetCurrentValue();
666 }
667 bool DumpLinux() const {
668 return DumpAll() || m_dump_linux_all.GetOptionValue().GetCurrentValue();
669 }
670 bool DumpLinuxCPUInfo() const {
671 return DumpLinux() ||
672 m_dump_linux_cpuinfo.GetOptionValue().GetCurrentValue();
673 }
674 bool DumpLinuxProcStatus() const {
675 return DumpLinux() ||
676 m_dump_linux_proc_status.GetOptionValue().GetCurrentValue();
677 }
678 bool DumpLinuxProcStat() const {
679 return DumpLinux() ||
680 m_dump_linux_proc_stat.GetOptionValue().GetCurrentValue();
681 }
682 bool DumpLinuxLSBRelease() const {
683 return DumpLinux() ||
684 m_dump_linux_lsb_release.GetOptionValue().GetCurrentValue();
685 }
686 bool DumpLinuxCMDLine() const {
687 return DumpLinux() ||
688 m_dump_linux_cmdline.GetOptionValue().GetCurrentValue();
689 }
690 bool DumpLinuxEnviron() const {
691 return DumpLinux() ||
692 m_dump_linux_environ.GetOptionValue().GetCurrentValue();
693 }
694 bool DumpLinuxAuxv() const {
695 return DumpLinux() ||
696 m_dump_linux_auxv.GetOptionValue().GetCurrentValue();
697 }
698 bool DumpLinuxMaps() const {
699 return DumpLinux() ||
700 m_dump_linux_maps.GetOptionValue().GetCurrentValue();
701 }
702 bool DumpLinuxProcUptime() const {
703 return DumpLinux() ||
704 m_dump_linux_proc_uptime.GetOptionValue().GetCurrentValue();
705 }
706 bool DumpLinuxProcFD() const {
707 return DumpLinux() ||
708 m_dump_linux_proc_fd.GetOptionValue().GetCurrentValue();
709 }
710 bool DumpFacebook() const {
711 return DumpAll() || m_fb_all.GetOptionValue().GetCurrentValue();
712 }
713 bool DumpFacebookAppData() const {
714 return DumpFacebook() || m_fb_app_data.GetOptionValue().GetCurrentValue();
715 }
716 bool DumpFacebookBuildID() const {
717 return DumpFacebook() || m_fb_build_id.GetOptionValue().GetCurrentValue();
718 }
720 return DumpFacebook() || m_fb_version.GetOptionValue().GetCurrentValue();
721 }
723 return DumpFacebook() || m_fb_java_stack.GetOptionValue().GetCurrentValue();
724 }
726 return DumpFacebook() || m_fb_dalvik.GetOptionValue().GetCurrentValue();
727 }
729 return DumpFacebook() || m_fb_unwind.GetOptionValue().GetCurrentValue();
730 }
731 bool DumpFacebookErrorLog() const {
732 return DumpFacebook() || m_fb_error_log.GetOptionValue().GetCurrentValue();
733 }
735 return DumpFacebook() || m_fb_app_state.GetOptionValue().GetCurrentValue();
736 }
738 return DumpFacebook() || m_fb_abort.GetOptionValue().GetCurrentValue();
739 }
741 return DumpFacebook() || m_fb_thread.GetOptionValue().GetCurrentValue();
742 }
743 bool DumpFacebookLogcat() const {
744 return DumpFacebook() || m_fb_logcat.GetOptionValue().GetCurrentValue();
745 }
746public:
748 : CommandObjectParsed(interpreter, "process plugin dump",
749 "Dump information from the minidump file.", nullptr),
750 m_option_group(),
751 INIT_BOOL(m_dump_all, "all", 'a',
752 "Dump the everything in the minidump."),
753 INIT_BOOL(m_dump_directory, "directory", 'd',
754 "Dump the minidump directory map."),
755 INIT_BOOL(m_dump_linux_cpuinfo, "cpuinfo", 'C',
756 "Dump linux /proc/cpuinfo."),
757 INIT_BOOL(m_dump_linux_proc_status, "status", 's',
758 "Dump linux /proc/<pid>/status."),
759 INIT_BOOL(m_dump_linux_lsb_release, "lsb-release", 'r',
760 "Dump linux /etc/lsb-release."),
761 INIT_BOOL(m_dump_linux_cmdline, "cmdline", 'c',
762 "Dump linux /proc/<pid>/cmdline."),
763 INIT_BOOL(m_dump_linux_environ, "environ", 'e',
764 "Dump linux /proc/<pid>/environ."),
765 INIT_BOOL(m_dump_linux_auxv, "auxv", 'x',
766 "Dump linux /proc/<pid>/auxv."),
767 INIT_BOOL(m_dump_linux_maps, "maps", 'm',
768 "Dump linux /proc/<pid>/maps."),
769 INIT_BOOL(m_dump_linux_proc_stat, "stat", 'S',
770 "Dump linux /proc/<pid>/stat."),
771 INIT_BOOL(m_dump_linux_proc_uptime, "uptime", 'u',
772 "Dump linux process uptime."),
773 INIT_BOOL(m_dump_linux_proc_fd, "fd", 'f',
774 "Dump linux /proc/<pid>/fd."),
775 INIT_BOOL(m_dump_linux_all, "linux", 'l',
776 "Dump all linux streams."),
777 INIT_BOOL(m_fb_app_data, "fb-app-data", 1,
778 "Dump Facebook application custom data."),
779 INIT_BOOL(m_fb_build_id, "fb-build-id", 2,
780 "Dump the Facebook build ID."),
781 INIT_BOOL(m_fb_version, "fb-version", 3,
782 "Dump Facebook application version string."),
783 INIT_BOOL(m_fb_java_stack, "fb-java-stack", 4,
784 "Dump Facebook java stack."),
785 INIT_BOOL(m_fb_dalvik, "fb-dalvik-info", 5,
786 "Dump Facebook Dalvik info."),
787 INIT_BOOL(m_fb_unwind, "fb-unwind-symbols", 6,
788 "Dump Facebook unwind symbols."),
789 INIT_BOOL(m_fb_error_log, "fb-error-log", 7,
790 "Dump Facebook error log."),
791 INIT_BOOL(m_fb_app_state, "fb-app-state-log", 8,
792 "Dump Facebook java stack."),
793 INIT_BOOL(m_fb_abort, "fb-abort-reason", 9,
794 "Dump Facebook abort reason."),
795 INIT_BOOL(m_fb_thread, "fb-thread-name", 10,
796 "Dump Facebook thread name."),
797 INIT_BOOL(m_fb_logcat, "fb-logcat", 11,
798 "Dump Facebook logcat."),
799 INIT_BOOL(m_fb_all, "facebook", 12, "Dump all Facebook streams.") {
800 APPEND_OPT(m_dump_all);
801 APPEND_OPT(m_dump_directory);
802 APPEND_OPT(m_dump_linux_cpuinfo);
803 APPEND_OPT(m_dump_linux_proc_status);
804 APPEND_OPT(m_dump_linux_lsb_release);
805 APPEND_OPT(m_dump_linux_cmdline);
806 APPEND_OPT(m_dump_linux_environ);
807 APPEND_OPT(m_dump_linux_auxv);
808 APPEND_OPT(m_dump_linux_maps);
809 APPEND_OPT(m_dump_linux_proc_stat);
810 APPEND_OPT(m_dump_linux_proc_uptime);
811 APPEND_OPT(m_dump_linux_proc_fd);
812 APPEND_OPT(m_dump_linux_all);
813 APPEND_OPT(m_fb_app_data);
814 APPEND_OPT(m_fb_build_id);
815 APPEND_OPT(m_fb_version);
816 APPEND_OPT(m_fb_java_stack);
817 APPEND_OPT(m_fb_dalvik);
818 APPEND_OPT(m_fb_unwind);
819 APPEND_OPT(m_fb_error_log);
820 APPEND_OPT(m_fb_app_state);
821 APPEND_OPT(m_fb_abort);
822 APPEND_OPT(m_fb_thread);
823 APPEND_OPT(m_fb_logcat);
824 APPEND_OPT(m_fb_all);
825 m_option_group.Finalize();
826 }
827
829
830 Options *GetOptions() override { return &m_option_group; }
831
832 void DoExecute(Args &command, CommandReturnObject &result) override {
833 const size_t argc = command.GetArgumentCount();
834 if (argc > 0) {
835 result.AppendErrorWithFormat("'%s' take no arguments, only options",
836 m_cmd_name.c_str());
837 return;
838 }
839 SetDefaultOptionsIfNoneAreSet();
840
841 ProcessMinidump *process = static_cast<ProcessMinidump *>(
842 m_interpreter.GetExecutionContext().GetProcessPtr());
844 Stream &s = result.GetOutputStream();
845 MinidumpParser &minidump = *process->m_minidump_parser;
846 if (DumpDirectory()) {
847 s.Printf("RVA SIZE TYPE StreamType\n");
848 s.Printf("---------- ---------- ---------- --------------------------\n");
849 for (const auto &stream_desc : minidump.GetMinidumpFile().streams())
850 s.Printf(
851 "0x%8.8x 0x%8.8x 0x%8.8x %s\n", (uint32_t)stream_desc.Location.RVA,
852 (uint32_t)stream_desc.Location.DataSize,
853 (unsigned)(StreamType)stream_desc.Type,
854 MinidumpParser::GetStreamTypeAsString(stream_desc.Type).data());
855 s.Printf("\n");
856 }
857 auto DumpTextStream = [&](StreamType stream_type,
858 llvm::StringRef label) -> void {
859 auto bytes = minidump.GetStream(stream_type);
860 if (!bytes.empty()) {
861 if (label.empty())
862 label = MinidumpParser::GetStreamTypeAsString(stream_type);
863 s.Printf("%s:\n%s\n\n", label.data(), bytes.data());
864 }
865 };
866 auto DumpBinaryStream = [&](StreamType stream_type,
867 llvm::StringRef label) -> void {
868 auto bytes = minidump.GetStream(stream_type);
869 if (!bytes.empty()) {
870 if (label.empty())
871 label = MinidumpParser::GetStreamTypeAsString(stream_type);
872 s.Printf("%s:\n", label.data());
873 DataExtractor data(bytes.data(), bytes.size(), eByteOrderLittle,
874 process->GetAddressByteSize());
876 bytes.size(), 16, 0, 0, 0);
877 s.Printf("\n\n");
878 }
879 };
880
881 if (DumpLinuxCPUInfo())
882 DumpTextStream(StreamType::LinuxCPUInfo, "/proc/cpuinfo");
883 if (DumpLinuxProcStatus())
884 DumpTextStream(StreamType::LinuxProcStatus, "/proc/PID/status");
885 if (DumpLinuxLSBRelease())
886 DumpTextStream(StreamType::LinuxLSBRelease, "/etc/lsb-release");
887 if (DumpLinuxCMDLine())
888 DumpTextStream(StreamType::LinuxCMDLine, "/proc/PID/cmdline");
889 if (DumpLinuxEnviron())
890 DumpTextStream(StreamType::LinuxEnviron, "/proc/PID/environ");
891 if (DumpLinuxAuxv())
892 DumpBinaryStream(StreamType::LinuxAuxv, "/proc/PID/auxv");
893 if (DumpLinuxMaps())
894 DumpTextStream(StreamType::LinuxMaps, "/proc/PID/maps");
895 if (DumpLinuxProcStat())
896 DumpTextStream(StreamType::LinuxProcStat, "/proc/PID/stat");
897 if (DumpLinuxProcUptime())
898 DumpTextStream(StreamType::LinuxProcUptime, "uptime");
899 if (DumpLinuxProcFD())
900 DumpTextStream(StreamType::LinuxProcFD, "/proc/PID/fd");
901 if (DumpFacebookAppData())
902 DumpTextStream(StreamType::FacebookAppCustomData,
903 "Facebook App Data");
904 if (DumpFacebookBuildID()) {
905 auto bytes = minidump.GetStream(StreamType::FacebookBuildID);
906 if (bytes.size() >= 4) {
907 DataExtractor data(bytes.data(), bytes.size(), eByteOrderLittle,
908 process->GetAddressByteSize());
909 lldb::offset_t offset = 0;
910 uint32_t build_id = data.GetU32(&offset);
911 s.Printf("Facebook Build ID:\n");
912 s.Printf("%u\n", build_id);
913 s.Printf("\n");
914 }
915 }
916 if (DumpFacebookVersionName())
917 DumpTextStream(StreamType::FacebookAppVersionName,
918 "Facebook Version String");
919 if (DumpFacebookJavaStack())
920 DumpTextStream(StreamType::FacebookJavaStack,
921 "Facebook Java Stack");
922 if (DumpFacebookDalvikInfo())
923 DumpTextStream(StreamType::FacebookDalvikInfo,
924 "Facebook Dalvik Info");
925 if (DumpFacebookUnwindSymbols())
926 DumpBinaryStream(StreamType::FacebookUnwindSymbols,
927 "Facebook Unwind Symbols Bytes");
928 if (DumpFacebookErrorLog())
929 DumpTextStream(StreamType::FacebookDumpErrorLog,
930 "Facebook Error Log");
931 if (DumpFacebookAppStateLog())
932 DumpTextStream(StreamType::FacebookAppStateLog,
933 "Faceook Application State Log");
934 if (DumpFacebookAbortReason())
935 DumpTextStream(StreamType::FacebookAbortReason,
936 "Facebook Abort Reason");
937 if (DumpFacebookThreadName())
938 DumpTextStream(StreamType::FacebookThreadName,
939 "Facebook Thread Name");
940 if (DumpFacebookLogcat())
941 DumpTextStream(StreamType::FacebookLogcat, "Facebook Logcat");
942 }
943};
944
946public:
948 : CommandObjectMultiword(interpreter, "process plugin",
949 "Commands for operating on a ProcessMinidump process.",
950 "process plugin <subcommand> [<subcommand-options>]") {
951 LoadSubCommand("dump",
953 }
954
956};
957
959 if (!m_command_sp)
960 m_command_sp = std::make_shared<CommandObjectMultiwordProcessMinidump>(
961 GetTarget().GetDebugger().GetCommandInterpreter());
962 return m_command_sp.get();
963}
static void DumpDirectory(Stream &strm, const FileSpec *file_spec_ptr, uint32_t width)
static llvm::raw_ostream & error(Stream &strm)
#define lldbassert(x)
Definition: LLDBAssert.h:15
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
Definition: Log.h:369
#define LLDB_PLUGIN_DEFINE(PluginName)
Definition: PluginManager.h:32
#define INIT_BOOL(VAR, LONG, SHORT, DESC)
#define APPEND_OPT(VAR)
CommandObjectMultiwordProcessMinidump(CommandInterpreter &interpreter)
~CommandObjectMultiwordProcessMinidump() override=default
OptionGroupBoolean m_dump_linux_lsb_release
OptionGroupBoolean m_dump_linux_proc_uptime
OptionGroupBoolean m_dump_linux_proc_stat
OptionGroupBoolean m_dump_linux_proc_status
CommandObjectProcessMinidumpDump(CommandInterpreter &interpreter)
~CommandObjectProcessMinidumpDump() override=default
void DoExecute(Args &command, CommandReturnObject &result) override
A minimal ObjectFile implementation providing a dummy object file for the cases when the real module ...
static llvm::StringRef GetPluginNameStatic()
An architecture specification class.
Definition: ArchSpec.h:31
llvm::Triple & GetTriple()
Architecture triple accessor.
Definition: ArchSpec.h:461
llvm::Triple::ArchType GetMachine() const
Returns a machine family for the current architecture.
Definition: ArchSpec.cpp:701
const char * GetArchitectureName() const
Returns a static string representing the current architecture.
Definition: ArchSpec.cpp:570
A command line argument class.
Definition: Args.h:33
size_t GetArgumentCount() const
Gets the number of arguments left in this command object.
Definition: Args.h:120
void SetStatus(lldb::ReturnStatus status)
void AppendErrorWithFormat(const char *format,...) __attribute__((format(printf
A uniqued constant string class.
Definition: ConstString.h:40
An data extractor class.
Definition: DataExtractor.h:48
uint32_t GetU32(lldb::offset_t *offset_ptr) const
Extract a uint32_t value from *offset_ptr.
const uint8_t * GetDataStart() const
Get the data start pointer.
const uint8_t * GetDataEnd() const
Get the data end pointer.
static void ReportWarning(std::string message, std::optional< lldb::user_id_t > debugger_id=std::nullopt, std::once_flag *once=nullptr)
Report warning events.
Definition: Debugger.cpp:1622
A file utility class.
Definition: FileSpec.h:56
void ClearDirectory()
Clear the directory in this object.
Definition: FileSpec.cpp:360
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
Definition: FileSpec.cpp:367
static FileSystem & Instance()
std::shared_ptr< DataBuffer > CreateDataBuffer(const llvm::Twine &path, uint64_t size=0, uint64_t offset=0)
Create memory buffer from path.
Class used by the Process to hold a list of its JITLoaders.
Definition: JITLoaderList.h:22
OptionalBool GetMapped() const
A collection class for Module objects.
Definition: ModuleList.h:103
void ForEach(std::function< bool(const lldb::ModuleSP &module_sp)> const &callback) const
Applies 'callback' to each module in this ModuleList.
bool Remove(const lldb::ModuleSP &module_sp, bool notify=true)
Remove a module from the module list.
Definition: ModuleList.cpp:334
void Append(const lldb::ModuleSP &module_sp, bool notify=true)
Append a module to the module list.
Definition: ModuleList.cpp:247
FileSpec & GetFileSpec()
Definition: ModuleSpec.h:53
ArchSpec & GetArchitecture()
Definition: ModuleSpec.h:89
OptionValueBoolean & GetOptionValue()
A command line option parsing protocol class.
Definition: Options.h:58
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
Base class for all processes that don't represent a live process, such as coredumps or processes trac...
void SetExecutableFile(const FileSpec &exe_file, bool add_exe_file_as_first_arg)
Definition: ProcessInfo.cpp:65
void SetArchitecture(const ArchSpec &arch)
Definition: ProcessInfo.h:66
void SetProcessID(lldb::pid_t pid)
Definition: ProcessInfo.h:70
lldb::pid_t GetID() const
Returns the pid of the process or LLDB_INVALID_PROCESS_ID if there is no known pid.
Definition: Process.h:542
lldb::JITLoaderListUP m_jit_loaders_up
Definition: Process.h:3094
void SetUnixSignals(lldb::UnixSignalsSP &&signals_sp)
Definition: Process.cpp:3601
lldb::ByteOrder GetByteOrder() const
Definition: Process.cpp:3611
void SetID(lldb::pid_t new_pid)
Sets the stored pid.
Definition: Process.h:547
uint32_t GetAddressByteSize() const
Definition: Process.cpp:3615
virtual void Finalize(bool destructing)
This object is about to be destroyed, do any necessary cleanup.
Definition: Process.cpp:528
ThreadList m_thread_list
The threads for this process as the user will see them.
Definition: Process.h:3067
Target & GetTarget()
Get the target object pointer for this module.
Definition: Process.h:1246
lldb::SectionSP FindSectionByName(ConstString section_dstr) const
Definition: Section.cpp:558
size_t GetSize() const
Definition: Section.h:75
lldb::SectionSP GetSectionAtIndex(size_t idx) const
Definition: Section.cpp:550
lldb::addr_t GetSectionLoadAddress(const lldb::SectionSP &section_sp) const
An error handling class.
Definition: Status.h:118
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
Definition: Status.cpp:106
static Status FromErrorString(const char *str)
Definition: Status.h:141
static Status static Status FromErrorStringWithFormatv(const char *format, Args &&...args)
Definition: Status.h:151
static Status FromError(llvm::Error error)
Avoid using this in new code. Migrate APIs to llvm::Expected instead.
Definition: Status.cpp:137
static lldb::StopInfoSP CreateStopReasonWithMachException(Thread &thread, uint32_t exc_type, uint32_t exc_data_count, uint64_t exc_code, uint64_t exc_sub_code, uint64_t exc_sub_sub_code, bool pc_already_adjusted=true, bool adjust_pc_if_needed=false)
static lldb::StopInfoSP CreateStopReasonWithSignal(Thread &thread, int signo, const char *description=nullptr, std::optional< int > code=std::nullopt)
Definition: StopInfo.cpp:1466
static lldb::StopInfoSP CreateStopReasonWithException(Thread &thread, const char *description)
Definition: StopInfo.cpp:1489
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition: Stream.cpp:134
SectionLoadList & GetSectionLoadList()
Definition: Target.h:1154
lldb::ModuleSP GetOrCreateModule(const ModuleSpec &module_spec, bool notify, Status *error_ptr=nullptr)
Find a binary on the system and return its Module, or return an existing Module that is already in th...
Definition: Target.cpp:2286
bool SetArchitecture(const ArchSpec &arch_spec, bool set_platform=false, bool merge=true)
Set the architecture for this target.
Definition: Target.cpp:1662
lldb::ModuleSP GetExecutableModule()
Gets the module for the main executable.
Definition: Target.cpp:1504
const ModuleList & GetImages() const
Get accessor for the images for this process.
Definition: Target.h:997
void SetExecutableModule(lldb::ModuleSP &module_sp, LoadDependentFiles load_dependent_files=eLoadDependentsDefault)
Set the main executable module.
Definition: Target.cpp:1553
bool MergeArchitecture(const ArchSpec &arch_spec)
Definition: Target.cpp:1751
void AddThread(const lldb::ThreadSP &thread_sp)
lldb::ThreadSP GetSelectedThread()
Definition: ThreadList.cpp:683
uint32_t GetSize(bool can_update=true)
Definition: ThreadList.cpp:82
bool SetSelectedThreadByID(lldb::tid_t tid, bool notify=false)
Definition: ThreadList.cpp:695
llvm::ArrayRef< uint8_t > GetBytes() const
Definition: UUID.h:66
void Clear()
Definition: UUID.h:62
static lldb::UnixSignalsSP Create(const ArchSpec &arch)
Definition: UnixSignals.cpp:29
llvm::object::MinidumpFile & GetMinidumpFile()
static MemoryRegionInfo GetMemoryRegionInfo(const MemoryRegionInfos &regions, lldb::addr_t load_addr)
llvm::ArrayRef< uint8_t > GetStream(StreamType stream_type)
static llvm::Expected< MinidumpParser > Create(const lldb::DataBufferSP &data_buf_sp)
static llvm::StringRef GetStreamTypeAsString(StreamType stream_type)
bool DoUpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thread_list) override
Update the thread list following process plug-in's specific logic.
bool GetProcessInfo(ProcessInstanceInfo &info) override
static llvm::StringRef GetPluginNameStatic()
ProcessMinidump(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec &core_file, lldb::DataBufferSP code_data)
bool IsAlive() override
Check if a process is still alive.
lldb::ModuleSP GetOrCreateModule(lldb_private::UUID minidump_uuid, llvm::StringRef name, lldb_private::ModuleSpec module_spec)
size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size, Status &error) override
Actually do the reading of memory from a process.
CommandObject * GetPluginCommandObject() override
Return a multi-word command object that can be used to expose plug-in specific commands.
Status GetMemoryRegions(lldb_private::MemoryRegionInfos &region_list) override
Obtain all the mapped memory regions within this process.
std::optional< MemoryRegionInfos > m_memory_regions
static llvm::StringRef GetPluginDescriptionStatic()
static lldb::ProcessSP CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec *crash_file_path, bool can_connect)
bool WarnBeforeDetach() const override
Before lldb detaches from a process, it warns the user that they are about to lose their debug sessio...
llvm::ArrayRef< minidump::Thread > m_thread_list
lldb_private::DataExtractor GetAuxvData() override
std::unordered_map< uint32_t, const minidump::ExceptionStream > m_exceptions_by_tid
bool CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) override
Check if a plug-in instance can debug the file in module.
Status DoGetMemoryRegionInfo(lldb::addr_t load_addr, MemoryRegionInfo &range_info) override
DoGetMemoryRegionInfo is called by GetMemoryRegionInfo after it has removed non address bits from loa...
void RefreshStateAfterStop() override
Currently called as part of ShouldStop.
std::optional< MinidumpParser > m_minidump_parser
size_t ReadMemory(lldb::addr_t addr, void *buf, size_t size, Status &error) override
Read of memory from a process.
JITLoaderList & GetJITLoaders() override
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:82
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
Definition: Log.h:332
lldb::offset_t DumpDataExtractor(const DataExtractor &DE, Stream *s, lldb::offset_t offset, lldb::Format item_format, size_t item_byte_size, size_t item_count, size_t num_per_line, uint64_t base_addr, uint32_t item_bit_size, uint32_t item_bit_offset, ExecutionContextScope *exe_scope=nullptr, bool show_memory_tags=false)
Dumps item_count objects into the stream s.
Definition: SBAddress.h:15
std::shared_ptr< lldb_private::Thread > ThreadSP
Definition: lldb-forward.h:450
std::shared_ptr< lldb_private::CommandObject > CommandObjectSP
Definition: lldb-forward.h:333
@ eFormatBytesWithASCII
uint64_t offset_t
Definition: lldb-types.h:85
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:389
@ eReturnStatusSuccessFinishResult
@ eByteOrderLittle
std::shared_ptr< lldb_private::Listener > ListenerSP
Definition: lldb-forward.h:368
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
Definition: lldb-forward.h:336
std::shared_ptr< lldb_private::StopInfo > StopInfoSP
Definition: lldb-forward.h:431
std::shared_ptr< lldb_private::Section > SectionSP
Definition: lldb-forward.h:418
uint64_t addr_t
Definition: lldb-types.h:80
std::shared_ptr< lldb_private::Target > TargetSP
Definition: lldb-forward.h:448
std::shared_ptr< lldb_private::Module > ModuleSP
Definition: lldb-forward.h:373
BaseType GetRangeBase() const
Definition: RangeMap.h:45
BaseType GetRangeEnd() const
Definition: RangeMap.h:78