How to debug c++ codes?

OS Design, Theory, and Programming

Moderator: Moderators

How to debug c++ codes?

Postby Matrix7 » Sun Jun 21, 2009 3:20 pm

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?
Matrix7
 
Posts: 8
Joined: Sat Apr 25, 2009 6:11 pm

Re: How to debug c++ codes?

Postby Tubash88 » Sun Jun 21, 2009 10:37 pm

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
Tubash88
 
Posts: 5
Joined: Sat Jun 20, 2009 2:09 pm
Location: USA, San Diego

Re: How to debug c++ codes?

Postby Matrix7 » Thu Jun 25, 2009 6:44 am

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!
Matrix7
 
Posts: 8
Joined: Sat Apr 25, 2009 6:11 pm

Re: How to debug c++ codes?

Postby Andyhhp » Thu Jun 25, 2009 8:30 am

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
Image
Andyhhp
Moderator
 
Posts: 387
Joined: Tue Oct 23, 2007 10:05 am
Location: 127.0.0.1

Re: How to debug c++ codes?

Postby Matrix7 » Thu Jun 25, 2009 11:03 am

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!
Matrix7
 
Posts: 8
Joined: Sat Apr 25, 2009 6:11 pm


Return to Advanced OS Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron