Page MenuHomeFreeBSD

libsysdecode; mktable fix vmresult table, enhance sigbuscode table
AbandonedPublic

Authored by bz on Mar 9 2018, 9:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 7, 11:19 AM
Unknown Object (File)
Mar 11 2024, 5:57 AM
Unknown Object (File)
Feb 12 2024, 3:45 AM
Unknown Object (File)
Jan 20 2024, 7:35 AM
Unknown Object (File)
Dec 20 2023, 7:48 AM
Unknown Object (File)
Nov 29 2023, 2:12 AM
Unknown Object (File)
Sep 25 2023, 4:11 PM
Unknown Object (File)
Sep 8 2023, 9:16 PM
Subscribers

Details

Reviewers
jhb
bdrewery
Summary

The vmresult table was missing most of the values apart from two due to extra "_" in the names we grep for. Add the "_" to the pattern.

On x86 various BUS_* values were missing as they are in the machine specific header. Enhance the gen_table() function to take multiple files to grep through and enhance the pattern to grep for for BUS_*.

Sponsored by: iXsystems, Inc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 15458

Event Timeline

lib/libsysdecode/mktables
130

So this isn't actually correct. The values in <machine/trap.h> are stale (and should probably be removed). The MI values in <sys/signal.h> are what the the actual code in sys/amd64/amd64/trap.c uses. I will just cleanup the garbage values from sys/x86/include/trap.h to avoid future confusion.

> grep 'ucode = ' amd64/amd64/trap.c i386/i386/trap.c 
amd64/amd64/trap.c:     ucode = 0;
amd64/amd64/trap.c:                     ucode = ILL_PRVOPC;
amd64/amd64/trap.c:                     ucode = (type == T_TRCTRAP ? TRAP_TRACE : TRAP_BRKPT);
amd64/amd64/trap.c:                     ucode = fputrap_x87();
amd64/amd64/trap.c:                     ucode = BUS_OBJERR;
amd64/amd64/trap.c:                     ucode = BUS_ADRERR;
amd64/amd64/trap.c:                     ucode = BUS_OBJERR;
amd64/amd64/trap.c:                     ucode = BUS_ADRALN;
amd64/amd64/trap.c:                     ucode = BUS_OBJERR;
amd64/amd64/trap.c:                             ucode = SEGV_MAPERR;
amd64/amd64/trap.c:                                     ucode = SEGV_ACCERR;
amd64/amd64/trap.c:                                     ucode = BUS_PAGE_FAULT;
amd64/amd64/trap.c:                             ucode = BUS_PAGE_FAULT;
amd64/amd64/trap.c:                             ucode = SEGV_ACCERR;
amd64/amd64/trap.c:                     ucode = FPE_INTDIV;
amd64/amd64/trap.c:                     ucode = FPE_INTOVF;
amd64/amd64/trap.c:                     ucode = FPE_FLTSUB;
amd64/amd64/trap.c:                     ucode = ILL_COPROC;
amd64/amd64/trap.c:                     ucode = fputrap_sse();
i386/i386/trap.c:       ucode = 0;
i386/i386/trap.c:                       ucode = ILL_PRVOPC;
i386/i386/trap.c:                       ucode = (type == T_TRCTRAP ? TRAP_TRACE : TRAP_BRKPT);
i386/i386/trap.c:                       ucode = npxtrap_x87();
i386/i386/trap.c:                       ucode = (type == T_PROTFLT) ? BUS_OBJERR : BUS_ADRERR;
i386/i386/trap.c:                       ucode = BUS_ADRERR;
i386/i386/trap.c:                       ucode = BUS_OBJERR;
i386/i386/trap.c:                       ucode = BUS_ADRALN;
i386/i386/trap.c:                       ucode = BUS_OBJERR;
i386/i386/trap.c:                               ucode = ILL_PRVOPC;
i386/i386/trap.c:                               ucode = SEGV_MAPERR;
i386/i386/trap.c:                                       ucode = SEGV_ACCERR;
i386/i386/trap.c:                                       ucode = BUS_PAGE_FAULT;
i386/i386/trap.c:                               ucode = BUS_PAGE_FAULT;
i386/i386/trap.c:                               ucode = SEGV_ACCERR;
i386/i386/trap.c:                       ucode = FPE_INTDIV;
i386/i386/trap.c:                       ucode = FPE_INTOVF;
i386/i386/trap.c:                       ucode = FPE_FLTSUB;
i386/i386/trap.c:                       ucode = 0;
i386/i386/trap.c:                       ucode = ILL_COPROC;
i386/i386/trap.c:                       ucode = npxtrap_sse();
151

This is ok.

bz marked 2 inline comments as done.Mar 12 2018, 1:30 PM

Thanks for the feedback; I'll get the one-liner in and leave the rest of the cleanup to you.

lib/libsysdecode/mktables
130

I see, I was working on 3rd party code which still did use:

grep -c BUS_PAGE_FAULT ../amd64/amd64/trap.c

2

Hmm, even on HEAD seems that one is still used. I'll leave the cleanup to you then.

bz marked an inline comment as done.