gdb sends SIGINT to wt App when breakpoint is set in Netbeans.
Added by Mathimaaran Selvam over 5 years ago
Hi All,
I was trying to debug a WT App in Linux Mint.
I am using Netbeans 8.0.3 with gdb 8.3 and Wt Version 4.1.2 (Same issue occurs in QTCreator too).
Whenever I set a breakpoint in netbeans ide after the App is started in debug mode, gdb sends SIGINT to the WT App.
on receiving SIGINT signal , WT App, shuts down as per the code in
src/Wt/WServer.C
int WServer::waitForShutdown()
Note : Before starting the debug session, there is no issue in setting breakpoints.
After playing with gdb signal handling options (pass , nopass etc)in vain, Currently I have figured out two workarounds.
1) Have the debug command line with ---gdb switch.
$> ./wtApp ---docroot . ---gdb ---deploy-path=/hello ---http-address 0.0.0.0 ---http-port 8080
2) Comment out the line (and make , make install)
//sigaddset(&wait_mask, SIGINT);
in src/Wt/WServer.C
Both has the obvious side affect of not being able to kill the server using Ctrl-C.
Just want to document here for anyone else having this issue. And also want to hear from you guys if anything better can be done.
Thanks,
Mathi.