diff options
author | Michael Snyder <msnyder@vmware.com> | 2010-05-17 21:23:25 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2010-05-17 21:23:25 +0000 |
commit | d59b6f6c38a3e9c229dae40bd6c668be47fe8e48 (patch) | |
tree | d3e248c0abb4d8baf265767d9542537bd1b0d373 /gdb/python/py-param.c | |
parent | 102040f0d08b06980adf402c17b2f039fee7d23c (diff) | |
download | gdb-d59b6f6c38a3e9c229dae40bd6c668be47fe8e48.zip gdb-d59b6f6c38a3e9c229dae40bd6c668be47fe8e48.tar.gz gdb-d59b6f6c38a3e9c229dae40bd6c668be47fe8e48.tar.bz2 |
2010-05-17 Michael Snyder <msnyder@vmware.com>
* python/py-auto-load.c: White space.
* python/py-block.c: White space.
* python/py-breakpoint.c: White space.
* python/py-cmd.c: White space.
* python/py-function.c: White space.
* python/py-lazy-string.c: White space.
* python/py-objfile.c: White space.
* python/py-param.c: White space.
* python/py-prettyprint.c: White space.
* python/py-progspace.c: White space.
* python/py-symtab.c: White space.
* python/python.c: White space.
* python/py-type.c: White space.
* python/py-utils.c: White space.
* python/py-value.c: White space.
Diffstat (limited to 'gdb/python/py-param.c')
-rw-r--r-- | gdb/python/py-param.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/python/py-param.c b/gdb/python/py-param.c index e2319e5..5596eb7 100644 --- a/gdb/python/py-param.c +++ b/gdb/python/py-param.c @@ -103,6 +103,7 @@ get_attr (PyObject *obj, PyObject *attr_name) && ! strcmp (PyString_AsString (attr_name), "value")) { parmpy_object *self = (parmpy_object *) obj; + return gdbpy_parameter_value (self->type, &self->value); } @@ -394,6 +395,7 @@ compute_enum_values (parmpy_object *self, PyObject *enum_values) for (i = 0; i < size; ++i) { PyObject *item = PySequence_GetItem (enum_values, i); + if (! item) return 0; if (! gdbpy_is_string (item)) @@ -414,9 +416,11 @@ static char * get_doc_string (PyObject *object, PyObject *attr) { char *result = NULL; + if (PyObject_HasAttr (object, attr)) { PyObject *ds_obj = PyObject_GetAttr (object, attr); + if (ds_obj && gdbpy_is_string (ds_obj)) result = python_string_to_host_string (ds_obj); } |