Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-04

now i have a very strange behaviour of my arm compiler

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Benedikt Schindler

Hi,

i still try to get a gtk applicatoins running on my device. And now i have found a work around for one error message.

But in reality it's not a work around. It's a: "i didn't realy change anything, but it works now"
If i delete the changes again, the error raises again. So maybe someone of you have an idea where the real problem is.

----------------
Original File doesn't work. Error message is:
----------------

(process:24386): GLib-WARNING (recursed) **: gmessages.c:387: could not find handler with id `0' for domain ""
aborting...

-----------------
This one works:
-----------------

--- /media/mmcblk0p3/lazarus/lcl/interfaces/gtk/gtkwidgetset.inc.orig
Tue Apr 28 10:24:19 2009
+++ /media/mmcblk0p3/lazarus/lcl/interfaces/gtk/gtkwidgetset.inc
Tue Apr 28 10:31:57 2009
@@ -302,7 +302,12 @@
       inc(i);
     end;
   end;
+var
+  index : integer;
 begin
+  //delme: just some output for debugging
+  for index := 0 to argc -1 do writeln(argv[index]);
+  // init gtk
   gtk_init(@argc,@argv);
   UseTransientForModalWindows:=not SearchOption('--lcl-no-transient',true);
 end;

----------------------
Also this one works:
----------------------

--- /media/mmcblk0p3/lazarus/lcl/interfaces/gtk/gtkwidgetset.inc.orig
Tue Apr 28 10:24:19 2009
+++ /media/mmcblk0p3/lazarus/lcl/interfaces/gtk/gtkwidgetset.inc
Tue Apr 28 10:47:25 2009
@@ -302,6 +302,8 @@
       inc(i);
     end;
   end;
+var
+  index : integer;
 begin
   gtk_init(@argc,@argv);
   UseTransientForModalWindows:=not SearchOption('--lcl-no-transient',true);

----------------------
and even this one works:
----------------------

--- /media/mmcblk0p3/lazarus/lcl/interfaces/gtk/gtkwidgetset.inc.orig
Tue Apr 28 10:24:19 2009
+++ /media/mmcblk0p3/lazarus/lcl/interfaces/gtk/gtkwidgetset.inc
Tue Apr 28 11:06:16 2009
@@ -303,6 +303,7 @@
     end;
   end;
 begin
+  writeln(argv[0]);
   gtk_init(@argc,@argv);
   UseTransientForModalWindows:=not SearchOption('--lcl-no-transient',true);
 end;

----------------------
if i delete the variable declaration (or the writeln), i have the error again.
Error raises at: gtk_init(@argc,@argv);

Backtrace
-----------------

Starting program: /opt/test/om_test_suite

Program received signal SIGILL, Illegal instruction. FPC_CPUCODEINIT () at /media/mmcblk0p3/fpc/rtl/arm/arm.inc:596 596 ldrd r0,[r0]
Current language: auto; currently pascal
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault. 0x49534e40 in ?? ()
(gdb) bt
#0 0x49534e40 in ?? ()
#1 0x49534e40 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb) cont
Continuing.

(process:24386): GLib-WARNING (recursed) **: gmessages.c:387: could not find handler with id `0' for domain ""
aborting...

Program received signal SIGABRT, Aborted.
0x406d8df4 in raise () from /lib/libc.so.6
(gdb) bt
#0 0x406d8df4 in raise () from /lib/libc.so.6
#1 0x406da3fc in abort () from /lib/libc.so.6
Backtrace stopped: frame did not save the PC
(gdb) cont
Continuing.

Program terminated with signal SIGABRT, Aborted.
The program no longer exists.
(gdb) quit

Reply by email

Jonas Maebe
to Benedikt Schindler
Benedikt Schindler wrote 18 lines
---------------------- Also this one works: ---------------------- --- /media/mmcblk0p3/lazarus/lcl/interfaces/gtk/ gtkwidgetset.inc.orig Tue Apr 28 10:24:19 2009 +++ /media/mmcblk0p3/lazarus/lcl/interfaces/gtk/ gtkwidgetset.inc Tue Apr 28 10:47:25 2009 @@ -302,6 +302,8 @@ inc(i); end; end; +var + index : integer; begin gtk_init(@argc,@argv); UseTransientForModalWindows:=not SearchOption('--lcl-no- transient',true);

All of your workarounds have one thing in common: they cause an extra stack slot to be allocated (either via a local variable, or via an implicit temporary location allocated by the compiler), thereby changing the stack alignment by 4 bytes. Have your tried using the latest 2.3.1 compiler from svn? I fixed the stack alignment bugs on ARM in r13030 (on eabi, you need a stack alignment of 8 bytes, while the compiler only guaranteed 4).

Jonas

Reply by email

Benedikt Schindler
to Jonas Maebe

my last svn update was 13 days ago.
I update my sources and recompile everything. (That will need some time) i give you a status update later.

Beni

Show quoted text 19 lines
On 28 Apr 2009, at 13:48, Benedikt Schindler wrote: [...] All of your workarounds have one thing in common: they cause an extra stack slot to be allocated (either via a local variable, or via an implicit temporary location allocated by the compiler), thereby changing the stack alignment by 4 bytes. Have your tried using the latest 2.3.1 compiler from svn? I fixed the stack alignment bugs on ARM in r13030 (on eabi, you need a stack alignment of 8 bytes, while the compiler only guaranteed 4). Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Benedikt Schindler
to Benedikt Schindler

THX !

Now all my problems just walked away.
What a bugfix for the compiler could do :)

My first test programm is now running without problems on the Openmoko Freerunner device.
@all: thx for the helping in the last 3 weeks.

Beni

Show quoted text 22 lines
my last svn update was 13 days ago. I update my sources and recompile everything. (That will need some time) i give you a status update later. Beni Jonas Maebe schrieb: > > On 28 Apr 2009, at 13:48, Benedikt Schindler wrote: > > [...] > > All of your workarounds have one thing in common: they cause an extra > stack slot to be allocated (either via a local variable, or via an > implicit temporary location allocated by the compiler), thereby > changing the stack alignment by 4 bytes. Have your tried using the > latest 2.3.1 compiler from svn? I fixed the stack alignment bugs on > ARM in r13030 (on eabi, you need a stack alignment of 8 bytes, while > the compiler only guaranteed 4). > > > Jonas

Reply by email

Henry Vermaak
to Benedikt Schindler

2009/4/29 Benedikt Schindler :

Show quoted text 7 lines
THX ! Now all my problems just walked away. What a bugfix  for the compiler could do :) My first test programm is now running without problems on the Openmoko Freerunner device.

good work! see if you can find somewhere on the wiki to put nice photos. arm devices outnumber x86 by a lot nowadays, so this is good news for fpc and lazarus.

henry

Reply by email