Questions tagged [lldb]
LLDB is a debugger built as a set of reusable components which highly leverage existing libraries in the larger LLVM Project, such as the Clang expression parser and LLVM disassembler.
1,884
questions
0
votes
1
answer
12
views
LLDB Python ReadMemory returns NoneType
I have a script in Python where I check value of x0 register which is a pointer to some memory address and read memory from there. But in my Python script, ReadMemory return None and because of that ...
0
votes
0
answers
23
views
Change display name of C++ functions in LLDB (with DWARF)
I would like to change the display name of some of my C++ functions when debugging them in LLDB. It aims to provide some tags along with the function name to show my functions which applied with ...
3
votes
2
answers
46
views
print contents of std::vector<std::string> in lldb
I want to print all the strings in a vector. When I do
(lldb) p myVector
(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std:...
0
votes
0
answers
9
views
Why does my gcroot output have so many weird things in it?
I'm having trouble finding good documentation for the gcroot command as it applies to .NET core code so it's making it hard to follow some very weird gcroot output I have.
Below you'll see the top ...
1
vote
1
answer
27
views
Why does lldb only show "dyld" in each stack frame on macOS Ventura?
I maintain a Python library that's written in C++ (using Pybind11). For the past couple of years, I've been able to debug it just fine with lldb, just by compiling the extension in debug mode (i.e.: ...
1
vote
1
answer
53
views
Is there any way to view the Debug representation of a Rust variable in the LLDB debugger?
Rust code can be debugged using LLDB. The representation of variables used by tools like CodeLLDB, though, is simply a breakdown of the in-memory contents of the variable and does not show any ...
0
votes
1
answer
11
views
using continue in LLDB stops the process and throws a SIGSEGV
I'm trying to debug a native C++ App that is crashing using lldb
I also have a sleep(5) at the start of android_main so that I can attach to my app in that time, if that matters
After attaching the ...
1
vote
0
answers
43
views
Thread 17: EXC_BAD_ACCESS (code=257, address=0x1) in swift
This is my func where the crash is occurring:
//KabaSDKThunk.swift
func isStarted() throws -> NSNumber {
do {
try sdk.isStarted() //Crash on this line
print("...
0
votes
0
answers
20
views
Error restarting when breakpoint is set in cin function during c++ debugging
#include<iostream>
using namespace std;
int main(){
int a;
cin >> a;
cout << a;
return 0;
}
This is my code. When you apply a breakpoint to the cin function, the ...
0
votes
0
answers
36
views
How to visualise STL container contents in debugger using Clion and GCC on an M1 Mac
I have a large C++ project that makes use of C++20 features and I'd like to be able to work on it using CLion on an M1 Mac. Since clang doesn't yet support all of C++20, I have installed g++-12 and ...
0
votes
0
answers
22
views
Cortex-M remote target with LLDB script
I'm currently able to connect, load and debugg a Nucleo-G0B1 board with LLDB and pyOCD (also with OpenOCD) using the following sequence of commands:
$ lldb Build/temp.elf
(lldb) gdb-remote 127.0.0.1:...
0
votes
1
answer
28
views
Can an SBType be created from a pointer string?
I want to create an SBType from a string. The goal is to use the SBType to compute the pointer type. This is the current code:
# `typ` is a string representing a C type (int, int32_t, char*).
...
0
votes
0
answers
35
views
No LLDB Debugger in Codeline In MacOS Environment
I have a MacOS. On Xcode, I have lldb. However, when there is no LLDB option in Codelite despite using a MAC. Why? How do I get back lldb? Thanks a lot.
I looked into settings--> GDB Settings but ...
2
votes
1
answer
140
views
Completely uninstall VS Code extensions in WSL
I cannot uninstall a certain VS Code extension (CodeLLDB) that is installed in my WSL. If I try with the VS Code GUI after reopening the program the extension is still there. If I try with the console ...
0
votes
0
answers
59
views
How to redirect the std output of a C++ program into a file in VSCode on Mac OS by "launch.json"?
I'm trying to let the output of a C++ program to go into a file, say, "image.ppm". Actually, using the following launch.json file works pretty well on my Ubuntu 20.04.
{
"name&...
1
vote
1
answer
44
views
Access boost tcp stream object from lldb
I'm trying to print the reference value of std::optional which is from the following type:
boost::beast::ssl_stream<boost::beast::basic_stream<boost::asio::ip::tcp,
boost::asio::any_io_executor,...
0
votes
0
answers
36
views
LLDB or GDB: break if any child/fork hits a breakpoint
I'm trying to figure out the following issue with podman in rootless mode:
$ podman run -it --rm docker.io/archlinux
Error: failed to mount overlay for metacopy check with "" options: ...
0
votes
1
answer
48
views
Macbook M1 assembly lldb displays only 3 source lines then switches to object code display
First attempt at ARM64 (apple M1) assembly coding. Have basic 'hello world' code which assembles and runs correctly but when I run it in lldb, only the first three lines are displayed in full source ...
1
vote
1
answer
89
views
CodeLLDB and VSCode - How to print an array
Using the CodeLLDB extension, I'm successfully debugging my C projects with lldb in VSCode.
The problem is that I cannot use lldb commands in the VSCode watch window.
For example, I'm trying to print ...
0
votes
1
answer
37
views
Google breakpad crashes when run under a debugger
We have a problem where initializing the Google Breakpad exception handler errors out when the program is run under lldb, but not when run normally from the shell.
The system is MacOS 13 (Ventura) and ...
0
votes
1
answer
41
views
Is it possible to set a symbolic breakpoint for when an iOS device turns to landscape?
I'm debugging an issue where the device unexpectedly turns to landscape and back to portrait orientation, and trying to find the root cause of it.
0
votes
1
answer
33
views
Call dump in lldb by object refernce
I would like to call dump method in the LLDB while using Debug View Hierarchy.
Select element (for instance View controller) -> open Object Inspector -> get the address and execute dump in lldb.
...
0
votes
0
answers
15
views
Is it possible to get LLDB's compilation information from its executable?
I compile clang, then compile LLDB. It's OK. But my compiled lldb executable file seems different with others, e.g. the VSCode plugin "CodeLLDB"'s bundled one. I know it contains rust ...
1
vote
0
answers
104
views
Xcode 14.1: "Couldn't realize type of self"
I recently added Swift to my existing objective-c static library project and encountering issues when debugging Swift code.
When code stops at a breakpoint and I enter a po command, such as: po title, ...
1
vote
0
answers
121
views
Why debug execution order doesn't match code order in c++?
I am new to C++. When I debugged in Clion, I found that the execution order using Step over (F8) doesn't match the real code's order. So far, I think the most possible reason is compiler optimization. ...
0
votes
1
answer
61
views
How to print the value of std::any in lldb
for example:
std::any a = 1
in lldb:
(lldb) p a
(std::any) $1 = {
__h = 0x000000010000d200 (main`std::__1::__any_imp::_SmallHandler<int>::__handle(std::__1::__any_imp::_Action, std::__1::any ...
0
votes
1
answer
26
views
How to show an environment variable (that I did not set) in lldb?
I would like to inspect the defined environment variables in various moments during the run of a program.
settings show target.env-vars only shows me env-vars I've set in lldb, not all the environment ...
1
vote
1
answer
50
views
gdb 12.1 on macosx and windows hanging sometimes, lldb missing equivalent features. Anything we can do?
We are running students on assembler on windows and some intel macs.
gdb is failing under msys2 when using layout (TUI).
I was able to get it working on the CMD window, but it still dies if:
gdb myexe
...
0
votes
2
answers
72
views
Why gcc -g doesn't work with multiple files
To debug my C code I compile it with the -g flag and use lldb to see where my seg fault is for example.
I use the -g flag so the output of lldb is in C not Assembly.
but now I have a multiple files ...
0
votes
0
answers
51
views
CLion Debugging (C program): error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x10e285d20)
I am debugging my program written in C language and need to evaluate expression:
(int)strlen((char*)final_string)
but error occur:
error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, ...
-1
votes
1
answer
34
views
Reverse engineering. How to see the code executed before the breakpoint
Once in a game I was playing, a smart person wrote a cheat that allows you to disconnect all players from the server. I became interested in how it is possible to create protection against this. The ...
0
votes
0
answers
41
views
How to read memory with segment addressing mode in lldb on x86-64?
While debugging a process with lldb I get to this assembly instruction:
-> 0x7ffff79c5187 <+7>: movq %fs:(%r14), %r14
Or in intel syntax:
-> 0x7ffff79c5187 <+7>: mov r14, ...
0
votes
1
answer
25
views
How to exclude a module from symbol parsing of lldb?
Are there any lldb settings via I can exclude a loaded module from the initial lldb symbol parsing?
0
votes
1
answer
48
views
Debugger in CLion on Macos Ventura not working
CLion 2022.2.4, Bundled cmake 3.23.3, Bundled lldb 14.0.6, Apple clang version 14.0.0 (clang-1400.0.29.102), macOS ventura 13.0.
Since I updated the system, the debugger does not hit breakpoints ...
0
votes
1
answer
76
views
How to tell which operand of logical operator was true/false?
Suppose we have following C++ code:
auto found = std::lower_bound(container.begin(), container.end(), val);
return found != container.begin() && found != container.end();
How can I tell from ...
0
votes
1
answer
47
views
lldb issue on mac with debugging a basic c program
I am trying to learn how to use a debugger and I am having some difficulty getting lldb to work properly. In particular, I was trying to follow along with the code the lldb wikipedia page for ...
0
votes
0
answers
72
views
vscode hover debugger reports "error: summary string parsing error" for std::vector variables
I am using vscode with clang-14.0 to compile and debug my c++ program on Ubuntu 18.04.
I try to inspect an std::vector variable when the program is catched at a breakpoint.
But then the hover debugger ...
1
vote
2
answers
57
views
Why is LLDB generating EXC_BAD_INSTRUCTION with user compiled library on MacOS?
I want to debug OpenSSL on MacOS to see how it creates an elliptic curve point. So, I compiled OpenSSL with debug symbols and no optimizations. However, when I run with lldb, it doesn't work
$ cat ec....
0
votes
0
answers
65
views
VSCode does not debug when using LLDB on Windows 10
I installed the LLDB extension in VSCode, but when I am trying to debug it just does not happen. Instead the program just executes.
My tasks.json:
{
"version": "2.0.0",
"tasks&...
0
votes
1
answer
57
views
is it possible 'catch syscall' in LLDB now?
Question has been asked before, but that was almost 8 years ago.
I was wondering if it's now possible.
1
vote
1
answer
48
views
How to break out of an assert in iOS / swift
I've hit an assertion in code and wondering if there's a way to create a wrapper around the assert that would enable breaking out and continuing execution or some other function that would enable a ...
-3
votes
1
answer
26
views
Is it possible to install third party packages for python bundled with lldb that comes with clion?
I am wondering if i can install things like numpy or cv2 for the python that is bundled with lldb.
0
votes
0
answers
49
views
Make LLDB break even if the exit code is 0
How do I make LLDB break when the program exits with 0?
The program exits with code 0 when the checksum doesn't match (I guess)
and I'm trying to find that checksum function.
I tried debugging it on ...
0
votes
1
answer
161
views
How do I inform lldb debugger where the source code is?
I have an executable that makes use of /usr/lib/libcrypto.0.9.8.dylib. I've (more or less) figured out some breakpoints within that library that I'd like to understand better.
However, I do not ...
0
votes
0
answers
27
views
Why are the high bits set to 1 in so much of what I see when inspecting random addresses in lldb?
I don't know how to use this tool very well, I was only ever a mediocre C programmer, and my knowledge of assembly stops right about at the 6502.
This is on a Mac, retail software, and it's a 32-bit ...
0
votes
0
answers
94
views
Can't launch lldb on windows, showing "Fatal Python error"
Can't launch lldb on windows.
Python already installed and added to path
Python version: 3.10.5
LLVM version: 14.0.0
Windows version: Windows 11 22H2
Outputs:
PS C:\Users\26354> lldb
Python path ...
0
votes
0
answers
24
views
How can I make the lldb debugger UI colorful?
Sometimes I use lldb debugger. And I want it to be colored. But I searched a lot on the internet and couldn't find a source on how to make it colored.
In lldb, the beginning part is colored, but when ...
0
votes
1
answer
63
views
Node.Js - Impossible to use lldb on m1
I'm trying to make a post-mortem debugging session for a Node.Js process.
Here is my modus operandi:
Run ulimit -c unlimited command
Run the command: node --abort-on-uncaught-exception crash.js
where ...
0
votes
1
answer
99
views
LLDB thinks function call is ambiguous, but it's not
I'm trying to debug a C++ program. I'm on macOS, using CLion IDE, clang compiler, LLDB. I stop the program at a breakpoint (marked with >>):
UnicodeString unicodeFromFile(const std::string &...
0
votes
1
answer
102
views
Printing `NSRect` argument passed to Cocoa method in lldb
In order to debug a macOS program I need to print the NSRect that is passed to -[NSView:setNeedsDisplayInRect:]. I can set a breakpoint in that method, but I have trouble printing its argument.
NSRect ...