Link to home
Start Free TrialLog in
Avatar of lsmgms
lsmgms

asked on

Is it safe to generate debug info for Release Configuration

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
Avatar of job_s
job_s

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
Avatar of lsmgms

ASKER

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
> 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.






Avatar of lsmgms

ASKER

>> 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.
>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.









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.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  https://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.
https://www.experts-exchange.com/questions/Q.20066769.html
https://www.experts-exchange.com/questions/Q.20250605.html
https://www.experts-exchange.com/questions/Q.20287272.html
https://www.experts-exchange.com/questions/Q.20290383.html
https://www.experts-exchange.com/questions/Q.20292086.html
https://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
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643 
POINTS FOR EXPERTS awaiting comments are listed in the link below
https://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
Avatar of lsmgms

ASKER

>> 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
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
ASKER CERTIFIED SOLUTION
Avatar of job_s
job_s

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lsmgms

ASKER

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
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.

Avatar of lsmgms

ASKER

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.
Which OS ur using ?
Avatar of lsmgms

ASKER

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.