cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

bananafish
Adept I

How to forward SIGSEGV in CodeXL's GDB invocation?

Hello.

How do I tell CodeXL to ignore SIGSEGVs and pass them to my application to be handled? My understanding is that CodeXL uses GDB as its backend but there seems to be no means of telling the invoked GDB to perform this forwarding.

My program is set up as follows:

working dir: /path/to/maven/project/target

executable: /usr/bin/java

command line args: -jar RunMe.jar

Looking further, it appears that there are intentionally-thrown SIGSEGVs somewhere in the called native libs and CodeXL is catching them, treating them as crash-worthy and aborting the program. There is a StackOverflow answer hinting at this:

opengl - Why does java app crash in gdb but runs normally in real life? - Stack Overflow

... it turns out that SIGSEGVs are starting to be used to accelerate the JVM by leaving some sanity-checking to the CPU hardware and catching the fault signals:

http://pharm.ece.wisc.edu/papers/vee10.pdf

I tried this myself by passing -Xint to the JVM with GDB in the terminal and it got a little further but I still was not able to completely persuade it to not use faults for everyday activities. Using the answer in the S.O. question I passed ` -ex "handle SIGSEGV nostop noprint pass" ` flag to GDB and was able to get GDB to run my program without a problem.

The challenge then, pending that this idea is correct: How do I get CodeXL to pass the faults thrown by my program to the JVM with its GDB invocation? I am having trouble finding an option to pass arguments straight to GDB on execution, as opposed to the JVM or my program.

Thanks for reading.

... and how dare you give me access to Comic Sans font.

Message was edited by: Chuck Ritola (clarification)

0 Likes
0 Replies