Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / July 2005

Tip: Looking for answers? Try searching our database.

How to debug application built on another machine?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mihajlo Cvetanović - 08 Jul 2005 20:19 GMT
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?
Gabest - 09 Jul 2005 01:04 GMT
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.

> 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
[quoted text clipped - 4 lines]
>
> Does anybody knows what am I doing wrong?
Tomas Restrepo (MVP) - 09 Jul 2005 05:45 GMT
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
[quoted text clipped - 4 lines]
>
> 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.

Signature

Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/

Mihajlo Cvetanović - 11 Jul 2005 09:44 GMT
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.
Oleg Starodumov - 13 Jul 2005 09:06 GMT
> 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/debuginfomatch.html#loadunmatched

Regards,
Oleg
[VC++ MVP]
Mihajlo Cvetanović - 13 Jul 2005 10:32 GMT
>>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/debuginfomatch.html#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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.