GSOFF_MEMBER(function_length), GSOFF_MEMBER(module_name), GSOFF_MEMBER(from_address), GSOFF_MEMBER(from_function_name), GSOFF_MEMBER(from_function_offset), GSOFF_MEMBER(from_function_length), GSOFF_MEMBER(from_module_name), GSOFF_MEMBER(special_stack) GSOFF_END static PyGetSetDef frame_getset[] = { SR_ATTRIBUTE_BOOL (reliable, "True if the the frame is guaranteed to be real (bool)"), SR_ATTRIBUTE_UINT64(address, "Address of the current instruction (long)" ), SR_ATTRIBUTE_STRING(function_name, "Function name (string)" ), SR_ATTRIBUTE_UINT64(function_offset, "Function offset (long)" ), SR_ATTRIBUTE_UINT64(function_length, "Function length (long)" ), SR_ATTRIBUTE_STRING(module_name, "Module owning the function (string)" ), SR_ATTRIBUTE_UINT64(from_address, "Address of the caller's instruction (long)" ), SR_ATTRIBUTE_STRING(from_function_name, "Caller function name (string)" ), SR_ATTRIBUTE_UINT64(from_function_offset, "Caller function offset (long)" ), SR_ATTRIBUTE_UINT64(from_function_length, "Caller function length (long)" ), SR_ATTRIBUTE_STRING(from_module_name, "Module owning the caller function (string)" ), SR_ATTRIBUTE_STRING(special_stack, "Identifier of x86_64 kernel stack (string)" ), { NULL }, }; PyTypeObject sr_py_koops_frame_type = {
GSOFF_MEMBER(source_line), GSOFF_MEMBER(signal_handler_called), GSOFF_MEMBER(address), GSOFF_MEMBER(library_name) GSOFF_END /* * With the GSOFF_ declarations above, we can use SR_ATTRIBUTE_ macros that * expand to PyGetSetDef literals with the right values. There is also * SR_ATTRIBUTE_type_R variant that allows you to name the attribute different * than the C struct member. */ static PyGetSetDef frame_getset[] = { SR_ATTRIBUTE_STRING(function_name, "Function name (string)" ), SR_ATTRIBUTE_STRING(function_type, "Function type (string)" ), SR_ATTRIBUTE_UINT32(number, "Frame number (positive integer)" ), SR_ATTRIBUTE_STRING(source_file, "Source file name (string)" ), SR_ATTRIBUTE_UINT32(source_line, "Source line number (positive integer)" ), SR_ATTRIBUTE_BOOL (signal_handler_called, "True if the frame is signal handler (bool)"), SR_ATTRIBUTE_UINT64(address, "Address of the current instruction (long)" ), SR_ATTRIBUTE_STRING(library_name, "Executable file name (string)" ), { NULL }, }; PyTypeObject sr_py_gdb_frame_type = { PyObject_HEAD_INIT(NULL) 0,
#define GSOFF_PY_MEMBER frame #define GSOFF_C_STRUCT sr_java_frame GSOFF_START GSOFF_MEMBER(name), GSOFF_MEMBER(file_name), GSOFF_MEMBER(file_line), GSOFF_MEMBER(class_path), GSOFF_MEMBER(is_native), GSOFF_MEMBER(is_exception), GSOFF_MEMBER(message) GSOFF_END static PyGetSetDef frame_getset[] = { SR_ATTRIBUTE_STRING(name, "Fully qualified domain name (string)" ), SR_ATTRIBUTE_STRING(file_name, "File name (string)" ), SR_ATTRIBUTE_UINT32(file_line, "File line (positive integer)" ), SR_ATTRIBUTE_STRING(class_path, "Class path (string)" ), SR_ATTRIBUTE_BOOL (is_native, "True if method is native, always false if frame is an exception (bool)"), SR_ATTRIBUTE_BOOL (is_exception, "True if frame is an exception frame (bool)" ), SR_ATTRIBUTE_STRING(message, "Exception message (string)" ), { NULL } }; PyTypeObject sr_py_java_frame_type = { PyObject_HEAD_INIT(NULL) 0, "satyr.JavaFrame", /* tp_name */