[lldb] Introduce i386 support in NetBSD Process plugin

Authored by mgorny on Jan 12 2020, 1:49 PM.


[lldb] Introduce i386 support in NetBSD Process plugin

Introduce support for i386 platform that is shared with amd64
in the same plugin. The concept is partially based on the Linux

The plugin tries to reuse as much code as possible. As a result, i386
register enums are mapped into amd64 values and those are used in actual
code. The code for accessing FPU and debug registers is shared,
although general-purpose register layouts do not match between the two
kernel APIs and need to be #ifdef-ed.

This layout will also make it possible to add support for debugging
32-bit programs on amd64 with minimal added code.

In order for this to work, I had to add missing data for debug registers
on i386.

Differential Revision: https://reviews.llvm.org/D73802