|
|
#1 |
|
Exception Handling
I've done lots of searching on this, but haven't found what I needed. I'm trying to write an exception handler for MacOSX, but all I've found information on is std::exception and some really obscure examples on NSException.
What I need is have the exact memory location (or should I say, the value of the EIP or RIP register) and the value of the x86 registers when the exception occurs as well as the exception code. Maybe this functionality isn't available on MacOSX, but this is what I've gotten used to using on Windows (yeah, I'm spoiled). Am I missing something? Thanks. Shogun. |
|
|
|
0
|
|
|
#2 | |
|
Quote:
If you are talking about exceptions, you'll never see and you'll never need to see any processor registers. Read up about try / catch / throw in C++ and @trye etc. in Objective-C. |
||
|
|
0
|
|
|
#3 |
|
My understanding is that exception handling is rarely done in Obj-C, because far fewer things throw exceptions (instead they do things like return null. 0, -1, or an enum value labeled exception.)
Exception handling leads to messy, hard to follow code that runs (relatively) slow. |
|
|
|
0
|
|
|
#4 | |
|
Quote:
|
||
|
|
0
|
|
|
#5 |
|
I understand how try, catch and throw work, but now that I look a bit deeper into the issue, Microsoft just has a special feature that allows the user to retain the values of the entire register set as well as the complete call stack, which is not part of standard exception handling.
|
|
|
|
0
|
|
|
#6 |
|
|
0
|
|
|
#7 | |
|
Quote:
|
||
|
|
0
|
|
|
#8 |
|
Perhaps a better explanation as to your goals are.
My question is why you think you need this information? What do you "think" you need it? Are you doing user space programming or system (kernel) level programming? |
|
|
|
0
|
|
|
#9 | ||
|
Quote:
Since my goal is to use static-rec (or a variant of it at least), I'm required to use the host machine's CPU to a certain degree, and when debugging, obtaining the value of the CPU registers upon an exception occurrence is absolutely necessary. Quote:
See above, please. |
|||
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 06:31 AM.







Linear Mode
