VM debugging - process IDs (was Re: [Vm-dev] Re: slang printf equivalent)

Ben Coman btc at openinworld.com
Mon Feb 22 14:37:29 UTC 2016

On Mon, Feb 22, 2016 at 8:56 PM, Ben Coman <btc at openinworld.com> wrote:
> On Mon, Feb 22, 2016 at 8:05 PM, Ben Coman <btc at openinworld.com> wrote:
>> and hit an interesting snag where the
>> activeProcess seen by the primitive seems different than the process
>> that called the primitive.
> Quick correction. Its not activeProcess that is wrong, its that the
> owning process is changing unexpectedly - maybe due to wrapping inside
> #on:do: and/or #ifCurtailed:

I was right the first time.  The active process was changing, but it
was down to my lack of knowledge...

    Transcript clear; crShow: Processor activeProcess; show:' - outside'.
    process :=
    [   [   Transcript crShow: Processor activeProcess; show: ' - inside'.
            1 second wait.
        ] ifCurtailed: [ Transcript crShow: Processor activeProcess;
show: ' - curtailed' ]
    ] newProcess priority: 41.
    process resume.
    process terminate.
a Process(304957184) in nil - outside
a Process(639380480) in nil - inside
a Process(304957184) in nil - curtailed

Of course this makes some sense, the 'inside' process had been
terminated, so it can't run there.  Indeed, from gdb, the 'inside'
process is absent from output of printAllStacks().
cheers -ben
>> @Eliot, I found all those print methods and how to call them from gdb.
> Belay that request about matching to process IDs inside the image.
> The gdb visible IDs remain the same, and its workable to record and
> cross reference back printAllStacks since the IDs remain the same and
> I'm getting to know them.
> cheers -ben

More information about the Vm-dev mailing list