Skip to content

Commit

Permalink
Rename human-readable name for DW_LANG_Mips_Assembler
Browse files Browse the repository at this point in the history
The Mips in DW_LANG_Mips_Assembler is a vendor name not an
architecture name and in lack of a proper generic DW_LANG_assembler,
some assemblers emit DWARF using this tag. Due to a warning I recently
introduced users will now be greeted with

  This version of LLDB has no plugin for the mipsassem language. Inspection of frame variables will be limited.

By renaming this to just "Assembler" this error message will make more sense.

Differential Revision: https://reviews.llvm.org/D101406

rdar://77214764
  • Loading branch information
adrian-prantl committed May 13, 2021
1 parent e1aa528 commit 017d7a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lldb/source/Target/Language.cpp
Expand Up @@ -184,7 +184,7 @@ struct language_name_pair language_names[] = {
{"fortran03", eLanguageTypeFortran03},
{"fortran08", eLanguageTypeFortran08},
// Vendor Extensions
{"mipsassem", eLanguageTypeMipsAssembler},
{"assembler", eLanguageTypeMipsAssembler},
{"renderscript", eLanguageTypeExtRenderScript},
// Now synonyms, in arbitrary order
{"objc", eLanguageTypeObjC},
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Target/Process.cpp
Expand Up @@ -5741,7 +5741,7 @@ void Process::PrintWarningUnsupportedLanguage(const SymbolContext &sc) {
if (!plugins[language]) {
PrintWarning(Process::Warnings::eWarningsUnsupportedLanguage,
sc.module_sp.get(),
"This version of LLDB has no plugin for the %s language. "
"This version of LLDB has no plugin for the language \"%s\". "
"Inspection of frame variables will be limited.\n",
Language::GetNameForLanguageType(language));
}
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/Shell/Process/UnsupportedLanguage.test
@@ -1,8 +1,8 @@
Test warnings.
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_PLI/g' >%t.ll
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 | FileCheck %s

CHECK: This version of LLDB has no plugin for the pli language
CHECK: This version of LLDB has no plugin for the language "assembler"

0 comments on commit 017d7a9

Please sign in to comment.