Aprilis LLDB/NetBSD

-- Subject: Aprilis LLDB/NetBSD

> Hello,
> I've dropped few paragraphs on the NetBSD status:
> https://blog.netbsd.org/tnf/entry/netbsd_the_first_bsd_introducing
> I'm going to focus on the following tasks till Easter holidays
> * watchpoints support,
> * floating point registers support,
> * enhance core(5) and make it work for multiple threads
> * introduce PT_SETSTEP and PT_CLEARSTEP in ptrace(2)
> * research F_GETPATH in fcntl(2)
> On the second half of this month I will move on to:
> * support threads in the NetBSD Process Plugin
> Upstream LLVM+Clang+LLDB version r. 299109 (no local patches) verification*=
> :
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Test Result Summary
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Test Methods: 1247
> Reruns: 0
> Success: 622
> Expected Failure: 23
> Failure: 79
> Error: 97
> Exceptional Exit: 0
> Unexpected Success: 1
> Skip: 424
> Timeout: 1
> Expected Timeout: 0
> http://netbsd.org/~kamil/lldb/check-lldb-r299109-2017-04-04.txt
> * I'm still using pkgsrc-wip and it might affect the score compared to
> clean out of pkgsrc build.

What enhancements do we need for the core format?

Currently there is nothing planned on the base system side. All the
enhancements are to be done on the LLDB side.

Our core-dump files contain notes like: "NetBSD-CORE@1". This "1" is LWP
and it must be properly handled in LLDB to define a thread. Currently
LLDB just recognizes NetBSD-CORE files and "NetBSD-CORE" notes. It needs
now to instantiate appropriate threads.

On the other hand I've studied inspiring articles like:
"FreeBSD Userspace Coredumps"

Presenting a list of improvements for the NetBSD system is currently
premature for me as I need to study up more on the topic. It appears
also beyond the tasks related to LLDB.

In other words we seem to be good enough to get all the needed things done.

Sounds good, do you have the PT_{G,S}ETSTEP functional description somewhere?

PT_SETSTEP This request will turn on single stepping of the specified

PT_CLEARSTEP This request will turn off single stepping of the specified

In NetBSD case:
ptrace(PT_SETSTEP, pid, NULL, lwp);
ptrace(PT_CLEARSTEP, pid, NULL, lwp);

I'm going to cleanup it and send for review.