Board index » cppbuilder » Debugging using MAP file

Debugging using MAP file


2005-03-24 10:38:31 PM
cppbuilder59
Hello!
Can anyone tell me how to debug a project using the project's MAP file?
I have a project which sometimes crashes when running stand-alone.
I get an access violation popup with an address when this occurs.
I have googled for hours but only found info about this using MS's MAP
files. As I have understood, Borland MAP files are a bit different.
As a test, I have intentionally written a faulty code line in a function
so that I know where the application crashes. But the function where the
faulty code was inserted, can only be found in the MAP file at an
address far away from the one I got from the access violation popup.
The Preferred load address ($400000) and the PE address ($1000) has been
subtracted.
Please, can anoyone tell me how to do it?
//Hakan
 
 

Re:Debugging using MAP file

I would suggest you compile your project with full DEBUG and CodeGuard
enabled (or at least with DEBUG).
With the above, you can use the "Go to address..." to find where your
problem is. Of course, this may land you in the machine code view, but from
there you can trace into a source code. You may even get lucky and switch
directly into a source view.
In addition, you can also view the content of your stack to locate you
problem.
Hope this helps
Jeff www.ruamkwamkid.com
"Håkan Andersson" < XXXX@XXXXX.COM >wrote in message
Quote
Hello!

Can anyone tell me how to debug a project using the project's MAP file?

I have a project which sometimes crashes when running stand-alone.
I get an access violation popup with an address when this occurs.

I have googled for hours but only found info about this using MS's MAP
files. As I have understood, Borland MAP files are a bit different.

As a test, I have intentionally written a faulty code line in a function
so that I know where the application crashes. But the function where the
faulty code was inserted, can only be found in the MAP file at an address
far away from the one I got from the access violation popup.

The Preferred load address ($400000) and the PE address ($1000) has been
subtracted.

Please, can anoyone tell me how to do it?

//Hakan