Index | Thread | Search

From:
Jason McIntyre <jmc@kerhand.co.uk>
Subject:
Re: btrace(1): fix -e and filename args
To:
tech@openbsd.org
Date:
Sat, 17 May 2025 06:44:53 +0100

Download raw body.

Thread
On Sat, May 17, 2025 at 05:00:50AM +0200, Rafael Sadowski wrote:
> btrace(1) does not accept "-e file" Instead, it depends on filename as
> the last parameter if no -b inline-script is specified. I also improved
> the definition of "program".
> 

hi!

- is there a reason for changing "file" to "filename"? "file" is
  probably more common - if you keep it you can simply do "Op Ar".

- you need to sync usage()

- what does "argument ..." represent? i mean, what arguments can be
  passed? i know its not part of your diff, but i want to make sure that
  it's not also meant to represent "file".

jmc

> diff --git a/usr.sbin/btrace/btrace.8 b/usr.sbin/btrace/btrace.8
> index b233465185a..0ebd6eff061 100644
> --- a/usr.sbin/btrace/btrace.8
> +++ b/usr.sbin/btrace/btrace.8
> @@ -23,9 +23,10 @@
>  .Sh SYNOPSIS
>  .Nm btrace
>  .Op Fl lnv
> -.Op Fl e Ar program | Ar file
> +.Op Fl e Ar program
>  .Op Fl p Ar file
>  .Op Ar argument ...
> +.Op Ar filename
>  .Sh DESCRIPTION
>  The
>  .Nm
> @@ -33,15 +34,17 @@ utility provides an interface to inspect the internals of the system and
>  programs.
>  It interprets the
>  .Xr bt 5
> -program in
> -.Ar file
> +.Ar program
> +or
> +.Ar filename
>  and communicates with the dynamic tracer device using the interface described in
>  .Xr dt 4 .
>  .Pp
>  The options are as follows:
>  .Bl -tag -width Ds
>  .It Fl e Ar program
> -Execute
> +Execute inline
> +.Xr bt 5
>  .Ar program .
>  .It Fl l
>  List all available probes.
>