Let us say that I have a function in a C program test.c
like this:
#include <stdio.h>
char* foo = "test";
void print_foo(void)
{
printf("%s", foo);
}
main() { }
I compile and run test.c
like this:
gcc -g -o test test.c
chmod 755 test && lldb -s <(echo "b main\nr") test
However, if I then run expr print_foo()
no string output occurs:
(lldb) expr print_foo()
(lldb)