I don't understand what you mean by "this scenario".

But I do know that if I do
   jdb_getstack_jdebug_=: (}.~ ('*' i.~ [: > 8 {"1 ]))@(13!:13)

clicking the stack cutback button works for my example.

And, this makes sense -- the result of jdb_getstack_jdebug_ is what's
being displayed in the gui.

And, meanwhile, column 1 contains error numbers. So if there's no
error numbers in the suspended context, there would be no stack to
display. Meanwhile, column 8 marks suspensions, and it's the topmost
suspended stack which the debug gui is displaying and manipulating.

Still, thinking this through, it might make more sense to define

jdb_getstack_jdebug_=: (#~ (1 = [:+/\ '*' = [: > 8 {"1 ]))@(13!:13)

and to warn the user when there are multiple suspensions.

But
jdb_getstack_jdebug_=: (}.~ ('*' i.~ [: > 8 {"1 ]))@(13!:13)
is the simplest approach

(and, of course, if the script were updated, the trailing _jdebug_ on
the name being assigned would be removed).

Am I missing something?

Thanks,

-- 
Raul


On Tue, Feb 11, 2020 at 6:10 PM bill lam <[email protected]> wrote:
>
> cut stack works fine at least for this scenario, I think it is the gui part
> didn't refresh the window after dbcut. eg
> dbr 1
> ex''
> in suspension mode, use dbst'' or dbctx'' to check, then
> dbcut''
> then check again dbst'' and dbctx''
>
>
>
> On Wed, Feb 12, 2020, 6:45 AM Raul Miller <[email protected]> wrote:
>
> > It looks like a problem is the definition of jdb_getstack_jdebug_
> >
> > The current definition is
> >    (}.~ (0 i.~ 0 = [: > 1 {"1 ]))@(13!:13)
> >
> > This works fine sometimes, but not for stack cutback.
> >
> > This should probably instead be
> >    (}.~ ('*' i.~ [: > 8 {"1 ]))@(13!:13)
> >
> > Thanks,
> >
> > --
> > Raul
> >
> > On Tue, Feb 11, 2020 at 4:47 PM Henry Rich <[email protected]> wrote:
> > >
> > > That's in the debugger tool, which is a J script.  It's been a long time
> > > since I looked at it and I don't have any ideas.
> > >
> > > Henry Rich
> > >
> > > On 2/11/2020 4:14 PM, Raul Miller wrote:
> > > > Yes, that's exactly what I did.
> > > >
> > > > Thanks,
> > > >
> > >
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to