Re: Change line numbers
Eugene Kuleshov <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Sure, it is no different then any other bytecode transformation. Assuming there is no multiple files per .class you can use MethodVisitor.html.visitLineNumber(..) [1]. As usual, you can compare the compiled bytecode before and after changes (i.e. adding the header or changing the line numbers) and follow the tutorial from ASM web site [2], though it is based on an older ASM API. regards, Eugene [1] http://asm.ow2.org/asm32/javadoc/user/org/objectweb/asm/MethodVisitor.html#visitLineNumber%28int,%20org.objectweb.asm.Label%29 [2] http://asm.ow2.org/doc/tutorial.html On Tue, Feb 16, 2010 at 9:14 AM, <[email protected]> wrote: > Hi, > > Apache Clerezza allows a user to execute scripts written in Scala. We complete > the script by adding a header to it and then compile it. When the compiled > class is executed and an exception occurs, we'd like that the stack trace shows > the line numbers which correspond to the script file of the user, not the > script file with the header we added. Is there a way to change the line numbers > with ASM? > > Cheers, > Manuel > > > -- > You receive this message as a subscriber of the [email protected] mailing list. > To unsubscribe: mailto:[email protected] > For general help: mailto:[email protected]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > >
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws