Hi,
Jonathan Adams wrote:
> Currently, ::print does not print anything about the top-level structure or
> union that is being printed. I'm in there working on something else:
>
> 4916519 can't ::print forward-decl typedef
>
> and I noticed that the code in elt_print() would be much simpler if we treated
> the top level the same. The change in output would be from:
>
>
>> ::print proc_t
>>
> {
> p_exec
> p_as
> p_lockp
> p_crlock {
> _opaque
> }
> ...
>
>> ::print -t proc_t
>>
> {
> struct vnode *p_exec
> struct as *p_as
> struct plock *p_lockp
> kmutex_t p_crlock {
> void *[1] _opaque
> }
> ...
>
>> ::print -at proc_t
>>
> {
> 0 struct vnode *p_exec
> 8 struct as *p_as
> 10 struct plock *p_lockp
> 18 kmutex_t p_crlock {
> 18 void *[1] _opaque
> }
> ...
>
>> ::print -a proc_t
>>
> {
> 0 p_exec
> 8 p_as
> 10 p_lockp
> 18 p_crlock {
> 18 _opaque
> }
> ...
>
>> p0::print -ta proc_t
>>
> {
> 1892440 struct vnode *p_exec = 0
> 1892448 struct as *p_as = kas
> 1892450 struct plock *p_lockp = p0lock
> 1892458 kmutex_t p_crlock = {
> 1892458 void *[1] _opaque = [ 0 ]
> }
> ...
>
>
> to:
>
>
>> ::print proc_t
>>
> {
> p_exec
> p_as
> p_lockp
> p_crlock {
> _opaque
> }
> ...
>
>> ::print -t proc_t
>>
> proc_t {
> struct vnode *p_exec
> struct as *p_as
> struct plock *p_lockp
> kmutex_t p_crlock {
> void *[1] _opaque
> }
> ...
>
>> ::print -at proc_t
>>
> 0 proc_t {
> 0 struct vnode *p_exec
> 8 struct as *p_as
> 10 struct plock *p_lockp
> 18 kmutex_t p_crlock {
> 18 void *[1] _opaque
> }
> ...
>
>> ::print -a proc_t
>>
> 0 {
> 0 p_exec
> 8 p_as
> 10 p_lockp
> 18 p_crlock {
> 18 _opaque
> }
> ...
>
>> p0::print -ta proc_t
>>
> 1892440 proc_t = {
> 1892440 struct vnode *p_exec = 0
> 1892448 struct as *p_as = kas
> 1892450 struct plock *p_lockp = p0lock
> 1892458 kmutex_t p_crlock = {
> 1892458 void *[1] _opaque = [ 0 ]
> }
> ...
>
>
> Personally, I think this makes the output much more regular, but I'm happy
> to hear objections and comments.
>
> Thoughts?
>
Yes!
max