forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Variable names in executable

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Rainer



Joined: 13 Mar 2006
Posts: 43

PostPosted: Thu Aug 31, 2006 5:19 am    Post subject: Variable names in executable Reply with quote

Hi,

we are currently working on a security relevant issue, a license check. I've renamed the executable for testing purposes to a text file and opened it, where I found that the variable names from the source code were still in there.
It's not critical, but I've been wondering whether there is a compiler option or some other means to remove from the executable any information about such things as variable names in the source code.

Rainer
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Thu Aug 31, 2006 5:54 am    Post subject: Variable names in executable Reply with quote

Rainer

There is no compiler option of this kind.
Back to top
View user's profile Send private message AIM Address
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Thu Aug 31, 2006 6:29 pm    Post subject: Variable names in executable Reply with quote

I thought that the /debug option placed more source code information in the executable, than if not using /debug. I mostly use /debug as I assumed it placed more information in the program so that if it crashed it gave the line number and source code file name, but at a minimal overhead to performance.
By not using /debug or using /opt, I would have expected that there was less source code information placed in the .exe file. Certainly with these options, if the program crashes, there is not much information available.
Paul, is this the case ?
Could you update us on the compile option levels that control recovery information and optimisation. It is my understanding they range from:
/opt
(nothing)
/debug
/quick_bounds
/check
/undef
/full or /checkmate

I typically only use /check or /debug, depending on a development or production version of the code; as well as always using:
/ERROR_NUMBERS
/IMPLICIT_NONE
/INTL
/LOGL

Regards

John Campbell
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Fri Sep 01, 2006 5:42 am    Post subject: Variable names in executable Reply with quote

John

Yes you are right. I missed this. If you do not use any of the debugging options then the executable apparently shows no evidence of the programmer's identifiers (at least not the internal ones).

The range of debugging options is as you describe with /check implying /debug and so on.

However, /quick_bounds is accepted but has no effect. I will remove it from the help information.

Under normal circumstances /INTL and /LOGL are redundant because this is the default state.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Fri Sep 01, 2006 6:05 am    Post subject: Variable names in executable Reply with quote

/bounds_check works OK.

It does not imply /debug.
It is implied by /check.
Back to top
View user's profile Send private message AIM Address
Rainer



Joined: 13 Mar 2006
Posts: 43

PostPosted: Fri Sep 01, 2006 6:31 am    Post subject: Variable names in executable Reply with quote

Using /opt it seems there is no reference to variable names in the executable anymore. Also, the executable is considerably smaller.
Thanks to both of you. Smile
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Mon Sep 04, 2006 5:32 pm    Post subject: Variable names in executable Reply with quote

Using no option may be better, as /opt implies the optimiser, which can provide some unwanted changes to non-standard code.
Back to top
View user's profile Send private message
Rainer



Joined: 13 Mar 2006
Posts: 43

PostPosted: Tue Sep 05, 2006 6:24 am    Post subject: Variable names in executable Reply with quote

Thanks. I guess I thought like "I want something to happen, so I have to use an option for it." instead of "I want something *not* to happen, so I have to not use an option." Wink
Back to top
View user's profile Send private message
silverfrost
Site Admin


Joined: 29 Nov 2006
Posts: 191
Location: Manchester

PostPosted: Thu Sep 07, 2006 1:56 pm    Post subject: Variable names in executable Reply with quote

A plain compile:

ftn95 test

Will not produce debug information unless you have configured FTN95 to produce it by default (with FTN05 /config). You can see the compiler options in effect by producing a list file:

ftn95 test /list

An executable without debug information will still contain the names of routines and functions. These are required to produce a traceback in the event of a run time error.

It should be noted that .NET is different and a lot more information is contained in the executable.

------------
Administrator
Silverfrost Forums
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group