[Soot-list] Instrument try-catch

Steven Arzt Steven.Arzt at cased.de
Wed Feb 26 16:18:19 EST 2014


Hi all,

 

Jimple bodies contain a set of so-called traps which are exceptions. Every
trap has a start statement, an end statement (defining the block over which
the try-block shall span), a type of exception to be caught, and a jump
target to jump to when the exception is caught. You can just add new entries
into the trap chain for a method.

 

Best regards,

  Steven

 

 

M.Sc. M.Sc. Steven Arzt

Secure Software Engineering Group (SSE)

European Center for Security and Privacy by Design (EC SPRIDE) 

Mornewegstraße 32

D-64293 Darmstadt

Phone: +49 61 51 16-75426

Fax: +49 61 51 16-72118

eMail:  <mailto:steven.arzt at ec-spride.de> steven.arzt at ec-spride.de

Web: http://sse.ec-spride.de <http://sse.ec-spride.de/> 

 

 

 

Von: soot-list-bounces at sable.mcgill.ca
[mailto:soot-list-bounces at sable.mcgill.ca] Im Auftrag von Guru Devanla
Gesendet: Mittwoch, 26. Februar 2014 17:59
An: Aritra Dhar; Soot list
Betreff: Re: [Soot-list] Instrument try-catch

 

I don't think there is a set of try-catch exception classes to do this. You
will have to work with Jimple syntax and create equivalent throw/goto
statements. I managed to find an example here ( I just googled for it, not
sure how accurate the code is)

 

http://soot.googlecode.com/svn/DUA_Forensis/src/profile/CatchWrapInstrumente
r.java

 

There may be other ways to do this.

 

Thanks

Guru

 

 

 

 

 

 

 

 

 

On Tue, Feb 25, 2014 at 8:48 AM, Aritra Dhar <aritra1204 at iiitd.ac.in> wrote:

Hi Guru,



I want to do some thing like this. Say I have method foo(int,int),

foo(a,b)
{

int c;

c=a/b;

}

I want to instrument try-catch block around the expression a/b (because it
may give ArithmeticException). The instrumented code should be :

foo(a,b)
{

int c;

try
{

c=a/b;
}

catch(Exception e)
{

//handle code (this is also a part of instrumentation)

}

}

I am getting no way in soot api to do such thing.




Regards,
Aritra Dhar
MT12004
M.Tech (CSE-IS)
IIIT-Delhi


 <http://about.me/aritradhar> about.me/aritradhar
Das Bild wurde vom Absender entfernt.http://in.linkedin.com/in/aritradhar

 

On Tue, Feb 25, 2014 at 12:16 AM, Guru Devanla <gdevan2 at uic.edu> wrote:

Hi Aritra,

 

You might want to provide us with more information, including what you
exactly need, what you have tried so far to get useful information.  Please
provide that information and you can receive useful feedback.

 

Regards

Guru

 

On Mon, Feb 24, 2014 at 8:34 AM, Aritra Dhar <aritra1204 at iiitd.ac.in> wrote:

Hi all,

I want to instrument try-catch block in jumple code via soot. I am not
getting any way in the soot-api to do so. Kindly help.

Thank you.




Regards,
Aritra Dhar
MT12004
M.Tech (CSE-IS)
IIIT-Delhi


 <http://about.me/aritradhar> about.me/aritradhar
Das Bild wurde vom Absender entfernt.http://in.linkedin.com/in/aritradhar

 

_______________________________________________
Soot-list mailing list
Soot-list at sable.mcgill.ca
http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20140226/2b590292/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 335 bytes
Desc: not available
Url : http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20140226/2b590292/attachment.jpe 


More information about the Soot-list mailing list