Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #58701

gforth and shared libraries

From Andreas Klimas <klimas@w3group.de>
Newsgroups comp.lang.forth
Subject gforth and shared libraries
Date 2017-05-05 17:01 +0200
Organization A noiseless patient Spider
Message-ID <oei3tg$6e4$1@dont-email.me> (permalink)

Show all headers | View raw


Hello,

for my work I would have access to shared libraries.
unfortunately the source code of gforth is not trivial and
hence I have found and tryied so far:

s" db/script.so" open-lib constant so  \ load my small dynamic link lib
s" script" so lib-sym wcall \ call the function script

I set a breakpoint at script() but ..

Breakpoint 1, script (args=0x2aaaac0ff000 "") at script.c:10
10		printf("<h1>Hello From Script</h1>");
(gdb) bt
#0  script (args=0x2aaaac0ff000 "") at script.c:10
#1  0x0000000000408edc in gforth_engine (ip0=0x2aaaac0ff000, 
ip0@entry=0x2aaaab903620, sp0=0x2aaaac0feff8, rp0=0x408ebc,
    rp0@entry=0x2aaaac108c00, fp0=0x2aaaac104000, lp0=0x6c <Address 
0x6c out of bounds>, lp0@entry=0x2aaaac10da00 "") at prim:2480
#2  0x0000000000411a3b in gforth_go (image=image@entry=0x2aaaab8f9038, 
stack=<optimized out>, stack@entry=4,
    entries=entries@entry=0x7fffffffe4b0) at ./main.c:754
#3  0x0000000000404513 in main (argc=<optimized out>, argv=<optimized 
out>, env=<optimized out>) at ./main.c:2349

I only can guess what the meaning of the parameters ip0, ip0@entry ... are

I even haven't found anything in the documentation about open-lib, 
lib-sym and wcall
(there are more system related words to explore)

so, how is the interface for wcall defined ?

I would be grateful for any help

best wishes
Andreas Klimas

Back to comp.lang.forth | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

gforth and shared libraries Andreas Klimas <klimas@w3group.de> - 2017-05-05 17:01 +0200
  Re: gforth and shared libraries Andreas Klimas <klimas@w3group.de> - 2017-05-05 17:44 +0200
    Re: gforth and shared libraries anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-06 16:24 +0000
      Re: gforth and shared libraries Andreas Klimas <klimas@w3group.de> - 2017-05-07 10:48 +0200
        Re: gforth and shared libraries anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-07 10:03 +0000
          Re: gforth and shared libraries albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-05-07 13:40 +0200
          Re: gforth and shared libraries Andreas Klimas <klimas@w3group.de> - 2017-05-07 22:27 +0200
            Re: gforth and shared libraries Bernd Paysan <bernd@net2o.de> - 2017-05-07 23:57 +0000
              Re: gforth and shared libraries Andreas Klimas <klimas@w3group.de> - 2017-05-08 10:44 +0200
                Re: gforth and shared libraries anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-08 11:26 +0000
                Re: gforth and shared libraries Andreas Klimas <klimas@w3group.de> - 2017-05-08 17:08 +0200
            Re: gforth and shared libraries pahihu <pahihu@gmail.com> - 2017-05-09 10:31 -0700
              Re: gforth and shared libraries Andreas Klimas <klimas@w3group.de> - 2017-05-10 09:40 +0200
        Re: gforth and shared libraries albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-05-07 13:37 +0200
          Re: gforth and shared libraries Andreas Klimas <klimas@w3group.de> - 2017-05-07 22:50 +0200
            Re: gforth and shared libraries minforth@arcor.de - 2017-05-07 14:41 -0700
              Re: gforth and shared libraries Andreas Klimas <klimas@w3group.de> - 2017-05-08 10:49 +0200
                Re: gforth and shared libraries minforth@arcor.de - 2017-05-08 02:16 -0700
                Re: gforth and shared libraries Andreas Klimas <klimas@w3group.de> - 2017-05-08 16:32 +0200
                Re: gforth and shared libraries minforth@arcor.de - 2017-05-08 08:00 -0700
                Re: gforth and shared libraries Andreas Klimas <klimas@w3group.de> - 2017-05-08 17:52 +0200
                Re: gforth and shared libraries minforth@arcor.de - 2017-05-08 09:33 -0700
                Re: gforth and shared libraries anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-09 15:44 +0000
                Re: gforth and shared libraries Andreas Klimas <klimas@w3group.de> - 2017-05-10 09:51 +0200
                Re: gforth and shared libraries anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-10 10:16 +0000
                Re: gforth and shared libraries Andreas Klimas <klimas@w3group.de> - 2017-05-10 12:31 +0200
                Re: gforth and shared libraries albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-05-10 12:51 +0200

csiph-web