For anyone else who might happen onto the problem I had, the solution ended up 
being that my architecture was named "windows-x86.32", not "x86.32".
 From: mrj...@gmail.com
Date: Fri, 10 Aug 2012 14:10:41 -0700
To: factor-talk@lists.sourceforge.net
Subject: Re: [Factor-talk] Any way of making sense of what's in the boot        
image?

Write "my-arch make-image" in listener.
Then type Ctrl-W to walk it.
"Step" across my-arch
"Into" into make-image


Rinse, repeat.  :)

On Fri, Aug 10, 2012 at 2:08 PM, Michael Clagett <mclag...@hotmail.com> wrote:






Quick question, if you're still on the horn.   How do I trace into myarch 
make-image from the Listener.  If I hit enter it just executes.  I'm sure there 
must be any easy way to step into it, which I'm sure I can find by searching 
the documentation.  But perhaps you could save me five minutes.


 
From: mrj...@gmail.com
Date: Fri, 10 Aug 2012 14:01:58 -0700
To: factor-talk@lists.sourceforge.net


Subject: Re: [Factor-talk] Any way of making sense of what's in the boot        
image?

Typically the architecture is a combination of os and arch:
    IN: scratchpad my-arch .    "unix-x86.64"


You can use the "my-arch" word to make an image for your architecture:


    IN: scratchpad my-arch make-image


On Fri, Aug 10, 2012 at 1:56 PM, Michael Clagett <mclag...@hotmail.com> wrote:








Hi --
 
I've been trying to run the make-image word from the Listener and got as far as 
this trace:
 
IN: scratchpad Command: restart
1: Note:
Added "bootstrap.image" vocabulary to search path




"x86.32" make-image
Loading resource:/core/bootstrap/stage1.factor
Bootstrap stage 1...
Loading vocab:bootstrap/primitives.factor
Creating primitives and basic runtime structures...
Loading vocab:bootstrap/syntax.factor




 
>From Traceback:
 
Data Stack:
 
[ ~quotation~ with-compilation-unit ]
"Bad architecture: x86.32"
 
Call Stack:
 
(U)
Quotation: [ set-namestack init-catchstack self quot>> call -> stop ]




(O)
Word: listener-thread
(O)
Word: listener
(O)
Word: (listener)
(U)
Quotation: [
    [ ~quotation~ dip swap ~quotation~ dip ] dip swap
    [ call datastack ] dip -> swap [ set-datastack ] dip




]
(U)
Quotation: [ call -> datastack ]
(O)
Word: make-image
(U)
Quotation: [
    "Bootstrap stage 1..." print
    flush "vocab:bootstrap/primitives.factor" run-file
    -> load-help? off { "resource:core" } vocab-roots set [




        ~quotation~ % "math.integers" require
        "math.floats" require "memory" require
        "io.streams.c" require "vocabs.loader" require
        "syntax" require "bootstrap.layouts" require




        ~quotation~ %
    ] [ ] make bootstrap-startup-quot set
]
(U)
Quotation: [
    "Creating primitives and basic runtime structures..." print
    flush H{ } clone sub-primitives set
    "vocab:bootstrap/syntax.factor" parse-file architecture get




    { ~array~ ~array~ ~array~ ~array~ ~array~ ~array~ } ?at
    [ "Bad architecture: " prepend throw ] unless
    -> "vocab:cpu/" "/bootstrap.factor" surround
    parse-file "vocab:bootstrap/layouts/layouts.factor"




    parse-file "syntax" lookup-vocab vocab-words
    bootstrap-syntax set H{ } clone dictionary set
    H{ } clone root-cache set H{ } clone source-files set
    H{ } clone update-map set H{ } clone implementors-map set




    init-caches bootstrapping? on ( -- ) call-effect
    ( -- ) call-effect "accessors" create-vocab drop
    num-types get f <array> builtins set [
        ( -- ) call-effect ~array~ ~quotation~ each




        "fixnum" "math" create register-builtin
        "bignum" "math" create register-builtin
        "tuple" "kernel" create register-builtin
        "float" "math" create register-builtin




        "f" "syntax" lookup-word register-builtin
        "array" "arrays" create register-builtin
        "wrapper" "kernel" create register-builtin
        "callstack" "kernel" create register-builtin




        "string" "strings" create register-builtin
        "quotation" "quotations" create register-builtin
        "dll" "alien" create register-builtin




        "alien" "alien" create register-builtin
        "word" "words" create register-builtin
        "byte-array" "byte-arrays" create register-builtin




        "f" "syntax" lookup-word ~array~ define-builtin
        "f" "syntax" create
        ~quotation~ "predicate" set-word-prop
        "f?" "syntax" vocab-words delete-at




        "t" "syntax" lookup-word define-singleton-class
        "c-ptr" "alien" create ~quotation~ ~array~ make
        define-union-class
        "array-capacity" "sequences.private" create




        "fixnum" "math" lookup-word
        ~quotation~ ~quotation~ make define-predicate-class
        "array-capacity" "sequences.private" lookup-word
        ~195 more~




    ] with-compilation-unit
]
(O)
Method: M\ object throw
(U)
Quotation: [
    OBJ-CURRENT-THREAD special-object error-thread set-global
    current-continuation -> error-continuation set-global




    [ original-error set-global ] [ rethrow ] bi
]

