Hi,
Has anyone successfully used the GTK2-library for an arm-processor ? Today I tried the helloworld-demoes, which segfault. I tried gdb but didn't find anything (gdb is brand new for me, so without much more reading it will remain so I fear).
I tried a dummy program, just a writeln, which works fine, but the moment I add some uses for GTK (glib2, gdk2 or gtk2), the program crashes. gdb reports 'segmentation fault in _start()' and seems unable to backtrace.
Any hints how to debug this (I know I must learn how to use gdb) ? And since I have very little experience with programming for linux could you please be verbose.
B.T.W. I was using gbdserver to debug this remotely. Are there gui's that can connect to a gdbserver ? I tried ddd and KDbg on my suse-machine but they seem unable to use gdbserver. Thanks,
Koenraad Lelong.
Mailing lists / fpc-pascal / 2005-12
GTK2 and arm-linux
5 messages · 2 people · –
- KKoenraad Lelong 4
- DDen Jean 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Koenraad Lelong wroteHi, Has anyone successfully used the GTK2-library for an arm-processor ? Today I tried the helloworld-demoes, which segfault. I tried gdb but
The Zaurus does not come with Gtk(2). Only Qt/E (ie Qtopia). Did you install another ROM with an X11 server/ Gtk libraries ?
The advantage of Qtopia it that it has its own lightweight fast replacement for X11, tailored for embedded.
But many also seem to use X11 on higher end Zauri. I just never bothered to try it.
Are there any problems with using Qt/E Qtopia + FPC on the Zaurus ? Something I can fix ?
kind regards,
Den Jean
Den Jean wrote 19 lines
I kind of hoped _you_ wouldn't notice my question ;-). Well, I didn't feel well with Qt/E and FPC. To make my first application I modified your demo, but some things I just didn't understand, where they came from, what they are for,... not exactly a tranlation from C (not that I know much C, but when you buy a book about QT, it's using C and if you see contructions that are not mentioned in the book, you're puzzled).
The thing about the screensaver showed me something else. My C-program to disable the screensaver was only about 30Kbytes. My Pascal version was more than a megabyte big (maybe it's just a linking problem ?). And a number of functions didn't work so I couldn't even approach the C-version. So I looked around for another GUI, and I found the GPE rom for the Zaurus. But I hesitated to reflash. Then I stumbled on an industrial PC-board : the Viper from Arcom. Since we use such boards at work I was able to purchase a development kit. That has Tiny-X installed. Now I'm trying to use that board to learn more about the arm-processor. But again I'm having problems with the GUI :-(
So is there someone who can give me a firm push in the right direction to solve my problem ?
Thanks,
Koenraad Lelong.
Has anyone successfully used the GTK2-library for an arm-processor ? Today I tried the…
Koenraad Lelong wrote 17 lines
I managed to have ddd use the arm-linux-gdb. I first used it to 'debug' a program that does not use anything from gtk. That program loads to low memory (see http://users.edpnet.be/brouwerij/viper/ : gdb-test1, source : test1.pas, executable : test1), and executes without problems. When I add Glib2 to my 'uses' (see gdb-test2, source : test2.pas, executable : test2), the program loads in high memory. If you stepi that program (starts at _start) then you will see a 'str r1,[r12]', but since r12 is loaded with 0 (zero) a few instructions before (ldr r12,[pc,#44] makes r12 zero) it crashes with a segmentation fault. Is there anyone able to make suggestions where the difference in memory-location could come from ? I think that has something to do with the problems I have. I tried some other programs that work and all load in that low memory region.
Regards,
Koenraad Lelong.
Koenraad Lelong wrote 20 lines
...
I don't know why but I added -Xc to my command-line (I think I must have misread and wanted to add -Xd, and then I used the bash-history to avoid retyping). The --shared switch for the linker makes the trouble. Can anyone tell me what --shared does ? In the man page for ld I find -shared. If this is the same, does this mean I did make a shared library, not a real executable ?
Stupid way to loose more than two weeks, but then, I learned to use gdb, which is good I think, although it didn't help me with this. Regards,
Koenraad Lelong.
