[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixEvent.c missing from platforms/unix/vm (#555)

Eliot Miranda eliot.miranda at gmail.com
Wed Mar 24 18:54:55 UTC 2021


Hi David,

On Mon, Mar 22, 2021 at 4:14 PM David T. Lewis <lewis at mail.msen.com> wrote:

>
> On Mon, Mar 22, 2021 at 11:46:27AM +0100, Bruce O'Neel wrote:
> >
> >
> > Hi,
> >
> > That fixed one problem I was tripping over on the ARMv8 build.
> >
> > There still seems to be a problem with the x86-64 build.????
> >
> > Thanks.
> >
> > bruce
>
> I see the same issue on my Linux x86-64 PC. I cannot spot the exact cause
> of
> the problem, but it seems to have been introduced in this commit:
>
> commit 6d74c4b652c7780110fe327f97e98aaef5242fbc
> Author: Eliot Miranda <eliot.miranda at gmail.com>
> Date:   Wed Feb 10 21:41:31 2021 -0800
>
>     Revisions to core include files to get EXPORT defined correctly at the
> relevant points.
>     Essentially move the default EXPORT definitions from sq.h to
> sqMemoryAccess.h.
>     Include fbdev support in build.linux32ARMv6 builds and add -m32 to
> their CFLAGS
>     to attempt to get the 32-bit VMs to be compilable on 64-bit ARM. [ci
> skip]
>     cuz new cogit files will arrive soon.
>
>
> The changes seem straightforward, but for some reason the header files must
> not be getting included properly.
>
> Dave
>
>
>
>
> >
> > clang -Wall?? -g -O2 -DNDEBUG -DDEBUGVM=0 -msse2 -DCOGMTVM=0 -pthread
> -DLSB_FIRST=1 -m64 -Wno-missing-braces -Wno-unknown-pragmas
> -Wno-unused-value -Wno-unu
> > sed-label -Wno-unused-function -Wno-unused-variable?? -DHAVE_CONFIG_H??
> -DSQUEAK_BUILTIN_PLUGIN
> -I/home/edoneel/tmp/opensmalltalk-vm/build.linux64x64/squeak.
> > [cog.spur/build](http://cog.spur/build)
> -I/home/edoneel/tmp/opensmalltalk-vm/build.linux64x64/[squeak.cog.spur/build](
> http://squeak.cog.spur/build)
> -I/home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm -I/home/e
> > doneel/tmp/opensmalltalk-vm/platforms/Cross/vm
> -I/home/edoneel/tmp/opensmalltalk-vm/spur64src/vm -I/usr/local/include
> -I/home/edoneel/tmp/opensmalltalk-vm/
> > platforms/Cross/vm
> -I/home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm
> -I/home/edoneel/tmp/opensmalltalk-vm/spur64src/vm
> -I/home/edoneel/tmp/opensmallta
> > lk-vm/platforms/Cross/plugins/FilePlugin
> -I/home/edoneel/tmp/opensmalltalk-vm/platforms/unix/plugins/B3DAcceleratorPlugin
> -m64 -Wno-missing-braces -Wno-unk
> > nown-pragmas -Wno-unused-value -Wno-unused-label -Wno-unused-function
> -Wno-unused-variable???? -c -o sqUnixMain.o
> /home/edoneel/tmp/opensmalltalk-vm/platform
> > s/unix/vm/sqUnixMain.c
> > /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:872:3:
> warning: implicit declaration of function 'pushOutputFile' is invalid in
> C99 [-Wim
> > plicit-function-declaration]
> > ?? pushOutputFile((char *)STDERR_FILENO);
> > ?? ^
> >
> /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:926:35:
> error: use of undeclared identifier 'REG_RBP'
>

If you have a look at the code here the file is trying to
- find out what platform it is on
- pull in the relevant version of ucontext.h containing the relevant
defines for extracting register values from an interrupt context
- print out the registers for a crash report
So please look to
- find out if platforms/unix/vm/include_ucontext.h is working correctly on
this platform
- find out what are the platform defines (-E -dM is your friend here)
- find out how ucontext.h defines the registers in a ucontext

> ?????????????????????????????????????????????? void *fp = (void *)(uap ?
> uap->_FP_IN_UCONTEXT : 0);
> >
> ????????????????????????????????????????????????????????????????????????????????????????????????????????????
> ^
> >
> /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/include_ucontext.h:78:44:
> note: expanded from macro '_FP_IN_UCONTEXT'
> > # define _FP_IN_UCONTEXT uc_mcontext.gregs[REG_RBP]
> >
> ????????????????????????????????????????????????????????????????????????????????????
> ^
> >
> /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:927:35:
> error: use of undeclared identifier 'REG_RSP'
> > ?????????????????????????????????????????????? void *sp = (void *)(uap ?
> uap->_SP_IN_UCONTEXT : 0);
> >
> ????????????????????????????????????????????????????????????????????????????????????????????????????????????
> ^
> >
> /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/include_ucontext.h:79:44:
> note: expanded from macro '_SP_IN_UCONTEXT'
> > # define _SP_IN_UCONTEXT uc_mcontext.gregs[REG_RSP]
> >
> ????????????????????????????????????????????????????????????????????????????????????
> ^
> > /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:992:9:
> error: use of undeclared identifier 'REG_RAX'
> > ?????????????????????????????????????????????? regs[REG_RAX],
> regs[REG_RBX], regs[REG_RCX], regs[REG_RDX],
> > ???????????????????????????????????????????????????????? ^
> >
> /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:992:24:
> error: use of undeclared identifier 'REG_RBX'
> > ?????????????????????????????????????????????? regs[REG_RAX],
> regs[REG_RBX], regs[REG_RCX], regs[REG_RDX],
> >
> ??????????????????????????????????????????????????????????????????????????????????????
> ^
> >
> /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:992:39:
> error: use of undeclared identifier 'REG_RCX'
> > ?????????????????????????????????????????????? regs[REG_RAX],
> regs[REG_RBX], regs[REG_RCX], regs[REG_RDX],
> >
> ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
> ^
> >
> /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:992:54:
> error: use of undeclared identifier 'REG_RDX'
> > ?????????????????????????????????????????????? regs[REG_RAX],
> regs[REG_RBX], regs[REG_RCX], regs[REG_RDX],
> >
> ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
> ^
> > /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:993:9:
> error: use of undeclared identifier 'REG_RDI'
> > ?????????????????????????????????????????????? regs[REG_RDI],
> regs[REG_RSI], regs[REG_RBP], regs[REG_RSP],
> > ???????????????????????????????????????????????????????? ^
> >
> /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:993:24:
> error: use of undeclared identifier 'REG_RSI'
> > ?????????????????????????????????????????????? regs[REG_RDI],
> regs[REG_RSI], regs[REG_RBP], regs[REG_RSP],
> >
> ??????????????????????????????????????????????????????????????????????????????????????
> ^
> >
> /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:993:39:
> error: use of undeclared identifier 'REG_RBP'
> > ?????????????????????????????????????????????? regs[REG_RDI],
> regs[REG_RSI], regs[REG_RBP], regs[REG_RSP],
> >
> ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
> ^
> >
> /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:993:54:
> error: use of undeclared identifier 'REG_RSP'
> > ?????????????????????????????????????????????? regs[REG_RDI],
> regs[REG_RSI], regs[REG_RBP], regs[REG_RSP],
> >
> ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
> ^
> > /home/edoneel/tmp/opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:994:9:
> error: use of undeclared identifier 'REG_R8'
> > ?????????????????????????????????????????????? regs[REG_R8 ],
> regs[REG_R9 ], regs[REG_R10], regs[REG_R11],
> > ???????????????????????????????????????????????????????? ^
> >
> >
> >
> >
> >
> > > On Mon, Mar 15, 2021 at 04:02:43AM -0700, Tom Beckmann wrote:
> > >  >
> > >  > The commit that removed it was this one:
> https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/924a24bb54870a621c5283f23631261d5a792000
>
> > >  >
> > >  > I saw that you did some cleanup of old event primitives, as
> documented in the commit message, @eliotmiranda. Was sqUnixEvent.c deleted
> by accident as part of this?
> > >  >
> > >
> > >  I restored the missing sqUnixEvent.c file, which I assume was
> mistakenly
> > >  deleted in that earlier commit.
> > >
> > >  Dave
> >
> >
>
>

-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20210324/0229e571/attachment-0001.html>


More information about the Vm-dev mailing list