2011-01-05 Michael Snyder <msnyder@vmware.com>

* cli/cli-cmds.c: Shorten lines of >= 80 columns.
	* cli/cli-decode.c: Ditto.
	* cli/cli-dump.c: Ditto.
	* cli/cli-logging.c: Ditto.
	* cli/cli-script.c: Ditto.
	* cli/cli-setshow.c: Ditto.
	* common/signals.c: Ditto.
	* mi/mi-cmd-break.c: Ditto.
	* mi/mi-cmd-disas.c: Ditto.
	* mi/mi-cmd-stack.c: Ditto.
	* mi/mi-cmd-var.c: Ditto.
	* mi/mi-cmds.c: Ditto.
	* mi/mi-common.h: Ditto.
	* mi/mi-console.c: Ditto.
	* mi/mi-interp.c: Ditto.
	* mi/mi-main.c: Ditto.
	* osf-share/cma_attr.c: Ditto.
	* osf-share/cma_deb_core.h: Ditto.
	* osf-share/cma_debug_client.h: Ditto.
	* osf-share/cma_handle.h: Ditto.
	* osf-share/cma_mutex.h: Ditto.
	* osf-share/cma_stack_int.h: Ditto.
	* osf-share/cma_tcb_defs.h: Ditto.
	* python/py-auto-load.c: Ditto.
	* python/py-breakpoint.c: Ditto.
	* python/py-cmd.c: Ditto.
	* python/py-frame.c: Ditto.
	* python/py-objfile.c: Ditto.
	* python/py-param.c: Ditto.
	* python/py-progspace.c: Ditto.
	* python/py-symbol.c: Ditto.
	* python/py-value.c: Ditto.
	* python/python-internal.h: Ditto.
	* python/python.c: Ditto.
	* tui/tui-data.c: Ditto.
	* tui/tui-disasm.c: Ditto.
	* tui/tui-hooks.c: Ditto.
	* tui/tui-io.c: Ditto.
	* tui/tui-layout.c: Ditto.
	* tui/tui-regs.c: Ditto.
	* tui/tui-source.c: Ditto.
	* tui/tui-stack.c: Ditto.
	* tui/tui-win.c: Ditto.
	* tui/tui-windata.c: Ditto.
	* tui/tui-winsource.c: Ditto.
This commit is contained in:
Michael Snyder
2011-01-06 00:57:05 +00:00
parent 493e2a69a4
commit 9a2b4c1ba7
46 changed files with 428 additions and 226 deletions

View File

@@ -486,7 +486,8 @@ an executable or shared library."),
&setlist,
&showlist);
add_cmd ("section-scripts", class_maintenance, maintenance_print_section_scripts,
add_cmd ("section-scripts", class_maintenance,
maintenance_print_section_scripts,
_("Print dump of auto-loaded section scripts matching REGEXP."),
&maintenanceprintlist);
}

View File

