[Crash-utility] [PATCH v2] struct: Fix handing of percpu symbols (when symbolic argument only)
Dave Anderson
anderson at redhat.com
Thu Sep 29 16:37:31 UTC 2016
----- Original Message -----
> ----- Original Message -----
> > Hi Dave,
>
> >
> > Sorry about the delay. I completely forgot about this one!
> > Please note I have only addressed the case when the argument to the
> > 'struct' command is not an address:
> >
>
> And lastly, the symbol:cpuspec argument to the struct command is meant
> to be the address of the structure, not a pointer to the address:
>
> crash> help struct
>
> NAME
> struct - structure contents
>
> SYNOPSIS
> struct struct_name[.member[,member]][-o][-l offset][-rfuxdp]
> [address | symbol][:cpuspec] [count | -c count]
>
> ... [ cut ] ...
>
> symbol symbolic reference to the address of a structure.
> :cpuspec CPU specification for a per-cpu address or symbol:
> : CPU of the currently selected task.
> :a[ll] all CPUs.
> :#[-#][,...] CPU list(s), e.g. "1,3,5", "1-3",
> or "1,3,5-7,10".
> ...
>
> So I'm worried that if you wanted to see a structure member that actually
> is a pointer, then the patch is going to dereference it and print bogus
> data.
Hi Aaron,
Given that you are essentially specifying a completely new argument
type to the struct command, I'm going to have to NAK this patch.
To do what you want, honestly I don't really feel that it's asking too much
to make it a two-step process, i.e, get the address first, and then apply it
to the struct command.
However, if you really feel it's worth it, I suppose you could create a
new "indirect-pointer-argument-type" for the struct command that explicitly
specifies that it is a pointer to the target address.
Thanks,
Dave
More information about the Crash-utility
mailing list