There is no debugger for elf binaries in risc os. So the only way is to rely on faults addresses combined with objdump on compiler system and printouts.
Ah, that is unfortunate. In that case we would have to disassemble a c compiler generated example code and compare that against startup code generated by Free Pascal (a simple hello world example would suffice for such a task), that is unless the arm asm (c might perhaps suffice as well) startup code for riscos is listed/documented somewhere. Do you happen to know if that is the case or perhaps you know that code by heart ?
PS: forgot to mention that fpc.pp is actually a frontend to the(actual) compiler which is named pp.pas. I also noticed the mention of swi's somewhere in the source-tree so that seem to be accounted for (needs verification)
Here is a example of a riscos executable in AOF format ( not elf ). Not much going on. OS_GetEnv givs you the commandlne which in turn can be made a list with another swi. This is a assembly written app. If you mix in the clibrary it will be much more complex. But that isn't needed for fpc.
00008000 : E1A00000 : .. á : MOV R0,R0
00008004 : E1A00000 : .. á : MOV R0,R0
00008008 : E1A00000 : .. á : MOV R0,R0
0000800C : EB00001B : ...ë : BL &00008080
00008010 : EF000011 : ...ï : SWI OS_Exit
00008014 : 00000090 : ... : MULEQ R0,R0,R0 ; *** Rd=Rm or Rd=R15
00008018 : 00000000 : .... : ANDEQ R0,R0,R0
0000801C : 00000000 : .... : ANDEQ R0,R0,R0
00008020 : 00000000 : .... : ANDEQ R0,R0,R0
00008024 : 00000000 : .... : ANDEQ R0,R0,R0
00008028 : 00008000 : .€.. : ANDEQ R8,R0,R0
0000802C : 00000000 : .... : ANDEQ R0,R0,R0
00008030 : 00000020 : ... : ANDEQ R0,R0,R0,LSR #32
00008034 : 00000000 : .... : ANDEQ R0,R0,R0
00008038 : 00000000 : .... : ANDEQ R0,R0,R0
0000803C : 00000000 : .... : ANDEQ R0,R0,R0
00008040 : E1A00000 : .. á : MOV R0,R0
00008044 : E04EC00F : .ÀNà : SUB R12,R14,PC
00008048 : E08FC00C : .Àà : ADD R12,PC,R12
0000804C : E99C000F : ..ώ : LDMIB R12,{R0-R3}
00008050 : E24CC010 : .ÀLâ : SUB R12,R12,#&10 ; =16
00008054 : E59C2030 : 0 ό : LDR R2,[R12,#48]
00008058 : E3120C01 : ...ã : TST R2,#&0100 ; =256
0000805C : 159CC034 : 4Àœ. : LDRNE R12,[R12,#52]
00008060 : 008CC000 : .ÀŒ. : ADDEQ R12,R12,R0
00008064 : E08CC001 : .ÀŒà : ADD R12,R12,R1
00008068 : E3A00000 : .. ã : MOV R0,#0
0000806C : E3530000 : ..Sã : CMP R3,#0
00008070 : D1A0F00E : .ð Ñ : MOVLE PC,R14
00008074 : E48C0004 : ..Ί : STR R0,[R12],#4
00008078 : E2533004 : .0Sâ : SUBS R3,R3,#4
0000807C : EAFFFFFB : ûÿÿê : B &00008070
00008080 : EF000010 : ...ï : SWI OS_GetEnv
00008084 : E1A0D001 : .Ð á : MOV R13,R1
00008088 : EF000002 : ...ï : SWI OS_Write0
0000808C : EF000011 : ...ï : SWI OS_Exit