Setting breakpoints in foreign sources [message #1750322] |
Mon, 19 December 2016 18:08  |
Eclipse User |
|
|
|
hi folks, was wondering how eclipse decides what 'line' a breakpoint was put on. I was hoping it would naively take whatever line you set the break point on, but that appears not to be the case.
It appears that it tries to actually parse the source file, rather than just look up the byte code offset based on the linenumbertable attribute of the class/methods.
in my case, my 'source' isn't java. and certainly not something eclipse understands
I am creating javap-like source files, who's lines map to byte code offsets as appropriate in the class's linenumber table.
However, when i try to set a breakpoint in my 'source' file, eclipse sets the breakpoint at the end of the file, and so it is not a proper breakpoint.
My project in question is
https://github.com/mebigfatguy/baremetal4j
Notice i'm creating files with a .java extension, which i suppose is a no-no, however it appears eclipse doesn't respect the ability to set breakpoints in non-java files.
Anyone have any ideas?
|
|
|
|
Re: Setting breakpoints in foreign sources [message #1750327 is a reply to message #1750324] |
Mon, 19 December 2016 20:30  |
Eclipse User |
|
|
|
i don't think the breakpoints will be a problem, as you can aspect-ize code using the same process and hit breakpoints. I'm pretty sure it's the source code. I wonder how eclipse handles scala, or other things. Can i create my own language extends (.asm) and have eclipse honor it somehow? If nothing pops, i suppose i can try creating 'proper' java files like
class Foo {
int BC;
public void moo() {
BC=0; // ALOAD_0
BC=1; // BIPUSH 0
BC=2; //INVOKEMETHOD
}
etc. at least eclipse will see that as a reasonably formatted java file, and maybe that will work.
|
|
|
Powered by
FUDForum. Page generated in 0.02741 seconds