Issue 176738
Summary [lldb][windows] hidden frames do not work
Labels new issue
Assignees
Reporter charles-zablit
    The backtrace of the following program is not the same on POSIX and Windows platforms:

```cpp
#include <functional>
#include <iostream>

static void target() {
  int a = 0; // break here
}

int main() {
  std::function<void()> fn = [] { target(); };
  fn();
  return 0;
}
```

On POSIX:

```
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x0000000100001460 skipped_frames`target() at skipped_frames.cpp:5:7
 frame #1: 0x0000000100001450 skipped_frames`main::$_0::operator()(this=0x000000016fdfe940) const at skipped_frames.cpp:9:35
    frame #8: 0x000000010000062c skipped_frames`std::__1::function<void ()>::operator()(this= Lambda in File skipped_frames.cpp at Line 9) const at function.h:995:10
    frame #9: 0x000000010000056c skipped_frames`main at skipped_frames.cpp:10:3
    frame #10: 0x000000018cc41d54 dyld`start + 7184
```

On Windows:
```
* thread #1, stop reason = breakpoint 1.1
  * frame #0: 0x00007ff7f3c37811 hidden_frames.exe`static void target() at hidden_frames.cpp:5
    frame #1: 0x00007ff7f3c377fe hidden_frames.exe`static void main::<lambda_0>::operator(this=<unavailable>)() at hidden_frames.cpp:9
 frame #2: 0x00007ff7f3c377e3 hidden_frames.exe`main at type_traits:1670
 frame #3: 0x00007ff7f3c37727 hidden_frames.exe`static void std::_Func_impl_no_alloc<`lambda at .\hidden_frames.cpp:9:30',void>::_Do_call(this=0x00000014257cfbb0) at functional:880
    frame #4: 0x00007ff7f3c3791d hidden_frames.exe`public: void __cdecl std::_Func_class<void>::operator(this=0x00000014257cfbb0)(void)const  at functional:926
    frame #5: 0x00007ff7f3c37559 hidden_frames.exe`main at hidden_frames.cpp:10
    frame #6: 0x00007ff7f3c3a82c hidden_frames.exe`static int __scrt_common_main_seh() at exe_common.inl:288
 frame #7: 0x00007ffd00fee8d7 kernel32.dll`BaseThreadInitThunk + 23
 frame #8: 0x00007ffd02a4c53c ntdll.dll`RtlUserThreadStart + 44
```

On Windows, none of the frames are hidden.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to