[Bug 17226] New: frame info lost after failed expression evaluation

Bug ID 17226
Summary frame info lost after failed expression evaluation
Product lldb
Version unspecified
Hardware PC
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@cs.uiuc.edu
Reporter emaste@freebsd.org
Classification Unclassified

emaste@freebsd.org changed bug 17226

What | Removed | Added |

Comment # 3 on bug 17226 from emaste@freebsd.org

It turns out this happens because FreeBSD does not allow user processes to
change PSL_RF via ptrace().  It seems the sequence of events is

1) breakpoint or exception
2) lldb checkpoints thread state - ptrace(..., PT_GETREGS) returns rflags with
PSL_RF set
3) expression is JITted and executed, leaving PSL_RF cleared in kernel thread
4) lldb tries to restore checkpointed thread state via PT_SETREGS
5) ptrace() returns EINVAL due to attempt to change PSL_RF