On Wed, Mar 15, 2006 at 01:53:22PM -0800, Michael Corcoran wrote:
> On Wed, 2006-03-15 at 13:41, Jonathan Adams wrote:
> > On Wed, Mar 15, 2006 at 01:16:37PM -0800, Michael E. Corcoran wrote:
> > > I have a corefile I'm looking at and wanted to do some processing of 
> > > output and then feed that back into mdb, but I'm getting this odd error:
> > > 
> > > > ::cat headt | ::eval .-40=K | ::print vmem_seg_t
> > > mdb: syntax error on line 2 of (pipeline) near "\n"
> > ...
> > > > *kmem_oversize_arena::walk vmem_alloc | ::print -ad vmem_seg_t 
> > > > vs_timestamp ! sort -tt -k4n,4n | cut -d' ' -f1 > t.sorted
> > > > ::cat t.sorted | ::eval .-40=K | ::vmem_seg -v ! cat > vmem_sorted
> > 
> > 
> > The error is actually not from the ::cat, but from the ::eval.  The 
> > appropriate
> > tool to use in this case is '::map':
> > 
> So, should a bug be filed against eval?  I don't see why eval shouldn't
> work. I will obviously go ahead and use ::map but should I also file a
> bug against ::eval at the same time?

You could file a bug, though my understanding is that ::eval generally doesn't
work well in pipelines, and ::map should be used instead.

Cheers,
- jonathan

> Thanks,
> 
> Mike
> 
> > > ::cat /tmp/t.sorted | ::map '.-40' | ::vmem_seg -v
> >             ADDR TYPE            START              END             SIZE
> >                                 THREAD        TIMESTAMP                 
> >      3000005cd10 ALLC      30009fac000      30009fb4198            33176
> >                                180e000        7bfeb81ef
> >                  vmem_seg_alloc+0x1e8
> >                  vmem_xalloc+0x8c4
> >                  vmem_alloc+0x238
> >                  kmem_alloc+0xfc
> >                  kobj_zalloc+8
> >                  init_devnamesp+0x64
> > ...
> > 
> > Cheers,
> > - jonathan
> > 
> > -- 
> > Jonathan Adams, Solaris Kernel Development

-- 
Jonathan Adams, Solaris Kernel Development

Reply via email to