-
Notifications
You must be signed in to change notification settings - Fork 342
[lldb] Fix embedded type summary regex handling #8121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9b0474c
d796de5
cd10b01
65b1fbb
1606ff2
b4a913d
18850a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1452,7 +1452,7 @@ static void LoadTypeSummariesForModule(ModuleSP module_sp) { | |
return; | ||
|
||
Log *log = GetLog(LLDBLog::DataFormatters); | ||
const char *module_name = module_sp->GetObjectName().GetCString(); | ||
const char *module_name = module_sp->GetFileSpec().GetFilename().GetCString(); | ||
|
||
TypeCategoryImplSP category; | ||
DataVisualization::Categories::GetCategory(ConstString("default"), category); | ||
|
@@ -1488,7 +1488,7 @@ static void LoadTypeSummariesForModule(ModuleSP module_sp) { | |
auto summary_sp = | ||
std::make_shared<StringSummaryFormat>(flags, summary_string.data()); | ||
FormatterMatchType match_type = eFormatterMatchExact; | ||
if (summary_string.front() == '^' && summary_string.back() == '$') | ||
if (type_name.front() == '^') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It just dawned on me that in Pascal, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and AFAIK there are downstream Pascal compilers that target LLDB. |
||
match_type = eFormatterMatchRegex; | ||
category->AddTypeSummary(type_name, match_type, summary_sp); | ||
LLDB_LOGF(log, "Loaded embedded type summary for '%s' from %s.", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Micro-optimization: since this is only used in LLDB_LOGF, we can save the C string conversion by using LLDB_LOG instead and use a StringRef.