Re: [DynInst_API:] Static Library Name as parent module of called function


Date: Tue, 12 Jul 2016 23:30:28 +0530
From: Manoj Kumar <kumar140976@xxxxxxxxx>
Subject: Re: [DynInst_API:] Static Library Name as parent module of called function
Hello Bill,

Thanks for your response. As suggested, I have tried the following code to retrieve the name of all the BPatch_object instances in BPatch_image.
.
Here, MyLibText.exe (windows binary) is linked with static library "TestLib.Lib"

ÂBPatch_image* image = LoadBinary("D:\\MyLibTest\\Debug\\MyLibTest.exe");
Âstd::vector<BPatch_object *> objs;
Âimage->getObjects(objs);
Âstd::vector<BPatch_object *>::iterator itr_obj = objs.begin();
Âwhile ( itr_obj != objs.end() )
Â{
ÂÂBPatch_object* bp = (*itr_obj);
ÂÂstd::string obj_name = bp->name();
ÂÂitr_obj++;
Â}

This code prints the name of only one object name which is "MyLibTest.exe". Static Library name is not printed. As a result, static library function call can not be mapped to its parent module as "TestLib.Lib".Â

Is there anything missed out? or Do I need to upgrade my Dyninst SDK from 9.0.3 to latest version 9.2 toÂretrieve the parent object name (TestLib.LIB) of static library function call?

Thanks
Kumar


On Tue, Jul 12, 2016 at 9:56 PM, Bill Williams <bill@xxxxxxxxxxx> wrote:
On 07/12/2016 11:18 AM, Manoj Kumar wrote:
Hello,

I am using DynInst 9.0.3 to do static analysis of windows PE format to extract the function calls. On analyzing the function call of static library line windows binary, I found that module name returned as the source file name from static library not the name of the static library itself as xyz.lib. Is there anyway to know the name of the static library as the parent of the called function using Dyninsy API.

You want the BPatch_object, not the BPatch_module; this was one of the API changes from Dyninst 8 to Dyninst 9.
Thanks for your help.

Thanks
M. Kumar


_______________________________________________
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→]