What it the slang equivalent of a printf to output to the console to help debugging? cheers -ben
The most promising I found so far is... self printStringOf: 'BLAH3' ; flush. but nothing show up on the bash console that started the VM. cheers -ben
On Sun, Feb 21, 2016 at 9:17 PM, Ben Coman btc@openinworld.com wrote:
What it the slang equivalent of a printf to output to the console to help debugging? cheers -ben
well… I just do:
self cCode: ‘printf(“BLAH: %s”, myStringVar);’.
if is for debugging, you will be ok… :P
Esteban
On 21 Feb 2016, at 14:34, Ben Coman btc@openInWorld.com wrote:
The most promising I found so far is... self printStringOf: 'BLAH3' ; flush. but nothing show up on the bash console that started the VM. cheers -ben
On Sun, Feb 21, 2016 at 9:17 PM, Ben Coman btc@openinworld.com wrote:
What it the slang equivalent of a printf to output to the console to help debugging? cheers -ben
On 21/02/2016 14:34, Ben Coman wrote:
The most promising I found so far is... self printStringOf: 'BLAH3' ; flush. but nothing show up on the bash console that started the VM.
Hi Ben,
On a standard linux console, printf should output to console (I just verified now) .
What kind of console ? xen console for rump vm (on netbsd?) ? oh my ! great :)
if so, it depends of the kind of virtualization you choosed : hw, I guess depends of bios and drivers (bochs/qemu should go out to qemu drivers/console?) pv there is a special hypercall api in mini-os to output to host domain console (don't remember exactly, may be search for printk in Mini-os/xen headers, I'll digg into and post you what I found soon).
(nb: If you are at that point I am *very* interested, I struggled a lot to link a hacked vm with netbsd libs .. I am bad at autoconf, cmake and co. currently in my standby list, I will resume )
HTH
regards
Alain
Hi Ben,
you'll see a lot of print methods in StackInterpreter that dump stack frames etc. these are built above some simple string and number of output routines, like print: & printNum: that you can use in simulated code and print to stdout in the real VM also.
For debug logging during simulation the interpreter simulators respond to #transcript by answering the output window in the VM simulation. There's a menu pick in the bottom right inspector to toggle the transcript between the small one in the VM simulation and the system's Transcript.
_,,,^..^,,,_ (phone)
On Feb 21, 2016, at 6:43 AM, Alain Rastoul alf.mmm.cat@gmail.com wrote:
On 21/02/2016 14:34, Ben Coman wrote:
The most promising I found so far is... self printStringOf: 'BLAH3' ; flush. but nothing show up on the bash console that started the VM.
Hi Ben,
On a standard linux console, printf should output to console (I just verified now) .
What kind of console ? xen console for rump vm (on netbsd?) ? oh my ! great :)
if so, it depends of the kind of virtualization you choosed : hw, I guess depends of bios and drivers (bochs/qemu should go out to qemu drivers/console?) pv there is a special hypercall api in mini-os to output to host domain console (don't remember exactly, may be search for printk in Mini-os/xen headers, I'll digg into and post you what I found soon).
(nb: If you are at that point I am *very* interested, I struggled a lot to link a hacked vm with netbsd libs .. I am bad at autoconf, cmake and co. currently in my standby list, I will resume )
HTH
regards
Alain
vm-dev@lists.squeakfoundation.org