This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
gnu.bytecode
- To: kawa at sources dot redhat dot com
- Subject: gnu.bytecode
- From: Brian Jones <cbj at gnu dot org>
- Date: 06 Aug 2001 21:41:23 -0400
Attached is a small patch which made it easier to include line number
information in my javap replacement. This information, as far as I
can tell, was previously not available.
Could someone explain to me where to find a LocalVarsAttr when
starting with a ClassType? I would assume it might be part of a
Method's attributes, but no such luck as the following returns null.
LocalVarsAttr vars = (LocalVarsAttr)Attribute.get (method, "LocalVariableTable");
Just an observation, it seems like it may be difficult to include
disassembly information without largely duplicating the code within
disassemble() of CodeAttr.
Brian
--
Brian Jones <cbj@gnu.org>
--- LineNumbersAttr.java.orig Mon Aug 6 20:56:28 2001
+++ LineNumbersAttr.java Mon Aug 6 20:58:42 2001
@@ -55,6 +55,9 @@
/** Get the number of line number entries. */
public final int getLength() { return 2 + 4 * linenumber_count; }
+ public int getLineCount () { return linenumber_count; }
+ public short[] getLineNumberTable () { return linenumber_table; }
+
public void write (DataOutputStream dstr) throws java.io.IOException
{
dstr.writeShort (linenumber_count);