https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/95871
>From 7956f02f180d9e7593e2ddaa2ed376ec926a6825 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere <jo...@devlieghere.com> Date: Mon, 17 Jun 2024 17:41:03 -0700 Subject: [PATCH] [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 --- lldb/source/Target/Process.cpp | 4 +++- 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 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..6490505033483 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-NOT: This version of LLDB has no plugin for the language "cobol" _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits