[Bug 37190] New: 'memory read' reports 0s for unreadable memory on FreeBSD

Bug ID 37190
Summary ‘memory read’ reports 0s for unreadable memory on FreeBSD
Product lldb
Version unspecified
Hardware PC
OS Windows NT
Status NEW
Severity enhancement
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter emaste@freebsd.org
CC llvm-bugs@lists.llvm.org

ptrace returns an error but it's not propagated to the user:

(lldb) memory read -format hex -size 8 0
reebsd.operationptrace(PT_IO, 92788, 0x7fffdedfaed8, 0) called from file
/tank/emaste/src/git-stable-11/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
line 166
reebsd.operationPT_IO: op=READ_D offs=0 size=512
reebsd.operationptrace() failed; errno=14 (<unknown>)
0x00000000: 0x0000000000000000 0x0000000000000000
0x00000010: 0x0000000000000000 0x0000000000000000
0x00000020: 0x0000000000000000 0x0000000000000000
0x00000030: 0x0000000000000000 0x0000000000000000

I tried as far back as lldb37 and it fails there.

(For reference, "reebsd.operation" is the thread name - final 16 chars of
"lldb.process.freebsd.operation"; it seems "-n" mode is enabled by default in
"log enable posix all"?)

emaste@freebsd.org changed bug 37190