Not sure why it's happening. Perhaps something to do with some signal handling. 
Setting the SIGSEGV handler (in a gdb session) to 'nopass' before doing a 'p 
<method>' and resetting it to 'pass'  immediately after the call seems to work. 

With the following methodology one doesn't have to remember setting/resetting 
the handler.

Add the following to ~/.gdbinit:

define pgdb
 handle SIGSEGV nopass
 p $arg0
 handle SIGSEGV pass
end

and then in the gdb session, call: 
 pgdb <method>

If there are args for the <method>, just need to call <method(arg1,arg2..)> 
without spaces.

Thanks,
-Narendra

> -----Original Message-----
> From: Dave Birdsall <[email protected]>
> Sent: Tuesday, May 29, 2018 10:29 AM
> To: [email protected]
> Subject: SQL compiler debugging on CentOS 7
> 
> Hi,
> 
> I'm doing some debugging in the SQL compiler on a Trafodion instance on 
> CentOS 7.
> 
> One of the things I commonly do is use the "display()" function in gdb on 
> various ItemExpr-related classes. So, at the gdb prompt, I might do "p 
> keyList.display()".
> 
> This works fine on RedHat instances. But today I tried it for the first time 
> on a CentOS 7 instance, and, after showing some output, the function appears 
> to go into an infinite loop. Top shows gdb running at close to 100%.
> 
> Has anyone else seen this? Does anyone know what the issue is?
> 
> Thanks,
> 
> Dave

Reply via email to