Anyone have any ideas?
 
 
From: mclag...@hotmail.com


To: factor-talk@lists.sourceforge.net
Date: Fri, 10 Aug 2012 17:50:12 +0000
Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image?









Thanks for the reference.  I assume that will be helpful once I get past 
stepping through the bootstrapping code and am in the Listener environment.
From: mrj...@gmail.com




Date: Fri, 10 Aug 2012 10:40:28 -0700
To: factor-talk@lists.sourceforge.net
Subject: Re: [Factor-talk] Any way of making sense of what's in the boot        
image?





You might also find it useful to try the "Walker" which allows you to step 
through Factor code:
http://docs.factorcode.org/content/article-ui-walker.html








On Fri, Aug 10, 2012 at 10:29 AM, Michael Clagett <mclag...@hotmail.com> wrote:






Not a problem any more.  WinDbg does the trick just fine.  It was just Visual 
Studio.
 
From: mclag...@hotmail.com


To: factor-talk@lists.sourceforge.net
Date: Fri, 10 Aug 2012 11:51:00 +0000
Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image?












> > P.S.   Incidentally, while I am on the subject, I find myself able to trace
> > through the VM startup code in Visual Studio with no problem at all, until I
> > get to the factor_vm::c_to_factor, which wraps a c-to-factor sub-primitive






> > inside of a callback stub and then invokes that function.  On both a Windows
> > 7 platform and a Windows Server 2008 platform, my Visual Studio blows up
> > when the callback address loaded into EDX is called.  Anybody ever






> > encountered this and any idea how to get around it?
> 
> Factor code doesn't follow the C calling convention so it's unlikely
> that a debugger will be able to walk a stack with Factor frames. In






> recent versions of Factor you can trigger Factor's own low-level
> debugger with ^C, which will let you backtrace and step through Factor
> frames.
> 
> -Joe
> 

If I'm understanding this correctly, you are suggesting that if I'm in the 
Factor development environment, I can drop into Factor's own low-level 
debugger.  But what do people do (you language maintainer, for example) when 
you need to debug the startup code that builds an image that needs to be in 
place for the development environment even to be launched?  Am I correctly 
understanding you, that I can't use a Windows debugger to step through the init 
sequence, but don't have Factor's debugger available yet either?  Or am I 
missing something?






 
Any insights would be greatly appreciated.
                                          

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk                        
                  

------------------------------------------------------------------------------

Live Security Virtual Conference

Exclusive live event will cover all the ways today's security and

threat landscape has changed and how IT managers can respond. Discussions

will include endpoint security, mobile security and the latest in malware

threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________

Factor-talk mailing list

Factor-talk@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/factor-talk





------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk                        
                  

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk                        
                  

------------------------------------------------------------------------------

Live Security Virtual Conference

Exclusive live event will cover all the ways today's security and

threat landscape has changed and how IT managers can respond. Discussions

will include endpoint security, mobile security and the latest in malware

threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________

Factor-talk mailing list

Factor-talk@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/factor-talk





------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk                        
                  

------------------------------------------------------------------------------

Live Security Virtual Conference

Exclusive live event will cover all the ways today's security and

threat landscape has changed and how IT managers can respond. Discussions

will include endpoint security, mobile security and the latest in malware

threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________

Factor-talk mailing list

Factor-talk@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/factor-talk





------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk                        
                  
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to