Re: svn commit: r292236 - in head: contrib/mdocml lib lib/libc/sys lib/libsysdecode share/mk usr.bin/kdump usr.bin/truss

2015-12-15 Thread Roman Divacky
On Tue, Dec 15, 2015 at 12:05:07AM +, John Baldwin wrote:
> Author: jhb
> Date: Tue Dec 15 00:05:07 2015
> New Revision: 292236
> URL: https://svnweb.freebsd.org/changeset/base/292236
> 
> Log:
>   Start on a new library (libsysdecode) that provides routines for decoding
>   system call information such as system call arguments.  Initially this
>   will consist of pulling duplicated code out of truss and kdump though it
>   may prove useful for other utilities in the future.
>   
>   This commit moves the shared utrace(2) record parser out of kdump into
>   the library and updates kdump and truss to use it.  One difference from
>   the previous version is that the library version treats unknown events
>   that start with the "RTLD" signature as unknown events.  This simplifies
>   the interface and allows the consumer to decide how to handle all
>   non-recognized events.  Instead, this function only generates a string
>   description for known malloc() and RTLD records.
>   
>   Reviewed by:bdrewery
>   Differential Revision:  https://reviews.freebsd.org/D4537
> 
> Added:
>   head/lib/libsysdecode/
>   head/lib/libsysdecode/Makefile   (contents, props changed)
>   head/lib/libsysdecode/sysdecode.3   (contents, props changed)
>   head/lib/libsysdecode/sysdecode.h   (contents, props changed)
>   head/lib/libsysdecode/sysdecode_utrace.3   (contents, props changed)
>   head/lib/libsysdecode/utrace.c
>  - copied, changed from r292235, head/usr.bin/kdump/utrace.c
> Deleted:
>   head/usr.bin/kdump/utrace.c
> Modified:
>   head/contrib/mdocml/lib.in
>   head/lib/Makefile
>   head/lib/libc/sys/utrace.2
>   head/share/mk/bsd.libnames.mk
>   head/share/mk/src.libnames.mk
>   head/usr.bin/kdump/Makefile
>   head/usr.bin/kdump/Makefile.depend
>   head/usr.bin/kdump/kdump.c
>   head/usr.bin/truss/Makefile
>   head/usr.bin/truss/Makefile.depend.amd64
>   head/usr.bin/truss/syscalls.c
> 
> Modified: head/contrib/mdocml/lib.in
> ==
> --- head/contrib/mdocml/lib.inMon Dec 14 23:25:31 2015
> (r292235)
> +++ head/contrib/mdocml/lib.inTue Dec 15 00:05:07 2015
> (r292236)
> @@ -110,6 +110,7 @@ LINE("libsdp","Bluetooth Service Disco
>  LINE("libssp",   "Buffer Overflow Protection Library (libssp, 
> \\-lssp)")
>  LINE("libstdthreads","C11 Threads Library (libstdthreads, 
> \\-lstdthreads)")
>  LINE("libSystem","System Library (libSystem, \\-lSystem)")
> +LINE("libsysdcode",  "System Argument Decoding Library (libsysdecode, 
> \\-lsysdecode)")

Is this a typo?
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r292236 - in head: contrib/mdocml lib lib/libc/sys lib/libsysdecode share/mk usr.bin/kdump usr.bin/truss

2015-12-15 Thread Christian Brueffer
On 2015-12-15 10:56, Roman Divacky wrote:
> On Tue, Dec 15, 2015 at 12:05:07AM +, John Baldwin wrote:
>> Author: jhb
>> Date: Tue Dec 15 00:05:07 2015
>> New Revision: 292236
>> URL: https://svnweb.freebsd.org/changeset/base/292236
>>
>> Log:
>>   Start on a new library (libsysdecode) that provides routines for decoding
>>   system call information such as system call arguments.  Initially this
>>   will consist of pulling duplicated code out of truss and kdump though it
>>   may prove useful for other utilities in the future.
>>   
>>   This commit moves the shared utrace(2) record parser out of kdump into
>>   the library and updates kdump and truss to use it.  One difference from
>>   the previous version is that the library version treats unknown events
>>   that start with the "RTLD" signature as unknown events.  This simplifies
>>   the interface and allows the consumer to decide how to handle all
>>   non-recognized events.  Instead, this function only generates a string
>>   description for known malloc() and RTLD records.
>>   
>>   Reviewed by:   bdrewery
>>   Differential Revision: https://reviews.freebsd.org/D4537
>>
>> Added:
>>   head/lib/libsysdecode/
>>   head/lib/libsysdecode/Makefile   (contents, props changed)
>>   head/lib/libsysdecode/sysdecode.3   (contents, props changed)
>>   head/lib/libsysdecode/sysdecode.h   (contents, props changed)
>>   head/lib/libsysdecode/sysdecode_utrace.3   (contents, props changed)
>>   head/lib/libsysdecode/utrace.c
>>  - copied, changed from r292235, head/usr.bin/kdump/utrace.c
>> Deleted:
>>   head/usr.bin/kdump/utrace.c
>> Modified:
>>   head/contrib/mdocml/lib.in
>>   head/lib/Makefile
>>   head/lib/libc/sys/utrace.2
>>   head/share/mk/bsd.libnames.mk
>>   head/share/mk/src.libnames.mk
>>   head/usr.bin/kdump/Makefile
>>   head/usr.bin/kdump/Makefile.depend
>>   head/usr.bin/kdump/kdump.c
>>   head/usr.bin/truss/Makefile
>>   head/usr.bin/truss/Makefile.depend.amd64
>>   head/usr.bin/truss/syscalls.c
>>
>> Modified: head/contrib/mdocml/lib.in
>> ==
>> --- head/contrib/mdocml/lib.in   Mon Dec 14 23:25:31 2015
>> (r292235)
>> +++ head/contrib/mdocml/lib.in   Tue Dec 15 00:05:07 2015
>> (r292236)
>> @@ -110,6 +110,7 @@ LINE("libsdp",   "Bluetooth Service Disco
>>  LINE("libssp",  "Buffer Overflow Protection Library (libssp, 
>> \\-lssp)")
>>  LINE("libstdthreads",   "C11 Threads Library (libstdthreads, 
>> \\-lstdthreads)")
>>  LINE("libSystem",   "System Library (libSystem, \\-lSystem)")
>> +LINE("libsysdcode", "System Argument Decoding Library (libsysdecode, 
>> \\-lsysdecode)")
> 
> Is this a typo?
> 

It is; fixed in r292257.

Good spotting!

Chris
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292236 - in head: contrib/mdocml lib lib/libc/sys lib/libsysdecode share/mk usr.bin/kdump usr.bin/truss

2015-12-14 Thread John Baldwin
Author: jhb
Date: Tue Dec 15 00:05:07 2015
New Revision: 292236
URL: https://svnweb.freebsd.org/changeset/base/292236

Log:
  Start on a new library (libsysdecode) that provides routines for decoding
  system call information such as system call arguments.  Initially this
  will consist of pulling duplicated code out of truss and kdump though it
  may prove useful for other utilities in the future.
  
  This commit moves the shared utrace(2) record parser out of kdump into
  the library and updates kdump and truss to use it.  One difference from
  the previous version is that the library version treats unknown events
  that start with the "RTLD" signature as unknown events.  This simplifies
  the interface and allows the consumer to decide how to handle all
  non-recognized events.  Instead, this function only generates a string
  description for known malloc() and RTLD records.
  
  Reviewed by:  bdrewery
  Differential Revision:https://reviews.freebsd.org/D4537

Added:
  head/lib/libsysdecode/
  head/lib/libsysdecode/Makefile   (contents, props changed)
  head/lib/libsysdecode/sysdecode.3   (contents, props changed)
  head/lib/libsysdecode/sysdecode.h   (contents, props changed)
  head/lib/libsysdecode/sysdecode_utrace.3   (contents, props changed)
  head/lib/libsysdecode/utrace.c
 - copied, changed from r292235, head/usr.bin/kdump/utrace.c
Deleted:
  head/usr.bin/kdump/utrace.c
Modified:
  head/contrib/mdocml/lib.in
  head/lib/Makefile
  head/lib/libc/sys/utrace.2
  head/share/mk/bsd.libnames.mk
  head/share/mk/src.libnames.mk
  head/usr.bin/kdump/Makefile
  head/usr.bin/kdump/Makefile.depend
  head/usr.bin/kdump/kdump.c
  head/usr.bin/truss/Makefile
  head/usr.bin/truss/Makefile.depend.amd64
  head/usr.bin/truss/syscalls.c

Modified: head/contrib/mdocml/lib.in
==
--- head/contrib/mdocml/lib.in  Mon Dec 14 23:25:31 2015(r292235)
+++ head/contrib/mdocml/lib.in  Tue Dec 15 00:05:07 2015(r292236)
@@ -110,6 +110,7 @@ LINE("libsdp",  "Bluetooth Service Disco
 LINE("libssp", "Buffer Overflow Protection Library (libssp, \\-lssp)")
 LINE("libstdthreads",  "C11 Threads Library (libstdthreads, \\-lstdthreads)")
 LINE("libSystem",  "System Library (libSystem, \\-lSystem)")
+LINE("libsysdcode","System Argument Decoding Library (libsysdecode, 
\\-lsysdecode)")
 LINE("libtacplus", "TACACS+ Client Library (libtacplus, \\-ltacplus)")
 LINE("libtcplay",  "TrueCrypt-compatible API library (libtcplay, 
\\-ltcplay)")
 LINE("libtermcap", "Termcap Access Library (libtermcap, \\-ltermcap)")

Modified: head/lib/Makefile
==
--- head/lib/Makefile   Mon Dec 14 23:25:31 2015(r292235)
+++ head/lib/Makefile   Tue Dec 15 00:05:07 2015(r292236)
@@ -98,6 +98,7 @@ SUBDIR=   ${SUBDIR_ORDERED} \
libstand \
libstdbuf \
libstdthreads \
+   libsysdecode \
libtacplus \
${_libtelnet} \
${_libthr} \

Modified: head/lib/libc/sys/utrace.2
==
--- head/lib/libc/sys/utrace.2  Mon Dec 14 23:25:31 2015(r292235)
+++ head/lib/libc/sys/utrace.2  Tue Dec 15 00:05:07 2015(r292236)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 5, 2015
+.Dd December 11, 2015
 .Dt UTRACE 2
 .Os
 .Sh NAME
@@ -71,7 +71,8 @@ support
 .Xr kdump 1 ,
 .Xr ktrace 1 ,
 .Xr ktrace 2 ,
-.Xr truss 1
+.Xr truss 1 ,
+.Xr sysdecode_utrace 3
 .Sh HISTORY
 The
 .Fn utrace

Added: head/lib/libsysdecode/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libsysdecode/Makefile  Tue Dec 15 00:05:07 2015
(r292236)
@@ -0,0 +1,13 @@
+# $FreeBSD$
+
+.include 
+
+LIB=   sysdecode
+
+SRCS=  utrace.c
+INCS=  sysdecode.h
+
+MAN+=  sysdecode.3 \
+   sysdecode_utrace.3
+
+.include 

Added: head/lib/libsysdecode/sysdecode.3
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libsysdecode/sysdecode.3   Tue Dec 15 00:05:07 2015
(r292236)
@@ -0,0 +1,47 @@
+.\"
+.\" Copyright (c) 2015 John Baldwin 
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS