diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2024-06-18 08:51:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 08:51:40 -0700 |
commit | fcee0333bab6747ca34188f3a781f4fef900b7fe (patch) | |
tree | d9bc17c99addb042bfec2ca95f5a0caab538e8b0 | |
parent | da0e5359fc1a5bf1749306440f9dad089046d772 (diff) | |
download | llvm-fcee0333bab6747ca34188f3a781f4fef900b7fe.zip llvm-fcee0333bab6747ca34188f3a781f4fef900b7fe.tar.gz llvm-fcee0333bab6747ca34188f3a781f4fef900b7fe.tar.bz2 |
[lldb] Suppress unsupported language warning for assembly (#95871)
The following warning is technically correct, but pretty much useless,
since there aren't any frame variables that we'd expect the debugger to
understand.
> This version of LLDB has no plugin for the language "assembler".
> Inspection of frame variables will be limited.
This message is useful in the general case but should be suppressed for
the "assembler" case.
rdar://92745462
-rw-r--r-- | lldb/source/Target/Process.cpp | 4 | ||||
-rw-r--r-- | lldb/test/Shell/Process/UnsupportedLanguage.test | 15 |
2 files changed, 15 insertions, 4 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 1e321f8..9b90566 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -5924,7 +5924,9 @@ void Process::PrintWarningUnsupportedLanguage(const SymbolContext &sc) { if (!sc.module_sp) return; LanguageType language = sc.GetLanguage(); - if (language == eLanguageTypeUnknown) + if (language == eLanguageTypeUnknown || + language == lldb::eLanguageTypeAssembly || + language == lldb::eLanguageTypeMipsAssembler) return; LanguageSet plugins = PluginManager::GetAllTypeSystemSupportedLanguagesForTypes(); diff --git a/lldb/test/Shell/Process/UnsupportedLanguage.test b/lldb/test/Shell/Process/UnsupportedLanguage.test index 8cf0c04..d7e6e5d 100644 --- a/lldb/test/Shell/Process/UnsupportedLanguage.test +++ b/lldb/test/Shell/Process/UnsupportedLanguage.test @@ -1,8 +1,17 @@ -Test warnings. +Test unsupported language warning + REQUIRES: shell + RUN: %clang_host %S/Inputs/true.c -std=c99 -g -c -S -emit-llvm -o - \ RUN: | sed -e 's/DW_LANG_C99/DW_LANG_Mips_Assembler/g' >%t.ll RUN: %clang_host %t.ll -g -o %t.exe -RUN: %lldb -o "b main" -o r -o q -b %t.exe 2>&1 | FileCheck %s +RUN: %lldb -o "b main" -o r -o q -b %t.exe 2>&1 | FileCheck %s --check-prefix ASM + +ASM-NOT: This version of LLDB has no plugin for the language "assembler" + +RUN: %clang_host %S/Inputs/true.c -std=c99 -g -c -S -emit-llvm -o - \ +RUN: | sed -e 's/DW_LANG_C99/DW_LANG_Cobol74/g' >%t.ll +RUN: %clang_host %t.ll -g -o %t.exe +RUN: %lldb -o "b main" -o r -o q -b %t.exe 2>&1 | FileCheck %s --check-prefix COBOL -CHECK: This version of LLDB has no plugin for the language "assembler" +COBOL: This version of LLDB has no plugin for the language "cobol74" |