How to debug the JNI with GDB


#1

I am a new in the MapD world.
I want to know the process of MapD to deal with the SELECT statement,and then I find it uses the JNI,so I want to know how to make the breakpoint in the .jave file and make debug.
Can anyone give me some suggestion? it will be very appreciated!


#2

Hi @asteroid!

What version of MapD are you using? We haven’t used JNI in some time, so we suspect you might not be on a recent version.


#3

I don’t know where to see this version of my mapd, I got the code of mapd-core-master from this website this Tuesday as follows: https://github.com/mapd/mapd-core.git.
And where can I get the latest version?


#4

Hello @asteroid,

That is the correct repository. Can you please tell us which file/function/line you would like to break into?

Thanks.


#6

Hi,
I use these step to make install as follows:
$ git clone https://github.com/mapd/mapd-core.git
$cd mapd-core
$git checkout 21fc39
Maybe you could get some information about my version.
Can you tell me if you still use the JNI in the latest version?
Tank you!


#7

I’d like to make the breakpoint in the file that “com/mapd/parser/server/CalciteDirect.java:123”,the function is “process”,I just don’t know how to debug from the code of C++ to the code of JAVE with gdb,and can you tell me if you still use the JNI in the latest version in the github?I use these steps to get the code to make install as follows:
git clone https://github.com/mapd/mapd-core.git cd mapd-core
$git checkout 21fc39


Look forward to your reply!


#8

Hi @asteroid, we’re currently working to produce a quick tutorial on Java remote debugging for MapD. I’ll be sure to link it to this thread in case it turns out be an interesting or helpful resource for you on this project.


#9

It’s so cool,could you please give me a link after completing the tutorial? It will be very appreciated!


#10

Hi,
Can you tell me the progress of the quick tutorial on Jave remote debugging for MapD?If I do not solve this problem,I can’t work in the next step.If it is convenient, can you tell me the lasest progress,please?
Tank you very much,look forward to your reply!


#11

Hi, @asteroid

Unfortunately the tutorial won’t be complete until later this week. But here are some basic reference steps that I hope can be useful immediately: