Solved

Opening a PDB ( C++ Program Data Base )

Posted on 2004-05-01
10
4,158 Views
Last Modified: 2007-12-19
I am looking for a tool to open and view the contents of a PDB file. ( Preferrably not the C++ product itself ).
0
Comment
Question by:greatscott
  • 5
  • 4
10 Comments
 
LVL 19

Expert Comment

by:mrwad99
Comment Utility
You could always use notepad (drag and drop) but I think you are after something a little more advanced....
0
 

Author Comment

by:greatscott
Comment Utility
I am looking for something more sophisticated. Just to confirm: a PDB file contains program source code?
0
 
LVL 19

Expert Comment

by:mrwad99
Comment Utility
A PDB file contains debug information only; as far as I know it does not contain source code.  You will not find anything useful there as far as I know.
0
 

Author Comment

by:greatscott
Comment Utility
Then perhaps I am going down the wrong road. What does contain source code for C++ in Visual Studio?
0
 
LVL 19

Expert Comment

by:mrwad99
Comment Utility
.cpp and .h files.....
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 2

Expert Comment

by:anupvijay
Comment Utility
If you mean the source code in binary after compilation.....then they would be in .obj files.
But you can't open it in notepad or any editor (u can in hex editors!).

What is that you actually are looking for ?
A few more details please.....

Cheers.
0
 

Author Comment

by:greatscott
Comment Utility
I am looking to find source code files for C++. The PDB files have a header: Microsoft C/C++ MSF 7.00. So I'm looking for the source code. I'm looking for confirmation that the source code isn't in the PDB files. As I understand it, source code for C++ from Micorosoft is in .CPP and .H files.
0
 
LVL 19

Expert Comment

by:mrwad99
Comment Utility
>> But you can't open it in notepad or any editor (u can in hex editors!).

You can open *any* file within notepad, as long as security allows it and it is not in use or protected in some way.  Doing so to an object file will not produce meaningful results, but you can still see what is in it..

The pdb file does contain some elements of source code, but it is that mangled that it will not be of any real use I would imagine.  Just open one in notepad and see.

Either way, if you are looking to get complete source code for a piece of software from a pdb file, put simply it is just not going to happen.  Best way to go is to get the source code itself :)
0
 

Author Comment

by:greatscott
Comment Utility
Thanks. Can you confirm that the header: "Microsoft C/C++ MSF 7.00" validates that the product was compiled in C? or could the VB compiler use that header in PDB files as well?
0
 
LVL 19

Accepted Solution

by:
mrwad99 earned 50 total points
Comment Utility
I would imagine so.  I would not imagine that a VB compiler would add that to a pdb file; it would not make sense.  Read more about pdb files at http://www.jorgon.freeserve.co.uk/Other/pdb.htm
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now