Personal Debugging/Error code

This is a discussion on Personal Debugging/Error code within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I thought I'd asked this question before, but I cant find in so maybe I'm hallucinating again... I've been working ...

  1. #1
    Peace
    Join Date
    Aug 2001
    Posts
    1,510

    Personal Debugging/Error code

    I thought I'd asked this question before, but I cant find in so maybe I'm hallucinating again...

    I've been working lately on error trapping/handling/prevention applications for use with any application. I'm not a huge fan of the debugger. When something goes wrong, I dont feel like hunting it down, I want a detailed list of data pertaining to just what went wrong, dumped to file.

    So; I've written all my own memory handling routines that safely allocate and dealloc memory. It checks for leaks and reports the location in the source of allocation, it reports shady use of the memory and the location in the source, and refuses to allow use of pointers to bad memory.

    I also have an extensive error class which the programmer can use to track bugs, report errors, log data, etc. All of this is dumped to file to be checked out if a crash occures.

    So what I'm wondering is; How many people out there are using their own custom error handling classes? What interesting ideas are floating around? I think we'd all benefit from a little sharing . I'm willing to put up my error handling routines for general use if enough people are interested. I want to know what you all use.
    "There's always another way"
    -lightatdawn (lightatdawn.cprogramming.com)

  2. #2
    Registered User
    Join Date
    Jun 2003
    Posts
    85
    sounds like a great idea but i dont know much about it. are you writing your routines in Assembly? C? and how are you going about trapping errors?
    Medical Robotics: "Pursuing perfection in healthcare through innovations in robotics and information technologies for medicine and surgery."

  3. #3
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    hmm...if you've figured out what data is leaking etc (it seems as you have) I think the next step would be a graphical representation of the memory dump. So in the text file, for every byte or word or however you want to do it write a ' . ' Then for every peice of memory your app allocates, write an ' x '. That way you can easily see where the memory is going and figure out for instance why pointers are crashing the program etc. I haven't programmed on the pc for a few months otherwise i'd come up with something, im basically laying low until my embedded project starts. But yeah, that's just an idea.


    BTW: I forgot to mention that the program should write that to the text file, my explanation probably wasnt all that clear
    Last edited by Waldo2k2; 08-04-2003 at 02:57 PM.
    PHP and XML
    Let's talk about SAX

  4. #4
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    have you ever heard of a little piece of software called BoundsChecker? It was made by Numega and its job is primarily to catch errors while you're debugging. Memory leaks, reading uninitialized memory, etc. It has been an invaluable tool that I would suggest to anyone who is developing. Anyway, it would eliminate the need for a code-based method.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. writing a personal firewall
    By cyber_tech in forum C Programming
    Replies: 5
    Last Post: 10-09-2007, 03:54 PM
  2. New personal record
    By VirtualAce in forum Windows Programming
    Replies: 2
    Last Post: 04-10-2005, 09:21 PM
  3. Personal People Finder
    By Coder87C in forum C++ Programming
    Replies: 1
    Last Post: 02-12-2005, 04:26 PM
  4. Webspace (not personal FTP space)
    By Silvercord in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 05-23-2003, 07:12 PM
  5. Personal messages disabled temporarily
    By webmaster in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 08-11-2001, 07:25 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21