Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Strip filename and line number info
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John McFarland  
View profile  
 More options Nov 4, 1:22 pm
From: John McFarland <john.mcfarl...@swri.org>
Date: Wed, 4 Nov 2009 10:22:48 -0800 (PST)
Local: Wed, Nov 4 2009 1:22 pm
Subject: Strip filename and line number info
Is there a compiler flag that will remove all filename and line number
information from the compiled executable?  The example program below
illustrates how at runtime, the filename and line number associated
with the error get written to the screen:

=====fprog.f90=======
PROGRAM fprog
  INTEGER :: i, j
  PRINT*, 'starting prog'
  WRITE(*,'(F5.2,A5)') i, j
END PROGRAM fprog
==================

Output from running program:

 starting prog
At line 4 of file fprog.f90 (Unit 6)
Traceback: not available, compile with -ftrace=frame or -ftrace=full
Fortran runtime error: Expected REAL for item 1 in formatted transfer,
got INTEGER
(F5.2,A5)
 ^

I have tried -s and -g0, but no luck, the source code info still gets
written.

Thanks.
John


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Edouard  
View profile  
 More options Nov 5, 2:09 am
From: Edouard <Edouard.Ca...@irisa.fr>
Date: Wed, 4 Nov 2009 23:09:22 -0800 (PST)
Local: Thurs, Nov 5 2009 2:09 am
Subject: Re: Strip filename and line number info
Strange, usually, people prefer to get useful information from the
compiler
when a run-time error occurs... (BTW, I can give you some compiler
vendor
whom error messages are very unclear ;-).

I think that the '-s' flag you used remove only the symbol names out
of the
executable file. '(F5.2,A5)' is not a symbol, it is a format string
and the
compiler must keep it embedded in the executable file.

Regards,
Édouard

On Nov 4, 7:22 pm, John McFarland <john.mcfarl...@swri.org> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Beliavsky  
View profile  
 More options Nov 5, 8:15 am
From: Beliavsky <beliav...@aol.com>
Date: Thu, 5 Nov 2009 05:15:59 -0800 (PST)
Local: Thurs, Nov 5 2009 8:15 am
Subject: Re: Strip filename and line number info
On Nov 5, 2:09 am, Edouard <Edouard.Ca...@irisa.fr> wrote:

> Strange, usually, people prefer to get useful information from the
> compiler
> when a run-time error occurs... (BTW, I can give you some compiler
> vendor
> whom error messages are very unclear ;-).

Sure, but in a program one distributes to others, one may want to
conceal such information -- even perhaps that the program is written
in the dreaded FORTRAN language .

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John McFarland  
View profile  
 More options Nov 5, 9:32 am
From: John McFarland <john.mcfarl...@swri.org>
Date: Thu, 5 Nov 2009 06:32:12 -0800 (PST)
Local: Thurs, Nov 5 2009 9:32 am
Subject: Re: Strip filename and line number info
The error messages are very useful for debugging, but I need a way to
turn them off when we distribute the software.  In the rare(?) case of
a user experiencing a runtime error, it's unacceptable for our program
to write out source code filename (with full path in some cases!) and
line number information.  We already have one case of a user getting
such an error message and then coming back to ask us "I can't find
the /full/path/to/source/code/file on my system, is it possible
something isn't installed as it should be?"

On Nov 5, 7:15 am, Beliavsky <beliav...@aol.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google