@@ -58,7 +58,8 @@ struct breakpoint_object
#define BPPY_REQUIRE_VALID(Breakpoint) \
do { \
if ((Breakpoint)->bp == NULL) \
return PyErr_Format (PyExc_RuntimeError, _("Breakpoint %d is invalid."), \
return PyErr_Format (PyExc_RuntimeError, \
_("Breakpoint %d is invalid."), \
(Breakpoint)->number); \
} while (0)
@@ -66,7 +67,7 @@ struct breakpoint_object
exception if it is invalid. This macro is for use in setter functions. */
#define BPPY_SET_REQUIRE_VALID(Breakpoint) \
do { \
if ((Breakpoint)->bp == NULL) \
if ((Breakpoint)->bp == NULL) \
{ \
PyErr_Format (PyExc_RuntimeError, _("Breakpoint %d is invalid."), \
(Breakpoint)->number); \

View File

@@ -170,7 +170,8 @@ cmdpy_function (struct cmd_list_element *command, char *args, int from_tty)
/* An error occurred computing the string representation of the
error message. This is rare, but we should inform the user. */
printf_filtered (_("An error occurred in a Python command\n"
"and then another occurred computing the error message.\n"));
"and then another occurred computing the "
"error message.\n"));
gdbpy_print_stack ();
}
@@ -420,7 +421,8 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kw)
return -1;
}
if (! PyArg_ParseTupleAndKeywords (args, kw, "si|iO", keywords, &name, &cmdtype,
if (! PyArg_ParseTupleAndKeywords (args, kw, "si|iO",
keywords, &name, &cmdtype,
&completetype, &is_prefix))
return -1;
@@ -437,7 +439,8 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kw)
if (completetype < -1 || completetype >= (int) N_COMPLETERS)
{
PyErr_Format (PyExc_RuntimeError, _("Invalid completion type argument."));
PyErr_Format (PyExc_RuntimeError,
_("Invalid completion type argument."));
return -1;
}

View File

@@ -569,9 +569,9 @@ gdbpy_initialize_frames (void)
if (PyType_Ready (&frame_object_type) < 0)
return;
/* Note: These would probably be best exposed as class attributes of Frame,
but I don't know how to do it except by messing with the type's dictionary.
That seems too messy. */
/* Note: These would probably be best exposed as class attributes of
Frame, but I don't know how to do it except by messing with the
type's dictionary. That seems too messy. */
PyModule_AddIntConstant (gdb_module, "NORMAL_FRAME", NORMAL_FRAME);
PyModule_AddIntConstant (gdb_module, "DUMMY_FRAME", DUMMY_FRAME);
PyModule_AddIntConstant (gdb_module, "SIGTRAMP_FRAME", SIGTRAMP_FRAME);

View File

@@ -175,7 +175,8 @@ gdbpy_initialize_objfile (void)
return;
Py_INCREF (&objfile_object_type);
PyModule_AddObject (gdb_module, "Objfile", (PyObject *) &objfile_object_type);
PyModule_AddObject (gdb_module, "Objfile",
(PyObject *) &objfile_object_type);
}

View File

@@ -513,7 +513,8 @@ parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
&& parmclass != var_optional_filename && parmclass != var_filename
&& parmclass != var_zinteger && parmclass != var_enum)
{
PyErr_SetString (PyExc_RuntimeError, _("Invalid parameter class argument."));
PyErr_SetString (PyExc_RuntimeError,
_("Invalid parameter class argument."));
return -1;
}

View File

@@ -185,7 +185,8 @@ gdbpy_initialize_pspace (void)
return;
Py_INCREF (&pspace_object_type);
PyModule_AddObject (gdb_module, "Progspace", (PyObject *) &pspace_object_type);
PyModule_AddObject (gdb_module, "Progspace",
(PyObject *) &pspace_object_type);
}

View File

