From: Tom Tromey Date: Thu, 28 May 2009 16:49:55 +0000 (+0000) Subject: gdb X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8f5008704e9f9e282da288b71fefb96e889ea961;p=binutils-gdb.git gdb * python/python.c (gdbpy_parameter): Rename. Fix error message. (GdbMethods): Change "get_parameter" to "parameter". gdb/doc * gdb.texinfo (Basic Python): Change get_parameter to parameter. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a5aba7e993e..f57cea2d34b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-05-28 Tom Tromey + + * python/python.c (gdbpy_parameter): Rename. Fix error message. + (GdbMethods): Change "get_parameter" to "parameter". + 2009-05-28 Pierre Muller Paul Pluzhnikov diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 95c9e6620d0..e29f63a4ad4 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2009-05-28 Tom Tromey + + * gdb.texinfo (Basic Python): Change get_parameter to parameter. + 2009-05-27 Tom Tromey * gdb.texinfo (GDB/MI Miscellaneous Commands): Document "python" diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 971ed041aa6..6f5fb9a7b27 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -18554,8 +18554,8 @@ command as having originated from the user invoking it interactively. It must be a boolean value. If omitted, it defaults to @code{False}. @end defun -@findex gdb.get_parameter -@defun get_parameter parameter +@findex gdb.parameter +@defun parameter parameter Return the value of a @value{GDBN} parameter. @var{parameter} is a string naming the parameter to look up; @var{parameter} may contain spaces if the parameter has a multi-part name. For example, diff --git a/gdb/python/python.c b/gdb/python/python.c index 7f32d665e8a..3ad69d4a98a 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -212,7 +212,7 @@ parameter_to_python (struct cmd_list_element *cmd) value. */ static PyObject * -get_parameter (PyObject *self, PyObject *args) +gdbpy_parameter (PyObject *self, PyObject *args) { struct cmd_list_element *alias, *prefix, *cmd; char *arg, *newarg; @@ -235,7 +235,7 @@ get_parameter (PyObject *self, PyObject *args) "could not find parameter `%s'", arg); if (! cmd->var) - return PyErr_Format (PyExc_RuntimeError, "`%s' is not a variable", arg); + return PyErr_Format (PyExc_RuntimeError, "`%s' is not a parameter", arg); return parameter_to_python (cmd); } @@ -612,7 +612,7 @@ static PyMethodDef GdbMethods[] = "Get a value from history" }, { "execute", execute_gdb_command, METH_VARARGS, "Execute a gdb command" }, - { "get_parameter", get_parameter, METH_VARARGS, + { "parameter", gdbpy_parameter, METH_VARARGS, "Return a gdb parameter's value" }, { "default_visualizer", gdbpy_default_visualizer, METH_VARARGS,