On 24/11/06, Paolo Bonzini <[EMAIL PROTECTED]> wrote:
Rob Quill wrote:
> I haven't looked into this yet, but as I think I may need to be able
> to do something similar, is it possible to parse the cfg file that is
> given out, and build a C structure like that?
It seems to me that the answer had been already given in the message you
fully quoted: we cannot help you.
I don't wish to labour the point, but what I am trying to understand
is whether it is impossible or just impractical. Could you explain why
it is that it can't be done? For example, the file given out doesn't
maintain enough information about the graph, in which case, why is in
not possible to output enough information in such a format that it can
be read and parsed into a C structure?
Sorry if this is tedious, or I have missed something obvious.
Compilers are a new subject for me, but a C representation of a
control flow graph would be greatly benificial for some optimisations
I am trying to make to allow the use of light formal methods in GDB.
See here for a discussion:
http://sourceware.org/ml/gdb/2006-10/msg00078.html
And, by the way, I suggest not to top post: see
http://en.wikipedia.org/wiki/TOFU for more info.
Appologies.
Thanks for your help.
Rob
Paolo
>> > but i don't know how to load that file in a structure.
>> > I.e. i have the file .cfg builded by gcc with the option
>> > -fdump-tree-cfg and i want to load this file in a C structure so i can
>> > manipulate it.
>>
>> There is no such functionality in GCC. GCC can only build the CFG from
>> source code, and can only do so to produce assembly language output.