Solved

Is it safe to generate debug info for Release Configuration

Posted on 2002-04-25
14
269 Views
Last Modified: 2012-06-27
Hi,

My application has included exception handler and call stackwalk() if crashed.  To see which line have caused the crash, I do this on the project: in Linker option, I have turned on debug info for Mircosoft Format and in Compiler option, I have set debug info for line numbers only.  I would like to know that

a) Is it safe if I distribute my application exe together with the pdb file?  Will somebody make use the pdb to hack the app, although with line-numbers only?

b) Will it help if I only distribute exe file without pdb file (but with both of the above options on)?  I hope that the options only append link info to the exe and without pdb it is useless.  Am I right?

Regards
0
Comment
Question by:lsmgms
  • 7
  • 6
14 Comments
 
LVL 3

Expert Comment

by:job_s
Comment Utility
It's not safe to give pdb with exe .
U can write the stack walk result to a log file.
using that log file try to find out the case.

I think better method is this.
regards
job_s
0
 
LVL 1

Author Comment

by:lsmgms
Comment Utility
Hi,

>> It's not safe to give pdb with exe
Even if the pdb only carries line info?  What are the info that can be harmful?

>> U can write the stack walk result to a log file
Yes, I did that but without the pdb I cannot show line number.

regards
0
 
LVL 3

Expert Comment

by:job_s
Comment Utility
> Even if the pdb only carries line info?  What are the
> info that can be harmful?

OK PDB contains only line info.But if ur building exe with debug information. It will be dangerous. Can reproduce the source using the debug information and pdb.


>> U can write the stack walk result to a log file
>>Yes, I did that but without the pdb I cannot show line >>number.

If ur keeping versioning correcly U can find the information using that data.






0
 
LVL 1

Author Comment

by:lsmgms
Comment Utility
>> But if ur building exe with debug information. It will be dangerous

How about if I just compile exe with debug info without distributing PDB?

>> If ur keeping versioning correcly U can find the information using that data.
Sorry, not quite understand.
0
 
LVL 3

Expert Comment

by:job_s
Comment Utility
>How about if I just compile exe with debug info without >distributing PDB?
I think no problem on compiling with debug info. But the size of exe will increase.

>> If ur keeping versioning correcly U can find the >>information using that data.

If U can identify one exe by build number or version.

When distributing the exe u can keep the PDB corresponding that exe for a backup.

when any problem reporting from the client, U can can check the log for the build number and find the corresponding PDB. Using that pdb, exe, and needed DLLs U can find the exact line. Where the probelm occuring.









0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
This question is current, but I have updated all of your open items with this script to bring them to your attention.  ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101, Netminder or Mindphaser will return to finalize these if they are still open in 7 days.  Experts, please post closing recommendations before that time.

Below are your open questions as of today.  Questions which have been inactive for 21 days or longer are considered to be abandoned and for those, your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20066769.html
http://www.experts-exchange.com/questions/Q.20250605.html
http://www.experts-exchange.com/questions/Q.20287272.html
http://www.experts-exchange.com/questions/Q.20290383.html
http://www.experts-exchange.com/questions/Q.20292086.html
http://www.experts-exchange.com/questions/Q.20293822.html



*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations.
If you are interested in the cleanup effort, please click this link
http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
POINTS FOR EXPERTS awaiting comments are listed in the link below
http://www.experts-exchange.com/commspt/Q.20277028.html
 
Moderators will finalize this question if in @7 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
 
Thanks everyone.
Moondancer
Moderator @ Experts Exchange
0
 
LVL 1

Author Comment

by:lsmgms
Comment Utility
>> when any problem reporting from the client, U can can check the log for the build number and find the
corresponding PDB. Using that pdb, exe, and needed DLLs U can find the exact line. Where the probelm
occuring.

In that case, how do I match the log file with pdb?  My log is about like this:

Registers:
EAX=00000000  EBX=00000001  ECX=000000C8  EDX=004B1730  ESI=00000000
EDI=00000000  EBP=03EDFFB8  ESP=03EDED4C  EIP=00406CD5  FLG=00010246
CS=001B       DS=0023       SS=0023       ES=0023       FS=0038       GS=0000

Stack:
ProgCtr  Param1   Param2   Param3   Param4   ReturnAd FramePtr
00406CD5 00000000 00000001 00000000 00000000 77F04EDE 03EDFFB8 test
77F04EDE 00406880 00000000 000000B0 00000000 00000000 03EDFFEC KERNEL32, lstrcmpiW(+190 bytes)


regards
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 3

Expert Comment

by:job_s
Comment Utility
This link is realy help full.
Download the code provided on this page.


http://www.microsoft.com/msj/defaultframe.asp?
page=/msj/0498/bugslayer0498.htm&nav=/msj/0498/newnav.htm


regards
job_s
0
 
LVL 3

Accepted Solution

by:
job_s earned 50 total points
Comment Utility
This link is realy help full.
Download the code provided on this page.


http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0498/bugslayer0498.htm&nav=/msj/0498/newnav.htm


regards
job_s
0
 
LVL 1

Author Comment

by:lsmgms
Comment Utility
I have came accross these links before and studied the source code.  The point is, I still need PDB when crash occured, am I right?

regards
0
 
LVL 3

Expert Comment

by:job_s
Comment Utility
No need to supply pdb to client.

Only need to collect the log from the client and using the version number u can identify the exe and use corrsponding pdb to find out the source line.

0
 
LVL 1

Author Comment

by:lsmgms
Comment Utility
Do you mean using CrashFinder?  Unfortunately when I try to run it, it always trigger Assertion Failed when I open a new project.  I suspect I use the wrong ImageHlp.dll which I copied from WIN2K.
0
 
LVL 3

Expert Comment

by:job_s
Comment Utility
Which OS ur using ?
0
 
LVL 1

Author Comment

by:lsmgms
Comment Utility
Thanks for your help.  I already contacted with John Robbins about problem.  The latest version of CrashFinder http://www.wintellect.com/about/instructors/robbins/code.asp does not have this problem.  I still have some little queations such as why the exe has increased by another 200K and will this extra 200K causing the program hackable.  However, I think you have given me enough help on this question.  Thanks again.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

771 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

16 Experts available now in Live!

Get 1:1 Help Now