[Lldb-commits] [lldb] fcee033 - [lldb] Suppress unsupported language warning for assembly (#95871)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 18 08:51:44 PDT 2024
Author: Jonas Devlieghere
Date: 2024-06-18T08:51:40-07:00
New Revision: fcee0333bab6747ca34188f3a781f4fef900b7fe
URL: https://github.com/llvm/llvm-project/commit/fcee0333bab6747ca34188f3a781f4fef900b7fe
DIFF: https://github.com/llvm/llvm-project/commit/fcee0333bab6747ca34188f3a781f4fef900b7fe.diff
LOG: [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
Added:
Modified:
lldb/source/Target/Process.cpp
lldb/test/Shell/Process/UnsupportedLanguage.test
Removed:
################################################################################
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 1e321f8bde391..9b905663a2c32 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 8cf0c048e366b..d7e6e5de77512 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"
More information about the lldb-commits
mailing list