From: | Steffen Haeuser |
Date: | 18 Aug 2001 at 15:22:02 |
Subject: | Re: fstream and ppc-amigaos-g++ |
Hi!
> This sort of debugging is beyond me I`m afraid. I`ve attached the warpcrash
> that I get. Also the source that caused it and the makefile that made the
> exe.
Well, it is quite easy and simplifies things a lot:
1. Install segtracker (put the line "segtracker" in the line in your
startup-sequence AFTER the setpatch)
2. After a reboot let the program crash
3. Now look at the Crash requester. Somewhere there you find the value
of the "LR" register. Now you give this value as a parameter to the
program memowner (you can get it from me, if you do not have
memowner). It will list you the task name of the task which crashed,
and a Hunk and Offset.
Like this:
PowerPC Data access exception (load operation)
Memory protection violation - Access to 00000000
The excepting instruction is located at 09C7FD94
Task name: 'MyTask_PPC9' Task address: 090D0C70 Task ID: 102
SRR0: 09C7FD94 SRR1: 0000F070 MSR: 00003040 HID0: 0000C084
PVR: 00090204 DAR: 00000000 DSISR: 08000000 SDR1: 0920001F
DEC: 000089F3 TBU: 00000000 TBL: 1BA897D3 XER: 20000000
CR: 80084448 FPSCR: 82062000 LR: 09C7E554 CTR: 09C7FD5C
R0-R3: 096F34C8 096F33E0 090D1128 00000025 IBAT0: E0001FFF E0000022
In this case you would type:
15.System3.1:> memowner 0x09C7E554
Address - Owner
-------- -----
09C7E554 - in SegList of MyTask Hunk 0002 Offset 0000754c
09C7E554 - in SegList of Process 0x09105000: Background CLI (MyTask)
Now you would do:
pobjdump -d --start-address=0x754c MyTask.elf
Note: You have to use the name of the ELF file here, not the program file !!!
Owners of StormC have it even easier... instead of using memowner they
use sushi, and get a complete stack trace with already calculated Hunk/Offset addresses. And instead of pobjdump they use FindHit and they even get the source code line which caused the crash (while pobjdump only gets an offset into the ASM-Output of the function which crashed, but sometimes even this is some help...). Of course in the case of StormC not
an ELF object is used (as there are no ELF object for StormC which directly
outputs Amiga Hunk format), but for gcc-WarpUP you have to use the ELF.
Note that I sometimes uploaded a tool named "checkstack" to Aminet which also does a complete stacktrace (with the help of memowner though, you
still have to call memowner manually then) for gcc-WarpUP. Ah, for checkstack you use the r1 register, not the LR (LR is the address of the
function which CALLED the crashed function, while r1 points to the CURRENT stackframe).
You can also use sushi for gcc-WarpUP programs, but in this case only the FIRST entry is valid, due to gcc-WarpUP using a different ABI.
If there are still questions I suggest to use private email. This technical discussion is probably not interesting to most people on this list.
Steffen
_______________________________________________________________________
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
IhrName@web.de, 8MB Speicher, Verschluesselung - http://freemail.web.de