static struct value * m88k_frame_prev_register (struct frame_info *this_frame, void **this_cache, int regnum) { struct m88k_frame_cache *cache = m88k_frame_cache (this_frame, this_cache); if (regnum == M88K_SNIP_REGNUM || regnum == M88K_SFIP_REGNUM) { struct value *value; CORE_ADDR pc; value = trad_frame_get_prev_register (this_frame, cache->saved_regs, M88K_SXIP_REGNUM); pc = value_as_long (value); release_value (value); value_free (value); if (regnum == M88K_SFIP_REGNUM) pc += 4; return frame_unwind_got_constant (this_frame, regnum, pc + 4); } return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum); }
/* Called when a new gdb.Value object needs to be allocated. */ static PyObject * valpy_new (PyTypeObject *subtype, PyObject *args, PyObject *keywords) { struct value *value = NULL; /* Initialize to appease gcc warning. */ value_object *value_obj; if (PyTuple_Size (args) != 1) { PyErr_SetString (PyExc_TypeError, _("Value object creation takes only " "1 argument")); return NULL; } value_obj = (value_object *) subtype->tp_alloc (subtype, 1); if (value_obj == NULL) { PyErr_SetString (PyExc_MemoryError, _("Could not allocate memory to " "create Value object.")); return NULL; } value = convert_value_from_python (PyTuple_GetItem (args, 0)); if (value == NULL) { subtype->tp_free (value_obj); return NULL; } value_obj->value = value; value_obj->address = NULL; value_obj->type = NULL; release_value (value); value_prepend_to_list (&values_in_python, value); return (PyObject *) value_obj; }
xstring xversion::x_str() const { xformat format(xformat(_X("%1%.%2%.%3%.%4%")) % major_value() % minor_value() % release_value() % build_value()); return format.str(); }