llvm-project/lldb/source/Commands
Greg Clayton 4763200ec9 Add the ability to show when variables fails to be available when debug info is valid.
Summary:
Many times when debugging variables might not be available even though a user can successfully set breakpoints and stops somewhere. Letting the user know will help users fix these kinds of issues and have a better debugging experience.

Examples of this include:
- enabling -gline-tables-only and being able to set file and line breakpoints and yet see no variables
- unable to open object file for DWARF in .o file debugging for darwin targets due to modification time mismatch or not being able to locate the N_OSO file.

This patch adds an new API to SBValueList:

  lldb::SBError lldb::SBValueList::GetError();

object so that if you request a stack frame's variables using SBValueList SBFrame::GetVariables(...), you can get an error the describes why the variables were not available.

This patch adds the ability to get an error back when requesting variables from a lldb_private::StackFrame when calling GetVariableList.

It also now shows an error in response to "frame variable" if we have debug info and are unable to get varialbes due to an error as mentioned above:

(lldb) frame variable
error: "a.o" object from the "/tmp/libfoo.a" archive: either the .o file doesn't exist in the archive or the modification time (0x63111541) of the .o file doesn't match

Reviewers: labath JDevlieghere aadsm yinghuitan jdoerfert sscalpone

Subscribers:

Differential Revision: https://reviews.llvm.org/D133164
2022-09-12 13:59:05 -07:00
..
CMakeLists.txt [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandCompletions.cpp [Commands] Remove redundant member initialization (NFC) 2022-01-23 11:07:14 -08:00
CommandObjectApropos.cpp Add a "command container" hierarchy to allow users to add container nodes. 2021-10-18 15:29:24 -07:00
CommandObjectApropos.h
CommandObjectBreakpoint.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectBreakpoint.h
CommandObjectBreakpointCommand.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectBreakpointCommand.h
CommandObjectCommands.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectCommands.h
CommandObjectDisassemble.cpp [lldb] Remove redundant member initialization (NFC) 2022-07-24 12:27:09 -07:00
CommandObjectDisassemble.h [trace] Add a flag to the decoder to output the instruction type 2022-07-12 16:23:03 -07:00
CommandObjectExpression.cpp [lldb] Remove redundant member initialization (NFC) 2022-07-24 12:27:09 -07:00
CommandObjectExpression.h
CommandObjectFrame.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
CommandObjectFrame.h
CommandObjectGUI.cpp Have CommandObjectParsed check for "commands that take no arguments". 2022-06-27 15:14:41 -07:00
CommandObjectGUI.h
CommandObjectHelp.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectHelp.h [lldb] Fix modernize-use-equals-default warnings (NFC) 2022-06-17 15:08:02 -07:00
CommandObjectLanguage.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
CommandObjectLanguage.h
CommandObjectLog.cpp [NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute. 2022-07-28 13:28:26 -07:00
CommandObjectLog.h
CommandObjectMemory.cpp [lldb] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 11:31:49 -07:00
CommandObjectMemory.h
CommandObjectMemoryTag.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectMemoryTag.h [lldb][AArch64] Add "memory tag read" command 2021-06-24 17:35:45 +01:00
CommandObjectMultiword.cpp Add a repeat command option for "thread backtrace --count N". 2022-02-14 15:48:06 -08:00
CommandObjectPlatform.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectPlatform.h
CommandObjectPlugin.cpp [lldb] Remove redundant calls to set eReturnStatusFailed 2021-06-17 14:39:35 +01:00
CommandObjectPlugin.h
CommandObjectProcess.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectProcess.h
CommandObjectQuit.cpp Have CommandObjectParsed check for "commands that take no arguments". 2022-06-27 15:14:41 -07:00
CommandObjectQuit.h
CommandObjectRegexCommand.cpp CommandObjectRegexCommand shouldn't put two commands on the history stack. 2022-06-03 11:34:53 -07:00
CommandObjectRegexCommand.h [lldb] Fix (unintentional) recursion in CommandObjectRegexCommand 2022-02-23 12:34:14 -08:00
CommandObjectRegister.cpp [lldb] Always use APFloat for FP dumping 2022-07-27 14:30:35 +02:00
CommandObjectRegister.h
CommandObjectReproducer.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectReproducer.h
CommandObjectScript.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectScript.h [lldb] Fix modernize-use-equals-default warnings (NFC) 2022-06-17 15:08:02 -07:00
CommandObjectSession.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectSession.h
CommandObjectSettings.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectSettings.h
CommandObjectSource.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectSource.h
CommandObjectStats.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectStats.h
CommandObjectTarget.cpp Don't create sections for SHN_ABS symbols in ELF files. 2022-08-22 14:46:27 -07:00
CommandObjectTarget.h
CommandObjectThread.cpp [LLDB][NFC] Fix optons parsing and misc. reliability in CommandObjectThread 2022-08-17 12:20:10 -07:00
CommandObjectThread.h
CommandObjectThreadUtil.cpp [trace] Fix errors when handling command arguments 2022-06-28 17:54:30 -07:00
CommandObjectThreadUtil.h [trace] Fix errors when handling command arguments 2022-06-28 17:54:30 -07:00
CommandObjectTrace.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectTrace.h [trace][intel-pt] Implement trace start and trace stop 2021-03-30 17:31:37 -07:00
CommandObjectType.cpp [lldb][NFCI] Refactor regex filtering logic in CommandObjectTypeFormatterList 2022-07-21 09:22:40 -07:00
CommandObjectType.h
CommandObjectVersion.cpp Have CommandObjectParsed check for "commands that take no arguments". 2022-06-27 15:14:41 -07:00
CommandObjectVersion.h
CommandObjectWatchpoint.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectWatchpoint.h
CommandObjectWatchpointCommand.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectWatchpointCommand.h
CommandOptionArgumentTable.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandOptionsProcessLaunch.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandOptionsProcessLaunch.h [Commands] Remove redundant member initialization (NFC) 2022-01-23 11:07:14 -08:00
Options.td [trace][intel pt] Fix per-psb packet decoding 2022-08-12 15:13:48 -07:00
OptionsBase.td [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00