def _evalcode_python(executor, code, input_type):
 global_dict = gdb.parse_and_eval('PyEval_GetGlobals()')
 local_dict = gdb.parse_and_eval('PyEval_GetLocals()')
 if ((pointervalue(global_dict) == 0) or (pointervalue(local_dict) == 0)):
  raise gdb.GdbError('Unable to find the locals or globals of the most recent Python function (relative to the selected frame).')
 return executor.evalcode(code, input_type, global_dict, local_dict)

def _evalcode_python ( executor , code , input_type ) : global_dict = gdb . parse_and_eval ( 'PyEval_GetGlobals()' ) local_dict = gdb . parse_and_eval ( 'PyEval_GetLocals()' ) if ( ( pointervalue ( global_dict ) == 0 ) or ( pointervalue ( local_dict ) == 0 ) ) : raise gdb . GdbError ( 'Unable to find the locals or globals of the most recent Python function (relative to the selected frame).' ) return executor . evalcode ( code , input_type , global_dict , local_dict )
execute python code in the most recent stack frame .