[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Mon May 20 15:35:08 PDT 2024
================
@@ -203,3 +208,38 @@ void AddressRange::DumpDebug(Stream *s) const {
static_cast<void *>(m_base_addr.GetSection().get()),
m_base_addr.GetOffset(), GetByteSize());
}
+
+bool AddressRange::GetDescription(Stream *s, Target *target) const {
+ const char *file_name = nullptr;
----------------
clayborg wrote:
Init this with "" so we don't need to set it. We need to do this because a valid target can be supplied, but it might not have the section loaded yet. But we can also have a AddressRange with no section, and below on line 221, we only set the filename to valid if there is a section, so this code can crash if we have a target but no section as file_name will be NULL and crash in the `Printf(...)` call below.
https://github.com/llvm/llvm-project/pull/92014
More information about the lldb-commits
mailing list