Re: [DynInst_API:] ParseAPI and single graphs


Date: Tue, 26 Mar 2013 08:21:43 -0500
From: Andrew Bernat <bernat@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] ParseAPI and single graphs
I don't quite understand what you mean by "different graphs". Do you mean different functions? 

The difficulty with a single depth-first walk is that the CFG may have multiple entry points. Typically call edges connect functions, but if a function is only reached by indirect control flow there may not be such call edges. We start parsing at each known symbol to alleviate this, so each symbol really is an entry. 

And that doesn't include different libraries, which make the problem worse. 

Drew

On Mar 26, 2013, at 7:06 AM, "E.Robbins" <er209@xxxxxxxxxx> wrote:

If not I guess I just will just have to do a depth first walk on each function entry node to find the connected components.

Cheers,
Ed
________________________________________
From: dyninst-api-bounces@xxxxxxxxxxx [dyninst-api-bounces@xxxxxxxxxxx] on behalf of E.Robbins [er209@xxxxxxxxxx]
Sent: 26 March 2013 11:59
To: dyninst-api@xxxxxxxxxxx
Subject: [DynInst_API:] ParseAPI and single graphs

Hi,

I'm using parseAPI to recover CFGs, but I'd really only like to get a single CFG back for the program starting from the main function. At present I get a bunch of separate graphs back - from frame_dummy, __do_global_ctors_aux etc, all bundled together, and this is a problem as I can't do, e.g. a depth first walk of the nodes when many of them are from different graphs.

I've been looking for a way to separate out the nodes, for example those from different code regions, but this doesn't work as nodes from different code regions can be reached from main. I've also tried calling parse on the codeobject with the address of the main function, but this still gets me lots of extra bits that don't appear reachable from main.

I could probably walk the CFG starting from each function entry and see which nodes are connected and which aren't, but is there an easier way?

Thanks,
Ed
_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api




[← Prev in Thread] Current Thread [Next in Thread→]