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

Re: [MiNT] Identify current process in exception handler?



W dniu 02.10.2011 18:00, Peter Persson pisze:
True
2 okt 2011 kl. 17:49 skrev Ole Loots:

Hello,

Sorry for top posting.
What about comparing exception location (one can get that from exception handler, right?) with the base page area of your process? If it falls into the region of your process basepage, it's yer process, isn't it? Don't know any other way - which means nothing :)

True, that could be one way of doing it. As long as I don't build more code in allocated memory that could work, I guess. It also means I can rule out exceptions invoked by OS components (VDI, kernel, BIOS etc).

It's the best one so far. It seems I can get the PID of the running process, but my impression is that this won't help my case since I can't determine if the call was actually made by the process itself or by some subsystem.

If you do that from inside of FreeMiNT kernel, I think it could be possible to get find it somewhere...

Care to elaborate what do you want to ahieve? Sounds like a nasty hack yo're trying to pull...

AdamK