[Soot-list] Generating code for enumaration

Steven Arzt Steven.Arzt at cased.de
Mon Feb 2 11:16:17 EST 2015


Hi Daniele,

 

To answer this question, we would need more information. What do you mean by
“does not work”? The code you wrote should give you a new local of the
correct type – but it’s hard to tell what else may be wrong if one does not
know how you use this local and where the problem shows up.

 

Best regards,

  Steven

 

 

M.Sc. M.Sc. Steven Arzt

Secure Software Engineering Group (SSE)

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

Rheinstraße 75

D-64293 Darmstadt

Phone: +49 61 51 869-336

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 CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA]
Im Auftrag von Daniele Altomare
Gesendet: Montag, 2. Februar 2015 17:14
An: soot-list at CS.McGill.CA
Betreff: [Soot-list] Generating code for enumaration

 

Hi all, 

 

I'm getting stuck at generating code for an enum in a BodyTransformer.

 

I have to pass the the proxy type to a method and that's defined by an enum.

If I run the driver class for a java program where I define the proxy (so I
can see the Jimple code) I get this for the method body:

 

$r6 = <java.net.Proxy$Type: java.net.Proxy$Type HTTP>;

 

 

I've tried in this way but it doesn't work:

SootClass clsProxyType = Scene.v().getSootClass("java.net.Proxy$Type");

Local proxyType = Jimple.v().newLocal("proxyType", RefType.v(clsProxyType));

b.getLocals().add(proxyType);

 

 

Can someone help me with this?

 

 

Thanks!

Daniele

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150202/0e8e3251/attachment.html 


More information about the Soot-list mailing list