llvm-project/lldb/source/Symbol
David Spickett 02c1c93948 [LLDB] Fix printing a static bool struct member when using "image lookup -t"
Fixes #58135

Somehow lldb was able to print the member on its own but when we try
to print the whole type found by "image lookup -t" lldb would crash.

This is because we'd encoded the initial value of the member as an integer.
Which isn't the end of the world because bool is integral for C++.
However, clang has a special AST node to handle literal bool and it
expected us to use that instead.

This adds a new codepath to handle static bool which uses cxxBoolLiteralExpr
and we get the member printed as you'd expect.

For testing I added a struct with just the bool because trying to print
all of "A" crashes as well. Presumably because one of the other member's
types isn't handled properly either.

So for now I just added the bool case, we can merge it with A later.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D135169
2022-10-07 09:02:59 +00:00
..
ArmUnwindInfo.cpp Use llvm::upper_bound (NFC) 2022-09-03 11:17:39 -07:00
Block.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
CMakeLists.txt [lldb] Teach LLDB about Mach-O filesets 2022-08-25 15:24:51 -07:00
CompactUnwindInfo.cpp Use llvm::lower_bound (NFC) 2022-09-03 11:17:37 -07:00
CompileUnit.cpp Implement better path matching in FileSpecList::FindCompatibleIndex(...). 2022-08-08 15:20:38 -07:00
CompilerDecl.cpp
CompilerDeclContext.cpp
CompilerType.cpp [LLDB] Fix printing a static bool struct member when using "image lookup -t" 2022-10-07 09:02:59 +00:00
DWARFCallFrameInfo.cpp [lldb] Replace Host::SystemLog with Debugger::Report{Error,Warning} 2022-06-24 09:46:26 -07:00
DebugMacros.cpp
DeclVendor.cpp [lldb][NFC] Remove outdated FIXME 2021-09-20 11:44:20 -07:00
FuncUnwinders.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
Function.cpp [trace] Add a flag to the decoder to output the instruction type 2022-07-12 16:23:03 -07:00
LineEntry.cpp Change PathMappingList::FindFile to return an optional result (NFC) 2021-06-29 15:10:46 -07:00
LineTable.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
LocateSymbolFile.cpp [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
LocateSymbolFileMacOSX.cpp [lldb] Fetching symbols in the background with dsymForUUID 2022-08-15 17:57:24 -07:00
ObjectContainer.cpp [lldb] Teach LLDB about Mach-O filesets 2022-08-25 15:24:51 -07:00
ObjectFile.cpp [lldb] Change CreateMemoryInstance to take a WritableDataBuffer 2022-04-05 13:46:41 -07:00
PostfixExpression.cpp [LLDB] Remove cases of using namespace llvm:: from header file 2022-03-03 10:39:06 -08:00
Symbol.cpp Don't create sections for SHN_ABS symbols in ELF files. 2022-08-22 14:46:27 -07:00
SymbolContext.cpp [NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute. 2022-07-28 13:28:26 -07:00
SymbolFile.cpp Re-submit "[lldb] Filter DIEs based on qualified name where possible" 2022-08-04 15:52:27 -07:00
SymbolFileOnDemand.cpp Re-submit "[lldb] Filter DIEs based on qualified name where possible" 2022-08-04 15:52:27 -07:00
SymbolVendor.cpp [lldb] Return StringRef from PluginInterface::GetPluginName 2021-10-18 10:14:42 +02:00
Symtab.cpp [lldb] Allow SymbolTable regex search functions to match mangled name 2022-08-03 10:55:32 -07:00
Type.cpp [lldb] Fixed a number of typos 2022-09-13 10:38:38 -07:00
TypeList.cpp [lldb/Symbol] Fix null-deref in TypeList::Dump 2022-08-11 22:29:06 -07:00
TypeMap.cpp Remove dead code: TypeMap::RemoveMismatchedTypes(TypeClass type_class) 2022-07-07 20:46:14 +00:00
TypeSystem.cpp [lldb] Automatically unwrap parameter packs in template argument accessors 2022-08-16 18:10:14 -07:00
UnwindPlan.cpp Revert "Remove the dependency between lib/DebugInfoDWARF and MC." 2022-10-06 14:58:34 -07:00
UnwindTable.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
Variable.cpp Add the ability to show when variables fails to be available when debug info is valid. 2022-09-12 13:59:05 -07:00
VariableList.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00