[Lldb-commits] [PATCH] D112564: [lldb] Add support for custom char8_t types with different name
Luís Ferreira via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Nov 28 18:39:46 PST 2021
ljmf00 added a comment.
In D112564#3089399 <https://reviews.llvm.org/D112564#3089399>, @labath wrote:
> What exactly do you need the test to do? Is printing a global variable (`char8_t_ish foo[] = "my string"`) sufficient?
> If so, you can take a look at the tests in `test/Shell/SymbolFile/DWARF` for inspiration. There are .s and .ll tests there.
> The pattern would roughly be:
>
> # RUN: llvm-mc (or llc) -o %t %s
> # RUN: %lldb %t -o "target variable foo" | FileCheck %s
>
> # CHECK: (char8_t_ish[]) foo = "my string"
>
> your code here
I was writing the tests locally, although I can't reproduce the failure with a simple type. I can get the error when using a custom LLDB formatter, however. See https://github.com/ljmf00/lldb-d/blob/main/lldb/source/Plugins/Language/D/DTypeUtils.cpp#L82 . I should also rename this patch to something less misleading, since it is not the type name the issue, I just got this right due to fallback on invalid encoding on my side.
That said, do you know an easier way to test this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112564/new/
https://reviews.llvm.org/D112564
More information about the lldb-commits
mailing list