Posts

Showing posts with the label lldb

lldb cannot lookup symbol in imported dylib

Image
Clash Royale CLAN TAG #URR8PPP lldb cannot lookup symbol in imported dylib I am debugging a C program on arm64 with lldb and in order to implement my own debugging function I wrote a standalone debug helper program, compiled it as a dylib and imported it into lldb by using: (lldb) target modules add debugHelper.dylib (lldb) target modules add debugHelper.dylib However when I call the function declared in the dylib, lldb errors: (lldb) expression debugPrint() error: Couldn't lookup symbols: _debugPrint If I type in a random function name (e.g. foo): (lldb) expression foo() error: use of undeclared identifier 'foo' , which makes me believe importing the dylib is indeed successful, since debugPrint is not an undeclared identifier . debugPrint undeclared identifier // debugHelper.c #include <stdio.h> int debugPrint() { printf("%sn", "Debug info printed! n"); return 0; } debugHelper.dylib is compiled with: $ xcrun --sdk iphoneos cc debugHelpe...