[mdb-discuss] ::print output question

2009-03-28 Thread James Carlson
Jonathan Adams writes:
 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

Good to hear; that one's annoying.

 Personally, I think this makes the output much more regular, but I'm happy
 to hear objections and comments.
 
 Thoughts?

Very nice!  Looking forward to adding the type info.

-- 
James Carlson, Solaris Networking  james.d.carlson at sun.com
Sun Microsystems / 35 Network Drive71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677



[mdb-discuss] ::print output question

2009-03-27 Thread Jonathan Adams
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?

Cheers,
- jonathan