summaryrefslogtreecommitdiff
path: root/lib/libsysdecode
Commit message (Collapse)AuthorAgeFilesLines
* libsysdecode: decode _UMTX_OP flagsKyle Evans2020-12-093-1/+17
| | | | | | | | | | | | Assume that UMTX_OP with a double underbar following is a flag, while any underbar+alphanumeric combination immeiately following is an op. This was a part of D27325. Reviewed by: kib Notes: svn path=/head/; revision=368480
* libsysdecode: account for invalid protection flagsPawel Biernacki2020-11-261-1/+1
| | | | | | | | Reported by: jhb MFC with: r368022 Notes: svn path=/head/; revision=368053
* libsysdecode: correctly decode mmap flagsPawel Biernacki2020-11-251-1/+1
| | | | | | | | | | | | | | r352913 added decoding of mmap PROT_MAX()'d flags but didn’t account for the case where different values were specified for PROT_MAX and regular flags. Fix it. Submitted by: sigsys_gmail.com Reported by: sigsys_gmail.com MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D27312 Notes: svn path=/head/; revision=368022
* Make linux_errtbl[] static.Edward Tomasz Napierala2020-11-031-1/+0
| | | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27004 Notes: svn path=/head/; revision=367301
* Add defines for Linux errno values and use them to make linux_errtbl[]Edward Tomasz Napierala2020-10-291-0/+1
| | | | | | | | | | | | | more readable. While here, add linux_check_errtbl() function to make sure we don't leave holes. No objections: emaste (earlier version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26972 Notes: svn path=/head/; revision=367132
* Fix a few mandoc issuesGordon Bergling2020-10-091-3/+3
| | | | | | | | | | - skipping paragraph macro: Pp after Sh - sections out of conventional order: Sh EXAMPLES - whitespace at end of input line - normalizing date format Notes: svn path=/head/; revision=366583
* Fix compilation of libsysdecode after r365522, should have been part of it.Konstantin Belousov2020-09-091-0/+1
| | | | | | | | | | | Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652 Notes: svn path=/head/; revision=365523
* Add MSG_TLSAPPDATA to lib/libsysdecode/mktables.Rick Macklem2020-08-201-1/+1
| | | | | | | | | I have no idea what this does (and until now that it even existed), but apparently it needs this entry changed for the MSG_TLSAPPDATA, since it is kernel only. Notes: svn path=/head/; revision=364415
* Retire procfs-based process debugging.John Baldwin2020-04-011-5/+0
| | | | | | | | | | | | | | | | | | Modern debuggers and process tracers use ptrace() rather than procfs for debugging. ptrace() has a supserset of functionality available via procfs and new debugging features are only added to ptrace(). While the two debugging services share some fields in struct proc, they each use dedicated fields and separate code. This results in extra complexity to support a feature that hasn't been enabled in the default install for several years. PR: 244939 (exp-run) Reviewed by: kib, mjg (earlier version) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D23837 Notes: svn path=/head/; revision=359530
* Fix the workaround to ignore the #warning for GCC.John Baldwin2020-03-171-3/+5
| | | | | | | | | | | clang and gcc use different warning flags for #warning preprocessor directives. Reported by: Jenkins MFC after: 1 week Notes: svn path=/head/; revision=359054
* Mark procfs-based process debugging as deprecated for FreeBSD 13.John Baldwin2020-03-171-0/+3
| | | | | | | | | | | | | | Attempting to use ioctls on /proc/<pid>/mem to control a process will trigger warnings on the console. The <sys/pioctl.h> include file will also now emit a compile-time warning when used from userland. Reviewed by: emaste MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D23822 Notes: svn path=/head/; revision=359047
* libsysdecode: grab shmflags from sys/mman.h, add decode methodKyle Evans2020-02-193-0/+9
| | | | | | | | | | | | Any SHM_* flag here is (and likely will continue to be) a shmflag that may be passed to shm_open2(), with exception to SHM_ANON. This is a prereq to adding appropriate support to truss/kdump. Reviewed by: kaktus (slightly earlier version) Differential Revision: https://reviews.freebsd.org/D23733 Notes: svn path=/head/; revision=358115
* Update libssp paths in various Makefile.depend* filesKyle Evans2020-01-061-1/+1
| | | | | | | | | I've been advised that the model that uses these are fairly resilient, but we do know the proper path to use (or remove, in the case of ^/targets/...), so go ahead and update them to reflect that. Notes: svn path=/head/; revision=356422
* Update Makefile.depend filesSimon J. Gerraty2019-12-111-4/+9
| | | | | | | | | | | | | Update a bunch of Makefile.depend files as a result of adding Makefile.depend.options files Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22494 Notes: svn path=/head/; revision=355617
* libsysdecode: decode PROT_MAX flagsPawel Biernacki2019-09-301-1/+11
| | | | | | | | | | | | | | | | | | | | | | | Extend libsysdecode to pretty-print PROT_MAX flags and fix decoding of regular protection flags broken since r349240. before: truss: mmap(0x0,40960,0x30000,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34366234624 (0x800632000) kdump: 11439 protmax CALL mmap(0,0xa000,0x30000<><invalid>196608,0x21002<MAP_PRIVATE|MAP_ANON|MAP_NOCORE>,0xffffffff,0) after: truss: mmap(0x0,40960,PROT_MAX(PROT_READ|PROT_WRITE)|PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34366234624 (0x800632000) kdump: 11439 protmax CALL mmap(0,0xa000,0x30000<PROT_MAX(PROT_READ|PROT_WRITE)|PROT_READ|PROT_WRITE>,0x21002<MAP_PRIVATE|MAP_ANON|MAP_NOCORE>,0xffffffff,0) Reviewed by: kib (mentor) Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D21706 Notes: svn path=/head/; revision=352913
* pkgbase: Create a FreeBSD-utilities package and make it the default oneEmmanuel Vadot2019-09-051-1/+0
| | | | | | | | | | | | | The default package use to be FreeBSD-runtime but it should only contain binaries and libs enough to boot to single user and repair the system, it is also very handy to have a package that can be tranform to a small mfsroot. So create a new package named FreeBSD-utilities and make it the default one. Also move a few binaries and lib into this package when it make sense. Reviewed by: bapt, gjb Differential Revision: https://reviews.freebsd.org/D21506 Notes: svn path=/head/; revision=351858
* Rework r339635 to fix .depend.tables.h handling.Bryan Drewery2019-08-162-12/+18
| | | | | | | | | | | | | | | | | Avoid touching the tables.h file unless it has changed to avoid unneeded rebuilds. Also revert r350301's explicit dependencies. Reviewed by: emaste MFC after: 2 weeks X-MFC-With: r339635 (kevans request) PR: 238828 Sponsored by: DellEMC Differential Revision: https://reviews.freebsd.org/D21295 Notes: svn path=/head/; revision=351151
* libsysdecode: use the proper include directoryEd Maste2019-07-251-3/+4
| | | | | | | | | | Reported by: cy Reviewed by: lwhsu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21068 Notes: svn path=/head/; revision=350327
* libsysdecode: add explicit dependencies on recently changed headersEd Maste2019-07-241-1/+2
| | | | | | | | | | | | | | r349369 removed IP_MIN_MEMBERSHIPS and IPV6_MIN_MEMBERSHIPS, and r349893 removed TCP_RACK_SESS_CWV. libsysdecode lacked dependencies to trigger a rebuild of tables.h. Add explicit dependencies as a workaround to address these specific cases; a holistic solution is still needed. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=350301
* Drop "All rights reserved" from my copyright statements.John Baldwin2019-03-0618-18/+0
| | | | | | | | | Reviewed by: rgrimes MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D19485 Notes: svn path=/head/; revision=344855
* Add missing SCTP_EOR entry.Michael Tuexen2019-02-041-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=343742
* Fix regex for extracting SHM_* values for libsysdecodeAlex Richardson2018-10-232-3/+4
| | | | | | | | | | | | | | | | | There was an additional + after the {6} which is apparently ignored by the FreeBSD regex implementation but was giving me an error when compiling on MacOS. While changing this also make sure that tables.h is not created if mktables fails. The current rule would create a partial tables.h which causes following incremental builds to use that broken file and fail with an unrelated compilation error or even succeed even though they shouldn't. Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D17069 Notes: svn path=/head/; revision=339635
* Don't rebuild ioctl.c and relink libsysdecode if there are no changesAlex Richardson2018-08-201-2/+7
| | | | | | | | | | Instead generate a temporary file and only overwrite ioctl.c if the files are actually different. Approved By: jhb (mentor) Notes: svn path=/head/; revision=338099
* Make mkioctls script work on Linux and MacOSAlex Richardson2018-08-201-3/+14
| | | | | | | | | | | | | | Using find -s will not work with the Linux or MacOS find command. We pipe to sort instead since the only real requirement here is that the order stays the same. While I am touching this file I also fixed a `==` construct which is not supported by POSIX sh but appears to work on FreeBSD. Reviewed By: imp Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D14246 Notes: svn path=/head/; revision=338095
* Retire lmc(4)Ed Maste2018-05-011-3/+0
| | | | | | | | | | | | | | This driver supports legacy, 32-bit PCI devices, and had an ambiguous license. Supported devices were already reported to be rare in 2003 (when an earlier version of the driver was removed in r123201). Reviewed by: rgrimes Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D15245 Notes: svn path=/head/; revision=333144
* libsysdecode: support errno and syscalls for arm64 LinuxEd Maste2018-04-263-8/+10
| | | | | | | Sponsored by: Turing Robotic Industries Inc. Notes: svn path=/head/; revision=333029
* Share Linux errno table with libsysdecodeEd Maste2018-03-221-22/+5
| | | | | | | | | Requested by: jhb Reviewed by: jhb Sponsored by: Turing Robotic Industries Inc. Notes: svn path=/head/; revision=331356
* Chase r331057 in libsysdecode erno tableEd Maste2018-03-161-3/+3
| | | | Notes: svn path=/head/; revision=331060
* The vmresult table was missing most of the values apart from two due toBjoern A. Zeeb2018-03-121-1/+1
| | | | | | | | | | | extra "_" in the names we grep for. Add the "_" to the pattern. Reviewed by: jhb MFC after: 3 days Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=330795
* Bump date, which I missed in r328014. Thanks to jhb@ for reporting.Michael Tuexen2018-01-151-1/+1
| | | | Notes: svn path=/head/; revision=328033
* Add support for decoding the nxt_flags, rcv_flags, and snd_flags ofMichael Tuexen2018-01-154-0/+64
| | | | | | | SCTP level cmsgs. Notes: svn path=/head/; revision=328014
* Add support for decoding the type of a cmsg.Michael Tuexen2018-01-156-0/+98
| | | | Notes: svn path=/head/; revision=327995
* Simplify table generation.Michael Tuexen2018-01-151-1/+1
| | | | Notes: svn path=/head/; revision=327994
* Add a function is decode the sinfo_flags of struct sctp_sndrcvinfo.Michael Tuexen2018-01-146-1/+88
| | | | Notes: svn path=/head/; revision=327966
* Add suppor for the supported PR-SCTP policies.Michael Tuexen2018-01-145-1/+16
| | | | Notes: svn path=/head/; revision=327962
* libsysdecode: Add a new ABI type, SYSDECODE_ABI_CLOUDABI32.Ed Schouten2017-12-164-13/+15
| | | | | | | | | | | | | | | | | | In order to let truss(8) support tracing of 32-bit CloudABI applications, we need to add a new ABI type to libsysdecode. We can reuse the existing errno mapping table. Also link in the cloudabi32 system call table to translate system call names. While there, remove all of the architecture ifdefs. There are not needed, as the CloudABI data types and system call tables build fine on any architecture. Building this unconditionally will make it easier to do tracing for different compat modes, emulation, etc. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D13516 Notes: svn path=/head/; revision=326910
* Sync bsd_to_linux_errno[] table with i386 and amd64 tables in the sys directory.Fedor Uporov2017-11-281-1/+1
| | | | | | | | | | Additional fix for r326282. MFC after: 1 week Approved by: pfg Notes: svn path=/head/; revision=326317
* Decode kevent structures logged via ktrace(2) in kdump.John Baldwin2017-11-256-1/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add a new KTR_STRUCT_ARRAY ktrace record type which dumps an array of structures. The structure name in the record payload is preceded by a size_t containing the size of the individual structures. Use this to replace the previous code that dumped the kevent arrays dumped for kevent(). kdump is now able to decode the kevent structures rather than dumping their contents via a hexdump. One change from before is that the 'changes' and 'events' arrays are not marked with separate 'read' and 'write' annotations in kdump output. Instead, the first array is the 'changes' array, and the second array (only present if kevent doesn't fail with an error) is the 'events' array. For kevent(), empty arrays are denoted by an entry with an array containing zero entries rather than no record. - Move kevent decoding tables from truss to libsysdecode. This adds three new functions to decode members of struct kevent: sysdecode_kevent_filter, sysdecode_kevent_flags, and sysdecode_kevent_fflags. kdump uses these helper functions to pretty-print kevent fields. - Move structure definitions for freebsd11 and freebsd32 kevent structures to <sys/event.h> so that they can be shared with userland. The 32-bit structures are only exposed if _WANT_KEVENT32 is defined. The freebsd11 structures are only exposed if _WANT_FREEBSD11_KEVENT is defined. The 32-bit freebsd11 structure requires both. - Decode freebsd11 kevent structures in truss for the compat11.kevent() system call. - Log 32-bit kevent structures via ktrace for 32-bit compat kevent() system calls. - While here, constify the 'void *data' argument to ktrstruct(). Reviewed by: kib (earlier version) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D12470 Notes: svn path=/head/; revision=326184
* Add stdio.h to the synopsis for sysdecode functions that take a FILE *.John Baldwin2017-11-255-5/+10
| | | | Notes: svn path=/head/; revision=326183
* Wrap to 80 columns. No functional change.John Baldwin2017-11-071-2/+4
| | | | Notes: svn path=/head/; revision=325519
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-2/+1
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* RB_POWERCYCLE needs to be handled like RB_POWEROFF for decoding.Warner Losh2017-10-251-2/+2
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=324984
* libsysdecode: report invalid cap_rights_tEd Maste2017-09-171-0/+7
| | | | | | | | | | | | | | | Previously we'd have an assertion failure in cap_rights_is_set if sysdecode_cap_rights is called with an invalid cap_rights_t, so test for validity first. PR: 222258 Reviewed by: cem MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12391 Notes: svn path=/head/; revision=323675
* Decode pathconf() names, *at() flags, and sysarch() numbers in libsysdecode.John Baldwin2017-09-046-2/+49
| | | | | | | | | | Move tables that were previously in truss over to libsysdecode. truss output is unchanged, but kdump has been updated to decode these fields. In addition, sysdecode_sysarch_number() should support all platforms whereas the old table in truss only supported x86. Notes: svn path=/head/; revision=323151
* Handle WITH/WITHOUT_PF in libsysdecodeKristof Provost2017-07-222-2/+8
| | | | | | | | | | | Only filter out the PF ioctls if we're building without pf support. Until now those were always filtered out, so truss did not show symbolic names for pf ioctls. Differential Revision: https://reviews.freebsd.org/D11629 Notes: svn path=/head/; revision=321370
* Remove special handling for 'disk*.h'John Baldwin2017-07-181-3/+1
| | | | | | | | | | | This was originally added so that only one of diskmbr.h or diskpc98.h was chosen and is no longer needed after PC98's removal. However, the special handling was also broken as it effectively prevented the decoding of ioctls declared in other headers such as <sys/disk.h> or <sys/disklabel.h>. Notes: svn path=/head/; revision=321176
* DIRDEPS_BUILD: Connect more libraries.Bryan Drewery2017-07-111-0/+2
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=320884
* Tweak r320206: Still create the TABLE but not the .depend entry for missing ↵Bryan Drewery2017-06-211-9/+10
| | | | | | | | | | | headers. X-MFC-With: r320206 MFC after: 3 days Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=320207
* Follow-up r308602: Don't add missing headers to .depend.tables.h.Bryan Drewery2017-06-211-0/+1
| | | | | | | | | | | | | | | This also avoids an error from egrep when a header is missing. This can happen with something like WITHOUT_BLUETOOTH set when searching for $include_dir/netgraph/bluetooth/include/ng_btsocket.h. The warning was not an error (from set -e) due to being on the left side of a pipe. Now the all_headers list is only filled with existing headers. Reviewed by: ngie MFC after: 3 days Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=320206
* Utilize SYSROOT from r320119 in places where DESTDIR may be wanting WORLDTMP.Bryan Drewery2017-06-191-2/+2
| | | | | | | | | | | | | | Since buildenv exports SYSROOT all of these uses will now look in WORLDTMP by default. sys/boot/efi/loader/Makefile A LIBSTAND hack is no longer required for buildenv. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=320122