473,378 Members | 1,577 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to debug application built on another machine?

My application crashed (with the "cannot read memory, press OK to
terminate or Cancel to debug" message) on the machine that has VC7.1. I
just copied the original project with pdb file to that machine, opened
the project, pressed Cancel to the above message, and chose this
instance of Visual Studio. But I couldn't step through my code, only
through internal MFC code.

Does anybody knows what am I doing wrong?
Nov 17 '05 #1
8 1703
When the debugger is attached you can see whether it could load the pdb in
the debug output window. It should say something like "symbols loaded" next
to your exe or dll.

"Mihajlo Cvetanović" <ma*@RnEeMtOsVeEt.co.yu> wrote in message
news:uL**************@TK2MSFTNGP09.phx.gbl...
My application crashed (with the "cannot read memory, press OK to
terminate or Cancel to debug" message) on the machine that has VC7.1. I
just copied the original project with pdb file to that machine, opened the
project, pressed Cancel to the above message, and chose this instance of
Visual Studio. But I couldn't step through my code, only through internal
MFC code.

Does anybody knows what am I doing wrong?

Nov 17 '05 #2
When the debugger is attached you can see whether it could load the pdb in
the debug output window. It should say something like "symbols loaded" next
to your exe or dll.

"Mihajlo Cvetanović" <ma*@RnEeMtOsVeEt.co.yu> wrote in message
news:uL**************@TK2MSFTNGP09.phx.gbl...
My application crashed (with the "cannot read memory, press OK to
terminate or Cancel to debug" message) on the machine that has VC7.1. I
just copied the original project with pdb file to that machine, opened the
project, pressed Cancel to the above message, and chose this instance of
Visual Studio. But I couldn't step through my code, only through internal
MFC code.

Does anybody knows what am I doing wrong?

Nov 17 '05 #3
Mihajlo,
My application crashed (with the "cannot read memory, press OK to
terminate or Cancel to debug" message) on the machine that has VC7.1. I
just copied the original project with pdb file to that machine, opened the
project, pressed Cancel to the above message, and chose this instance of
Visual Studio. But I couldn't step through my code, only through internal
MFC code.

Does anybody knows what am I doing wrong?


The debugger is probably not finding the symbols for your libraries. Once
you start debugging, open the Modules Window, and you should see your
exe/dlls in that list. My bet is that they say "symbols not loaded". If so,
you can right click on each one and select "Reload Symbols", which will
bring up a Open File dialog where you can browse for the correct pdb file.

Also, you'll want to load your source files in VS as well.
--
Tomas Restrepo
to****@mvps.org
http://www.winterdom.com/
Nov 17 '05 #4
Mihajlo,
My application crashed (with the "cannot read memory, press OK to
terminate or Cancel to debug" message) on the machine that has VC7.1. I
just copied the original project with pdb file to that machine, opened the
project, pressed Cancel to the above message, and chose this instance of
Visual Studio. But I couldn't step through my code, only through internal
MFC code.

Does anybody knows what am I doing wrong?


The debugger is probably not finding the symbols for your libraries. Once
you start debugging, open the Modules Window, and you should see your
exe/dlls in that list. My bet is that they say "symbols not loaded". If so,
you can right click on each one and select "Reload Symbols", which will
bring up a Open File dialog where you can browse for the correct pdb file.

Also, you'll want to load your source files in VS as well.
--
Tomas Restrepo
to****@mvps.org
http://www.winterdom.com/
Nov 17 '05 #5
Thank you fellows for the useful info, the error was the most obvious
one: the application and the project don't match, with a half an hour
distance.

This only proves the point that whatever job you're trying to rush on
Friday at 9 PM (like debugging the crash on another machine), it can't
come out good.

Saying that, I have another question. Is there a way to force the
debugger to use inappropriate PDB? Granted, it would show the wrong info
in some parts of the code, but it would still be usable in other parts.
Nov 17 '05 #6
Thank you fellows for the useful info, the error was the most obvious
one: the application and the project don't match, with a half an hour
distance.

This only proves the point that whatever job you're trying to rush on
Friday at 9 PM (like debugging the crash on another machine), it can't
come out good.

Saying that, I have another question. Is there a way to force the
debugger to use inappropriate PDB? Granted, it would show the wrong info
in some parts of the code, but it would still be usable in other parts.
Nov 17 '05 #7
Saying that, I have another question. Is there a way to force the
debugger to use inappropriate PDB? Granted, it would show the wrong info
in some parts of the code, but it would still be usable in other parts.


Yes, in many cases it is possible:
http://www.debuginfo.com/articles/de...#loadunmatched

Regards,
Oleg
[VC++ MVP]

Nov 17 '05 #8
Oleg Starodumov wrote:
Saying that, I have another question. Is there a way to force the
debugger to use inappropriate PDB? Granted, it would show the wrong info
in some parts of the code, but it would still be usable in other parts.


Yes, in many cases it is possible:
http://www.debuginfo.com/articles/de...#loadunmatched


That's it, ChkMatch is what I was after (the only better solution is
that the debugger allows debug info mismatch). Thank you for the very
usable 50 kB piece of code.
Nov 17 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: VicVic | last post by:
Dear Great Experts, I have a problem and need your help! We have a Flat DLL built in C++ (CCC), and on top of it, we built another DLL built in C# (SSS), which has .Net Assembly. CCC was...
0
by: Mihajlo Cvetanović | last post by:
My application crashed (with the "cannot read memory, press OK to terminate or Cancel to debug" message) on the machine that has VC7.1. I just copied the original project with pdb file to that...
9
by: Wayne Wengert | last post by:
I built an ASP application and it runs fine on my local IIS. I am trying to move the application to my web service (ISP) out on the internet. I've read several of the help articles but they all...
4
by: bob lambert | last post by:
Help I am trying to deploy to another pc a vb.net std 2002 windows form application. I am confused. I created a project - windows form I built form, compiled and debugged. I created a...
46
by: Ian Boyd | last post by:
IIS5, on a Windows 2000 Server machine. Debeg.WriteLine "Hello, world!" How can i view it?
2
by: Hongbo | last post by:
Hi, I have a web site built in ASP.Net 1.1 running on production server. It's the version 1.0. Now I need to build the version 2.0 for this web site. The version 2.0 will be built based on the...
3
by: Bardo | last post by:
Hi all, We are trying to debug an assembly which was built in debug configuration on our build server. The output window of visual studio indicates that no symbols are being loaded for the...
6
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
11
by: AG | last post by:
Hi all, New install of VS 2005 Pro (SP1) on new machine with Windows XP Pro SP2, Core 2 Extreme Quad Core processor, 4GB RAM. Trying to debug a Web Application Project. I had no problems...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.