jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent Martelli <laur...@bearteam.org>
Subject Re: Verifies chokes
Date Mon, 23 Sep 2002 19:33:51 GMT
>>>>> "Peter" == Peter Schneider <schneidp@lathanda.de> writes:

[...]

  Peter> insert before the first instruction of any exception handler
  Peter> DUP INVOKEVIRTUAL Throwable.printStackTrace and everything
  Peter> should be fine if you need to avoid double stack traces you
  Peter> are in trouble.  I'm not sure if it's even possible.

Everything is possible, it's just a matter of time :-)

A trivial approach would be to scan the instructions and see if
there's already an "INVOKEVIRTUAL Throwable.printStackTrace". But you
won't know what exception this is called on. If you want to know this,
you should do a little data-flow analysis. It's not that hard. You
should (well, that's an approach, maybe there are others) simulate the
effect of instructions on the state of the stack. This way, you can
determine what's on the top of the stack when INVOKEVIRTUAL is
executed.

I think I gave some pointers to the CVS repository where you can find
my code a few days a ago on the list.

Regards,
Laurent

-- 
Laurent Martelli                        http://jac.aopsys.com/
laurent@bearteam.org                    http://www.bearteam.org/~laurent/


--
To unsubscribe, e-mail:   <mailto:bcel-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:bcel-user-help@jakarta.apache.org>


Mime
View raw message