@@ -339,7 +339,8 @@ gdbpy_initialize_symbols (void)
PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_BLOCK", LOC_BLOCK);
PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_CONST_BYTES",
LOC_CONST_BYTES);
PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_UNRESOLVED", LOC_UNRESOLVED);
PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_UNRESOLVED",
LOC_UNRESOLVED);
PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_OPTIMIZED_OUT",
LOC_OPTIMIZED_OUT);
PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_COMPUTED", LOC_COMPUTED);
@@ -367,7 +368,8 @@ static PyGetSetDef symbol_object_getset[] = {
{ "name", sympy_get_name, NULL,
"Name of the symbol, as it appears in the source code.", NULL },
{ "linkage_name", sympy_get_linkage_name, NULL,
"Name of the symbol, as used by the linker (i.e., may be mangled).", NULL },
"Name of the symbol, as used by the linker (i.e., may be mangled).",
NULL },
{ "print_name", sympy_get_print_name, NULL,
"Name of the symbol in a form suitable for output.\n\
This is either name or linkage_name, depending on whether the user asked GDB\n\

View File

@@ -321,7 +321,8 @@ valpy_lazy_string (PyObject *self, PyObject *args, PyObject *kw)
value = value_ind (value);
str_obj = gdbpy_create_lazy_string_object (value_address (value), length,
user_encoding, value_type (value));
user_encoding,
value_type (value));
return (PyObject *) str_obj;
}
@@ -1178,7 +1179,8 @@ convert_value_from_python (PyObject *obj)
value = value_copy (((value_object *) result)->value);
}
else
PyErr_Format (PyExc_TypeError, _("Could not convert Python object: %s."),
PyErr_Format (PyExc_TypeError,
_("Could not convert Python object: %s."),
PyString_AsString (PyObject_Str (obj)));
}
if (except.reason < 0)
@@ -1238,7 +1240,8 @@ static PyGetSetDef value_object_getset[] = {
{ "address", valpy_get_address, NULL, "The address of the value.",
NULL },
{ "is_optimized_out", valpy_get_is_optimized_out, NULL,
"Boolean telling whether the value is optimized out (i.e., not available).",
"Boolean telling whether the value is optimized "
"out (i.e., not available).",
NULL },
{ "type", valpy_get_type, NULL, "Type of the value.", NULL },
{ "dynamic_type", valpy_get_dynamic_type, NULL,
@@ -1258,7 +1261,8 @@ Cast the value to the supplied type, as if by the C++\n\
reinterpret_cast operator."
},
{ "dereference", valpy_dereference, METH_NOARGS, "Dereferences the value." },
{ "lazy_string", (PyCFunction) valpy_lazy_string, METH_VARARGS | METH_KEYWORDS,
{ "lazy_string", (PyCFunction) valpy_lazy_string,
METH_VARARGS | METH_KEYWORDS,
"lazy_string ([encoding] [, length]) -> lazy_string\n\
Return a lazy string representation of the value." },
{ "string", (PyCFunction) valpy_string, METH_VARARGS | METH_KEYWORDS,
@@ -1320,7 +1324,8 @@ PyTypeObject value_object_type = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES | Py_TPFLAGS_BASETYPE, /*tp_flags*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES
| Py_TPFLAGS_BASETYPE, /*tp_flags*/
"GDB value object", /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */

View File

@@ -114,7 +114,8 @@ PyObject *gdbpy_selected_frame (PyObject *self, PyObject *args);
PyObject *gdbpy_block_for_pc (PyObject *self, PyObject *args);
PyObject *gdbpy_lookup_type (PyObject *self, PyObject *args, PyObject *kw);
PyObject *gdbpy_create_lazy_string_object (CORE_ADDR address, long length,
const char *encoding, struct type *type);
const char *encoding,
struct type *type);
PyObject *gdbpy_inferiors (PyObject *unused, PyObject *unused2);
PyObject *gdbpy_selected_thread (PyObject *self, PyObject *args);
PyObject *gdbpy_string_to_argv (PyObject *self, PyObject *args);

View File

@@ -436,7 +436,8 @@ gdbpy_solib_name (PyObject *self, PyObject *args)
static PyObject *
gdbpy_decode_line (PyObject *self, PyObject *args)
{
struct symtabs_and_lines sals = { NULL, 0 }; /* Initialize to appease gcc. */
struct symtabs_and_lines sals = { NULL, 0 }; /* Initialize to
appease gcc. */
struct symtab_and_line sal;
char *arg = NULL;
char *copy = NULL;
@@ -960,7 +961,8 @@ Enables or disables printing of Python stack traces."),
/* The casts to (char*) are for python 2.4. */
PyModule_AddStringConstant (gdb_module, "VERSION", (char*) version);
PyModule_AddStringConstant (gdb_module, "HOST_CONFIG", (char*) host_name);
PyModule_AddStringConstant (gdb_module, "TARGET_CONFIG", (char*) target_name);
PyModule_AddStringConstant (gdb_module, "TARGET_CONFIG",
(char*) target_name);
/* gdb.parameter ("data-directory") doesn't necessarily exist when the python
script below is run (depending on order of _initialize_* functions).