Archived

This topic is now archived and is closed to further replies.

Krakken

My Error Logging

Recommended Posts

Krakken    122
Hi, I have just finished a small error logging system and it''s quite nifty. The only problem is, it only shows what it was attempting and at what time. Are there any other useful variables as such that I can also log to help me when coming back to debug? Anything will help such as the memory address or whatever. The more I can log about the occurence the better I will be able to debug it. Thanks, Nat.

Share this post


Link to post
Share on other sites
EL    122
Well, I can't think of anything else. Maybe you could include errors you catch or throw or something (if you are one of the few people who does that )

[edited by - EL on August 8, 2003 3:02:17 PM]

Share this post


Link to post
Share on other sites
Krakken    122
Thanks for those. The only problem is I wanted to do it from within the logging class. Those are preprocessor macros right? Is there any way to get maybe a small memory dump of the current execution? I can understand it being fairly advanced but I am willing to learn.

Seriously, ANY extra information that I can include will help me in the long run.

Share this post


Link to post
Share on other sites
Malone1234    139
You should be able to dump the current state of the stack (in the function you are in), perhaps use some inline assembly code to keep track of the stack pointer? For instance, always keep a variable that holds the difference between the stack pointer for the entry point of the current function and the entry point of the calling function. I''m no expert myself so I''m not entirely sure how to do this, or if it can be done.

Share this post


Link to post
Share on other sites