> Introduce a simple COREDUMP_MACHDEP_LWP_NOTES logic to provide machdep > API for injecting per-LWP notes into coredumps, and use it to append > PT_GETXSTATE note.
this macro is pretty gross. these are the problems i see: - assumes 'int error' - assumes 'struct lwp *l = curlwp' - assumes 'name' is something - assumes 'ns' is something - returns from macro all of those should be resolved. 4 are simple, they can be easy inputs. the return issue is more difficult, and perhaps should be revisited (ie, perhaps just skip over this entry instead of assuming return is right.) > Since the XSTATE block uses the same format on i386 and amd64, the code > does not have to conditionalize between 32-bit and 64-bit ELF format > on that. However, it does need to distinguish between 32-bit and 64-bit > PT_* values. In order to do that, it reuses PT32_* constant already > present for ptrace(), and adds a matching PT64_GETXSTATE to satisfy > the cpp logic. i don't understand why the need to include netbsd32 headers or define these separately. if the layout is the same, what's the benefit? we already know to assume 32 or 64 bit from the ELF core header, right? .mrg.