g_journal_read has broken argument list in V10

Mark Johnston markj at FreeBSD.org
Fri Aug 4 17:42:22 UTC 2017


On Fri, Aug 04, 2017 at 12:46:18PM +0200, Andreas Longwitz wrote:
> By the way, the following patch solves the problem with the wrong
> argument counts in ctfdump:

I think the existing code is correct. It's printing the CTF type index
of the return type, not the number of arguments. In particular, we have:

    <1> INTEGER void encoding=SIGNED offset=0 bits=0

so "returns 1" just means that the return type is void.

> 
> --- dump.c.1st  2015-07-03 16:39:24.000000000 +0200
> +++ dump.c      2017-08-04 10:56:21.563805000 +0200
> @@ -364,7 +364,8 @@
>                         (void) printf("  [%lu] FUNC ", id);
>                         if (name != NULL)
>                                 (void) printf("(%s) ", name);
> -                       (void) printf("returns: %u args: (", *fp++);
> +                       (void) printf("returns: %u args: (", n);
> +                       fp++;
> 
>                         if (n != 0) {
>                                 (void) printf("%u", *fp++);


More information about the freebsd-dtrace mailing list