[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Determining signal context



Hello,

I'm just wondering whether there is a clean and "official" way under
MiNT (apart from hooking into the appropriate 68000 vectors) to
determine the context in which a signal handler was called.

The reason I'm asking this, is that I just try to add simple traceback
routine to a program, which gives my an annotated stack traceback in
case of fatal error (like SIGBUS or SIGSEGV). To do this I need to
determine the stack pointer and program counter where the program
failed.

Looking into the MiNT documentation the only way to do this seems to
be using the process filesystem. However the only way getting this to
work is to fork a new thread (using Pexec mode 104), which runs a
process that traces its parent and just waits for SIGCHLDs from its
parent (sic!) and extracts the appropriate information from the
parent's context.

However this seems looks to me like some considerable overkill, so I
was just wondering whether there should be some easier way to achieve
this ... (Remember the old pre-MiNT days when you would just hook into
the vector? :-)

Regards Wolfgang

---
Wolfgang Lux				(Standard Disclaimer :-)

WZH Heidelberg, IBM Germany             Internet: lux@heidelbg.ibm.com
+49-6221-59-4546			VNET:     LUX at HEIDELBG
+49-6221-59-3300 (fax)			EARN:     LUX at DHDIBMIP