473,396 Members | 1,866 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,396 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 1704
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...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.