[Lldb-commits] [lldb] r184898 - <rdar://problem/14243761>
Enrico Granata
egranata at apple.com
Tue Jun 25 17:31:22 PDT 2013
Author: enrico
Date: Tue Jun 25 19:31:21 2013
New Revision: 184898
URL: http://llvm.org/viewvc/llvm-project?rev=184898&view=rev
Log:
<rdar://problem/14243761>
The argument to -w (--category) in type * list is a regular expression
This caused unhappiness with the gnu-libstdc++ category because of the double ++
Now we check for exact textual match as-well-as regexp matching
Modified:
lldb/trunk/source/Commands/CommandObjectType.cpp
Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=184898&r1=184897&r2=184898&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Tue Jun 25 19:31:21 2013
@@ -1873,7 +1873,7 @@ private:
return true;
// if we have a regex and this category does not match it, just skip it
- if(param->cate_regex != NULL && param->cate_regex->Execute(cate_name) == false)
+ if(param->cate_regex != NULL && strcmp(cate_name,param->cate_regex->GetText()) != 0 && param->cate_regex->Execute(cate_name) == false)
return true;
result->GetOutputStream().Printf("-----------------------\nCategory: %s (%s)\n-----------------------\n",
@@ -1897,7 +1897,7 @@ private:
RegularExpression* regex,
CommandReturnObject *result)
{
- if (regex == NULL || regex->Execute(type))
+ if (regex == NULL || strcmp(type,regex->GetText()) == 0 || regex->Execute(type))
result->GetOutputStream().Printf ("%s: %s\n", type, entry->GetDescription().c_str());
return true;
}
@@ -2208,7 +2208,7 @@ private:
const char* cate_name = cate->GetName();
- if (regex == NULL || regex->Execute(cate_name))
+ if (regex == NULL || strcmp(cate_name, regex->GetText()) == 0 || regex->Execute(cate_name))
result->GetOutputStream().Printf("Category %s is%s enabled\n",
cate_name,
(cate->IsEnabled() ? "" : " not"));
@@ -2421,7 +2421,7 @@ private:
return true;
// if we have a regex and this category does not match it, just skip it
- if(param->cate_regex != NULL && param->cate_regex->Execute(cate_name) == false)
+ if(param->cate_regex != NULL && strcmp(cate_name,param->cate_regex->GetText()) != 0 && param->cate_regex->Execute(cate_name) == false)
return true;
result->GetOutputStream().Printf("-----------------------\nCategory: %s (%s)\n-----------------------\n",
@@ -2635,7 +2635,7 @@ private:
return true;
// if we have a regex and this category does not match it, just skip it
- if(param->cate_regex != NULL && param->cate_regex->Execute(cate_name) == false)
+ if(param->cate_regex != NULL && strcmp(cate_name,param->cate_regex->GetText()) != 0 && param->cate_regex->Execute(cate_name) == false)
return true;
result->GetOutputStream().Printf("-----------------------\nCategory: %s (%s)\n-----------------------\n",
More information about the lldb-commits
mailing list