Find the answer to your Linux question:
Results 1 to 5 of 5
Hello, I have a question about binary files of g++ , please: in the option g++ -fdump-class-hierarchy source.cpp I get the hierarchies of c++ in memory, in a file named ...
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Posts
    4

    A question about g++ dump files

    Hello,

    I have a question about binary files of g++ , please:
    in the option
    g++ -fdump-class-hierarchy source.cpp
    I get the hierarchies of c++ in memory, in a file named source.cpp.class
    How can I get the binary data of it?

    thanks,
    Shira

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    I have never used the -fdump-class-hierarchy option before. I have just now done so, because of your question So I haven't the foggiest notion how to answer the question, but nobody else has taken a crack at it for five hours, so I'll give it a shot.

    I pretty much understand what the compiler has done with this option, so my question to you is: What do you mean by
    How can I get the binary data of it?
    What do you want to accomplish?
    --
    Bill

    Old age and treachery will overcome youth and skill.

  3. #3
    Just Joined!
    Join Date
    Dec 2007
    Posts
    4
    Hi and thank you for trying to help.

    I would like to get static data about class hierarchies and virtual methods for given c++ files. The format that you got (file *.cpp.class) is eddited.
    It seems that this data exists in some file and from it the resulting file is given. Is there a file where this static data can be, not eddited, so I'll be able to parse the file more easily?

  4. #4
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Ok, your question now seems fairly simple. I'm guessing that the answer is "no". I did a careless google for
    Code:
    fdump-class-hierarchy
    and found nothing useful, but you may wish to do a more thorough search. If you do, don't search for this:
    Code:
    -fdump-class-hierarchy
    because google uses a hyphen at the beginning of a word to mean "exclude anything containing this word from the search results".

    You could possibly hack the code of the compiler itself, if you're so inclined. I vote for biting the bullet and parsing the output with a tool you write yourself.

    Sorry I couldn't be of more help than this.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  5. #5
    Just Joined!
    Join Date
    Dec 2007
    Posts
    4
    Hi, I'm trying to do so. 10x !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...