Koenraad Lelong wrote:
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.
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.



_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to