diff options
| author | Enrico Granata <egranata@apple.com> | 2013-06-26 00:31:21 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2013-06-26 00:31:21 +0000 |
| commit | fb1d9fe15ef5ffe24a24b395bfbc0019edc8f26f (patch) | |
| tree | 169d6e34deaeb7cc34a71e2d9e1b92b01ab26586 | |
| parent | 5cd9538b90f735f9408f2a5b173bc517aae6ae9a (diff) | |
| download | bcm5719-llvm-fb1d9fe15ef5ffe24a24b395bfbc0019edc8f26f.tar.gz bcm5719-llvm-fb1d9fe15ef5ffe24a24b395bfbc0019edc8f26f.zip | |
<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
llvm-svn: 184898
| -rw-r--r-- | lldb/source/Commands/CommandObjectType.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp index e69620e0472..b300f213db0 100644 --- a/lldb/source/Commands/CommandObjectType.cpp +++ b/lldb/source/Commands/CommandObjectType.cpp @@ -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", |

