![]() |
| | #1 |
| Registered User Join Date: Aug 2009
Posts: 17
| I can trying to figure out how to write a simple debugger for windows. The goal would be to execute a program using CreateProcess() (or if there is something better please let me know), if the program has any bugs which allow us to make it crash (don't all applications have bugs, hence we need debuggers haha) then it would catch the crash and output debugging info such as first chance/second chance, all extended registers values (ebx=, esi for pointers, etc), and if the crash was an access violation, stack overflow, things of that nature. Then, for a bonus, kill the process. Understand? I have been scouring the internet for a simple example of a this FOREVER and haven't found anything that would get me running and working code.. I found this but I can't seem to put it together and make it do all that I would like. Anybody got any shiny, bright ideas? ![]() Thanks!!! |
| lonnieh is offline | |
| | #2 |
| Registered User Join Date: Dec 2006
Posts: 1,780
| How about reading the GDB source? |
| cyberfish is offline | |
| | #3 |
| Registered User Join Date: Aug 2009
Posts: 17
| Assuming there is a windows port of GDB... cause from what I see its mainly a GNU/Linux application. Besides that, anything? |
| lonnieh is offline | |
| | #4 | |
| subminimalist Join Date: Jul 2008 Location: NYC
Posts: 3,944
| Of course there is! You are going to have to use your mind and fingers with a little more enthusiasm if you want to pull this off. It only took me ONE google to get this: GDB on Windows Altho I doubt this works quite the way you are hoping! Anyway, keep in mind that this Quote:
Unless you do some interesting and unique work
__________________ Accuracy and integrity mean nothing if you don't make it past the censors...PYTHAGORAS | |
| MK27 is offline | |
| | #5 |
| Registered User Join Date: Aug 2009
Posts: 17
| I was rather asking of an example of a simple debugger, rather than trying to decipher through GDB's source code and piecing it together from there. But I am looking at it as we speak, but if anyone knows of any simpler codes I can see or how the achieve the aforementioned a goals, please let me know. |
| lonnieh is offline | |
| | #6 | |
| Super Moderator Join Date: Aug 2001
Posts: 7,472
| Quote:
__________________ If you aim at everything you will hit something but you won't know what it is. | |
| Bubba is offline | |
| | #7 |
| Registered User Join Date: Aug 2009
Posts: 17
| I am not looking into writing a fully featured debugger. As stated previously, my goals are: 1) Create a process 2) Catch any faults or crashes it may encounter during runtime 2.1) If It encounters a fault or crash, output debugging info 2.2) If operations are normal, goto 3 3) Kill the process One would think that may be simpler than a fully featured debugger. Thanks! |
| lonnieh is offline | |
![]() |
| Tags |
| debug, debugger, debugging, win32, windows |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dev-C++: Problems with Breakpoint Debugging | Thileepan_Bala | C Programming | 1 | 01-17-2008 10:48 AM |
| Debugging book recommendation | dagans | Projects and Job Recruitment | 1 | 09-13-2005 07:35 PM |
| Win32 API or Win32 SDK? | jverkoey | General Discussions | 2 | 07-20-2005 03:26 PM |
| tools for debugging win32 | underthesun | Windows Programming | 4 | 02-03-2005 06:52 AM |
| OLE Clipboard :: Win32 API vs. MFC | kuphryn | Windows Programming | 3 | 08-11-2002 05:57 PM |