[Bug 25061] New: Thread doesn't contain the main stack frame

Bug ID 25061
Summary Thread doesn’t contain the main stack frame
Product lldb
Version 3.6
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter berykubik@gmail.com
CC llvm-bugs@lists.llvm.org
Classification Unclassified

When I access SBThread::frames or use "thread backtrace" in the lldb console,
the stack frame from main function is missing. In the given example, when I set
breakpoint in test, it shows only one stack frame in backtrace. In GDB, it
shows two (test + main). Is this the intended behaviour? How can I access all
the frames? I'm compiling the source with -g and -O0, I even tried
-fno-omit-frame-pointer, but it didn't help.


void test()
   // breakpoint here, bt shows only 1 frame

int main()
   return 0;