OS-7689: ctfdump -c goes off the rails with a missing parent


Issue Type:Bug
Priority:4 - Normal
Created at:2019-03-28T23:14:40.577Z
Updated at:2019-05-03T13:28:16.368Z


Created by:Former user
Reported by:Former user
Assigned to:Former user


Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2019-04-17T16:00:57.593Z)

Fix Versions

2019-04-25 Queen of Jordan (Release Date: 2019-04-25)


I noticed that some kernel module's ctfdump -c output was awry:

$ ctfdump -c ./platform/i86xpv/kernel/drv/amd64/balloon | more
/* Types */

typedef 0��p���0��0��<;

typedef struct cpu_ht cpu_ht_t;

instead of:

$ ctfdump -c -p ./kernel/amd64/genunix ./platform/i86xpv/kernel/drv/amd64/balloon | more
/* Types */

typedef void (*callback_func_t)(struct as *, void *, uint_t);

typedef struct cpu_ht cpu_ht_t;

I had tested the parent case, but clearly something broke at some point.


Comment by Former user
Created at 2019-04-11T13:45:46.632Z

There's a few places where we need to correctly initialise strings, so when we fail to look up the type in the missing parent, we will default to "unknown_t". In addition, we'll complain if we had a parent but it wasn't specified.

Comment by Former user
Created at 2019-04-17T00:42:00.813Z

I ran ctfdump -c across all of the kernel output and checked a few of them to make sure all the 'unknown_t's were there as expected (as well as OS-7700 testing)

Comment by Jira Bot
Created at 2019-04-17T15:55:41.068Z

illumos-joyent commit adeaa2b6918d69fe48c140f0ca1779a3275f195f (branch master, by John Levon)

OS-7689 ctfdump -c goes off the rails with a missing parent
OS-7694 ctfdump -c drops last type
OS-7700 GCC7-derived CTF can double qualifiers on arrays
OS-7733 should ignore DW_TAG_subprogram with DW_AT_declaration tags
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Jason King <jason.king@joyent.com>
Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>