WinDBG/Exts/CodeAnalyzer/gdbplus/gdb-7.7/gdb/python/py-ref.c
/* Return gdb.Symbol for stack/global, none for other  */
Return gdb.Symbol for stack/global, none for other
Return gdb . Symbol for stack / global none for other
static PyObject *
object_ref_get_symbol (PyObject *self, void *closure)
{
	object_ref *obj_ref = (object_ref *) self;
	struct symbol* sym = NULL;
	if (obj_ref->ref.storage_type == ENUM_STACK)
		sym = get_stack_sym(&obj_ref->ref, NULL, NULL);
	else if (obj_ref->ref.storage_type == ENUM_MODULE_TEXT || obj_ref->ref.storage_type == ENUM_MODULE_DATA)
		sym = get_global_sym(&obj_ref->ref, NULL, NULL);
	if (sym)
		return symbol_to_symbol_object(sym);
	else
	{
		Py_INCREF (Py_None);
		return Py_None;
	}
}
static PyObject * object_ref_get_symbol ( PyObject * self , void * closure ) { object_ref * obj_ref = ( object_ref * ) self ; struct symbol * sym = NULL ; if ( obj_ref -> ref . storage_type == ENUM_STACK ) sym = get_stack_sym ( & obj_ref -> ref , NULL , NULL ) ; else if ( obj_ref -> ref . storage_type == ENUM_MODULE_TEXT || obj_ref -> ref . storage_type == ENUM_MODULE_DATA ) sym = get_global_sym ( & obj_ref -> ref , NULL , NULL ) ; if ( sym ) return symbol_to_symbol_object ( sym ) ; else { Py_INCREF ( Py_None ) ; return Py_None ; } }
Return gdb.Symbol for stack/global, none for other
Return gdb . Symbol for stack / global none for other