Page 1 of 1

How to debug c++ codes?

Posted: Sun Jun 21, 2009 3:20 pm
by Matrix7
Thanks for your your tutorial!
I am following this tutorial, and i am in tutorial 14 now.
We use c++, but how to debug c++ codes?

Re: How to debug c++ codes?

Posted: Sun Jun 21, 2009 10:37 pm
by Tubash88
You should follow this tutorial of how to setup the Kernel with C++ for debuging.

http://www.brokenthorn.com/Resources/OSDevMSVC.html

I tried using MSVC08 but I had error while compiling, I changed to MSVC05 and Everything works better now.

:D

Re: How to debug c++ codes?

Posted: Thu Jun 25, 2009 6:44 am
by Matrix7
Tubash88 wrote:You should follow this tutorial of how to setup the Kernel with C++ for debuging.

http://www.brokenthorn.com/Resources/OSDevMSVC.html

I tried using MSVC08 but I had error while compiling, I changed to MSVC05 and Everything works better now.

:D


I'm using MSVC08 and it works very well. I want to debug c++ codes not compiling. The tutorial just help us to compile the codes but we can not debug it!

Re: How to debug c++ codes?

Posted: Thu Jun 25, 2009 8:30 am
by Andyhhp
It is not possible to use step-through debugging on your kernel.

What the tutorials mean by debugging at this stage is excess printf statements around the suspect bit of code to see exactly what is going on

If you NEED step through debugging, Bochs has a commandline debugging mode that you can try and use.

~Andrew

Re: How to debug c++ codes?

Posted: Thu Jun 25, 2009 11:03 am
by Matrix7
Andyhhp wrote:It is not possible to use step-through debugging on your kernel.

What the tutorials mean by debugging at this stage is excess printf statements around the suspect bit of code to see exactly what is going on

If you NEED step through debugging, Bochs has a commandline debugging mode that you can try and use.

~Andrew


Thanks!