r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Red] Red language group

Kaj
27-May-2011
[1647]
I don't think the GCC folks can do debug cycles this fast :-)
Andreas
27-May-2011
[1648x3]
you can (it's only C, after all), but you need a quite beefy machine. 
LLVM (C++) on the other hand ...
soo, here we go
http://bolka.at/2011/tmp/hello
Dockimbel
27-May-2011
[1651]
trying...
Andreas
27-May-2011
[1652]
or if you want to compile the binaries on your own:
https://gist.github.com/1bf8d5c54cb630c83d8e
Dockimbel
27-May-2011
[1653x2]
hmm, the browser don't want to save it to disk, it just displays 
it as text...I guess it misses a content-type: application/octet-stream...
Kaj: any workaround?
Andreas
27-May-2011
[1655]
http://bolka.at/2011/tmp/hello.bin
Dockimbel
27-May-2011
[1656x2]
Andreas: you rules!
Hello is working
Andreas
27-May-2011
[1658]
nice :)
Dockimbel
27-May-2011
[1659]
Displays all the banners, but seg fault on exiting.
Andreas
27-May-2011
[1660]
anything in the kernel log?
Dockimbel
27-May-2011
[1661x5]
uploading a screenshot...
http://static.red-lang.org/tmp/syllable-hello.png
The error is: 
Error: sys_open() failed to dup path
Invalid pagefault at 000000ec (NOTP:WRITE:USER)
Got to go, will be back in an hour.
Kaj
27-May-2011
[1666x8]
I think right-clicking in the browser would work
My NginX configuration probably serves it as default text
One of the syscalls has a different number on Syllable, probably 
exit. I'll check
The screenshot is awesome :-)
exit is syscall 5 instead of syscall 1 on Linux
I've taken over Andreas' changes, corrected the runtime syscall, 
and uploaded new empty, hello, reply-server and request-client
The latter won't find the 0MQ library, but will show how that works 
on Syllable
My nginx.conf has default_type application/octet-stream; by the way
Andreas
27-May-2011
[1674]
could you paste a `readelf -a` of some small system binary somewhere?
Kaj
27-May-2011
[1675]
Will do
Dockimbel
27-May-2011
[1676x3]
New hello still segfaults.
Program counter address: EIP = 1234567a
EAX = 000000ec (seems that dereferencing EAX is what caused the error)
Kaj
27-May-2011
[1679]
I was afraid syscalls would be more problematic. What calling convention 
do you use for them?
Dockimbel
27-May-2011
[1680x2]
Let me see that...
1st argument => EBX
2nd argument => ECX
3rd argument => EDX
...
syscall ID => EAX
INT 0x80
Kaj
27-May-2011
[1682x3]
What is that called?
Linux is using SYSENTER/SYSCALL, but Syllable still uses int 0x80:
http://development.syllable.org/news/2009-05-24-16-19-Memory-mapped-input-output-implemented.html
Dockimbel
27-May-2011
[1685]
I can't find the source document anymore, I remember that it was 
the standard Linux way (pre-SYSENTER).
Kaj
27-May-2011
[1686]
I thought so, considering that Hello works to my surprise :-)
Dockimbel
27-May-2011
[1687]
Is there a native code debugger on Syllable/Desktop?
Kaj
27-May-2011
[1688x3]
GDB, but it's possible that the current port doesn't work. It's in 
the Developer's Delight pack:
http://web.syllable.org/Syllable/downloads.html#packs
There's also strace
Dockimbel
27-May-2011
[1691]
I have use this document (among other sources) for implementing syscalls 
support for Linux: http://www.win.tue.nl/~aeb/linux/lk/lk-4.html
(See 4.3)
Kaj
27-May-2011
[1692x3]
Ah, Eindhoven University :-)
GDb and strace are treated in here:
http://development.syllable.org/documentation/introduction/part-1.html
Dockimbel
27-May-2011
[1695x2]
Using strace -o -r hello, I get in the logs:
---->> 406 = Fork ("<NULL>'")
Invalid pagefault at 000000ec (NOTP:WRITE:USER)
Kaj: web.syllable.org is displaying an AccessDenied error message