Re: readelf utility concatenates underscores to fortran variables with underscores

From: Scott Lurndal (scott_at_slp53.sl.home)
Date: 02/08/04


Date: Sun, 08 Feb 2004 16:40:12 GMT

clusardi2k@aol.com (Christopher M. Lusardi) writes:
>scott@slp53.sl.home (Scott Lurndal) wrote in message news:<mXRUb.20986$6W3.15983@newssvr27.news.prodigy.com>...
>> clusardi2k@aol.com (Christopher M. Lusardi) writes:
>> >Hello,
>> >
>> >C File test.f
>> >
>> > program main
>> > integer test1
>> > integer test_10
>> > common /test/ test1,test_10
>> > end
>> >
>> >C compile :
>> >C f77 -g test.f
>> >
>> > When I do readelf -w --debug-dump=info a.out, and look at the ouput. All my
>> >Fortran common variables containing at least 1 underscore get converted into
>> >having 2 extra underscores in the output. Is there any way that I can prevent
>> >readelf from adding the additional underscores?
>>
>> Readelf is _not_ adding the extra underscores. The compiler is. Why does it
>> matter to you?
>>
>> scott
>
>I'm creating a debugger program, and I was hoping to make my program more
>portable. Anyway, I can force my program to look for a trailing "__" and a "_"
>before that and then strip off the "__". I'll do this unless you can suggest
>a better way to do this.
>
>Christopher Lusardi

For reasons such as the above, debuggers are generally specific to the
compiler suite which generates the object code being debugged. C++
name demangling is another area in which portability will no be
assured. There may also be platform specific areas such as signal
trampolining and c-runtime startup code (crt.0) which are not generally
portable that the debugger will need to be aware of.

You should be able to abstract out the non-portable features into a
platform dependent layer of your debugger.

scott



Relevant Pages

  • Re: HttpModules - Webservices
    ... with a native debugger. ... >Hi Scott, ... >before it hangs. ... >>>HttpRequest request) ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Casting Problem
    ... Thank you for your hint Scott. ... since in the debugger it works, but the same line "at runtime" fails. ... {BackEnd} ... >>Specified cast is not valid. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: 5.2-CURRENT crashes everyday
    ... On Tue, 10 Aug 2004, Scott Long wrote: ... Andrew -- if you use a serial console, are you able to use a serial break ... to get into the debugger if the debugger is compiled in with serial break ...
    (freebsd-current)
  • Re: variables using ClassView and Class wizard
    ... > generate debug info the release version can be debugged now. ... > I am quite new to MFC programming and this problem is puzzling for me. ... When the AV occurs study the debugger stack window, ... Scott McPhillips ...
    (microsoft.public.vc.language)
  • Re: Can I do a timing line by line?
    ... Which version of Visual studio do you mean? ... debugger program and how I could extend it to Fortran. ... that I've used compares for ease-of-use. ...
    (comp.lang.fortran)