Sign in Join

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

Mailing lists / fpc-pascal / 2008-02

arm-linux, no bus error on misaligned data access

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Bernd Mueller

Hello,

my ARM-Linux board seems to be resistant against bus errors/misaligned data access or the compiler does some magic to prevent these ;-)

It would help me, to debug a program, when my board would abort with an error message, so that I can isolate the bug.
Does someone know, if there exists something like a Linux option do disable/enable data aborts?

Regards, Bernd.

Daniël Mantione
to Bernd Mueller

Op Tue, 26 Feb 2008, schreef Bernd Mueller:

Hello, my ARM-Linux board seems to be resistant against bus errors/misaligned data access or the compiler does some magic to prevent these ;-)

Yes, the kernel "fixes" the unaligned access.

It would help me, to debug a program, when my board would abort with an error message, so that I can isolate the bug. Does someone know, if there exists something like a Linux option do disable/enable data aborts?

Yes, if you want signals, do:

echo 4 > /proc/cpu/alignment

... and your program should abort at any unaligned access.

Daniël

Bernd Mueller
to Daniël Mantione
Daniël Mantione wrote
echo 4 > /proc/cpu/alignment ... and your program should abort at any unaligned access.

Daniël, thank you very much.

Regards, Bernd.