llvm-project/lldb/bindings
Greg Clayton 9af089f517 Add the ability to show when variables fails to be available when debug info is valid.
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

Differential Revision: https://reviews.llvm.org/D133164
2022-09-09 16:14:46 -07:00
..
interface Add the ability to show when variables fails to be available when debug info is valid. 2022-09-09 16:14:46 -07:00
lua [lldb] (Semi-automatically) format .swig files 2021-12-16 13:58:37 +01:00
python [lldb] Remove uses of six module (NFC) 2022-08-11 19:06:15 -07:00
CMakeLists.txt [lldb] Move create_relative_symlink function up in CMake hierarchy 2021-11-23 21:59:49 +01:00
headers.swig [trace][intel-pt] Create basic SB API 2021-06-17 15:14:47 -07:00
interfaces.swig [trace] Add SBTraceCursor bindings 2022-08-02 16:55:33 -07:00
macros.swig [lldb][bindings] Implement __repr__ instead of __str__ 2022-06-11 10:19:51 -07:00