[Windows] Evaluating arguments gives incorrect values except for frame 0
| Bugzilla Link | 26265 |
| Version | unspecified |
| OS | Windows NT |
| Depends On | llvm/llvm-project#37006 |
| CC | @stella.stamenova |
Extended Description
TextConditionalBreak.py fails on Windows when trying to evaluate a function argument in frame 1.
Manual experiments indicates this is problem for arguments in any frame other than frame 0. This is observable in expression and backtraces.
(lldb) thread backtrace
- thread #1: tid = 0x1144, 0x0112b08a a.out`c(val=3) + 10 at main.c:39, stop reason = breakpoint 2.1
- frame #0: 0x0112b08a a.out
c(val=3) + 10 at main.c:39 frame #​1: 0x0112b03e a.outa(val=4586500) + 62 at main.c:27 frame #2: 0x0112b12b a.outmain(argc=0, argv=0x0045fc04) + 139 at main.c:50 frame #​3: 0x0112b88f a.out$LN27 + 224
- frame #0: 0x0112b08a a.out
Note that the correct value for val in frame #0 is correct (3), but incorrect in frame #1.
(lldb) thread step-out (lldb) Process 9808 stopped
- thread #1: tid = 0x1144, 0x0112b03e a.out
a(val=3) + 62 at main.c:27, stop reason = step out frame #​0: 0x0112b03e a.outa(val=3) + 62 at main.c:27 24 if (val <= 1) 25 return b(val); 26 else if (val >= 3) -> 27 return c(val); // Find the line number where c's parent frame is a here. 28 29 return val; 30 } thread back - thread #1: tid = 0x1144, 0x0112b03e a.out`a(val=3) + 62 at main.c:27, stop reason = step out
- frame #0: 0x0112b03e a.out
a(val=3) + 62 at main.c:27 frame #​1: 0x0112b12b a.outmain(argc=3, argv=0x00000003) + 139 at main.c:50 frame #2: 0x0112b88f a.out`$LN27 + 224
- frame #0: 0x0112b03e a.out
After stepping back out to what was frame #1, and val is now correctly shown.
mentioned in issue llvm/llvm-project#37006
TestTailCallFrameSBAPI.py TestSteppingOutWithArtificialFrames.py
are the only tests that are marked as failing because of this bug now. Considering that some of the tests are now passing, it is possible that they are failing because of something which is no longer the original bug.
TestTailCallFrameSBAPI and TestArtificialFrameThreadStepOut1 (from TestSteppingOutWithArtificialFrames) both fail because the previous frames retrieved with GetFrameAtIndex or GetSelectedFrame do not contain the correct information.