You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by bu...@apache.org on 2011/09/12 08:12:00 UTC
DO NOT REPLY [Bug 51801] Eclipse debugger fails on BCEL-instrumented
methods having generic local variables.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51801
Byron Hawkins <by...@hawkinssoftware.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version| |All
--- Comment #1 from Byron Hawkins <by...@hawkinssoftware.net> 2011-09-12 06:12:00 UTC ---
Here is an icky workaround:
Method method = <initialize>;
MethodGen methodGenerator = new MethodGen(method, ...);
InstructionList instructions = methodGenerator.getInstructionList();
Map<Integer, InstructionHandle> handlesByPosition = new
HashMap<Integer, InstructionHandle>();
for (InstructionHandle handle : instructions.getInstructionHandles())
{
handlesByPosition.put(handle.getPosition(), handle);
}
if (method.getLocalVariableTable() != null)
{
methodGenerator.removeLocalVariables();
for (LocalVariable local :
method.getLocalVariableTable().getLocalVariableTable())
{
methodGenerator.addLocalVariable(local.getName(),
Type.getType(local.getSignature()), local.getIndex(),
handlesByPosition.get(local.getStartPC()),
handlesByPosition.get(local.getStartPC() + local.getLength()));
}
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org