Skip to content

Commit 256458b

Browse files
committed
Remove trailing whitespace.
Whitespace cleanup. * python/py-breakpoint.c: Remove trailing whitespace. * python/py-cmd.c: Ditto. * python/py-evts.c: Ditto. * python/py-finishbreakpoint.c: Ditto. * python/py-frame.c: Ditto. * python/py-function.c: Ditto. * python/py-inferior.c: Ditto. * python/py-infthread.c: Ditto. * python/py-param.c: Ditto. * python/py-prettyprint.c: Ditto. * python/py-symbol.c: Ditto. * python/py-type.c: Ditto. * python/py-utils.c: Ditto. * python/py-value.c: Ditto. * python/python-internal.h: Ditto. * python/python.c: Ditto.
1 parent c9ae340 commit 256458b

17 files changed

Lines changed: 126 additions & 106 deletions

‎gdb/ChangeLog‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
2013-11-29 Doug Evans <xdje42@gmail.com>
2+
3+
Whitespace cleanup.
4+
* python/py-breakpoint.c: Remove trailing whitespace.
5+
* python/py-cmd.c: Ditto.
6+
* python/py-evts.c: Ditto.
7+
* python/py-finishbreakpoint.c: Ditto.
8+
* python/py-frame.c: Ditto.
9+
* python/py-function.c: Ditto.
10+
* python/py-inferior.c: Ditto.
11+
* python/py-infthread.c: Ditto.
12+
* python/py-param.c: Ditto.
13+
* python/py-prettyprint.c: Ditto.
14+
* python/py-symbol.c: Ditto.
15+
* python/py-type.c: Ditto.
16+
* python/py-utils.c: Ditto.
17+
* python/py-value.c: Ditto.
18+
* python/python-internal.h: Ditto.
19+
* python/python.c: Ditto.
20+
121
2013-11-29 Pedro Alves <palves@redhat.com>
222

323
* unwind_stop_reasons.def (UNWIND_NULL_ID): Update comment.

‎gdb/python/py-breakpoint.c‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ bppy_set_enabled (PyObject *self, PyObject *newvalue, void *closure)
121121

122122
if (newvalue == NULL)
123123
{
124-
PyErr_SetString (PyExc_TypeError,
124+
PyErr_SetString (PyExc_TypeError,
125125
_("Cannot delete `enabled' attribute."));
126126

127127
return -1;
@@ -160,7 +160,7 @@ bppy_set_silent (PyObject *self, PyObject *newvalue, void *closure)
160160

161161
if (newvalue == NULL)
162162
{
163-
PyErr_SetString (PyExc_TypeError,
163+
PyErr_SetString (PyExc_TypeError,
164164
_("Cannot delete `silent' attribute."));
165165
return -1;
166166
}
@@ -191,7 +191,7 @@ bppy_set_thread (PyObject *self, PyObject *newvalue, void *closure)
191191

192192
if (newvalue == NULL)
193193
{
194-
PyErr_SetString (PyExc_TypeError,
194+
PyErr_SetString (PyExc_TypeError,
195195
_("Cannot delete `thread' attribute."));
196196
return -1;
197197
}
@@ -202,7 +202,7 @@ bppy_set_thread (PyObject *self, PyObject *newvalue, void *closure)
202202

203203
if (! valid_thread_id (id))
204204
{
205-
PyErr_SetString (PyExc_RuntimeError,
205+
PyErr_SetString (PyExc_RuntimeError,
206206
_("Invalid thread ID."));
207207
return -1;
208208
}
@@ -234,7 +234,7 @@ bppy_set_task (PyObject *self, PyObject *newvalue, void *closure)
234234

235235
if (newvalue == NULL)
236236
{
237-
PyErr_SetString (PyExc_TypeError,
237+
PyErr_SetString (PyExc_TypeError,
238238
_("Cannot delete `task' attribute."));
239239
return -1;
240240
}
@@ -251,7 +251,7 @@ bppy_set_task (PyObject *self, PyObject *newvalue, void *closure)
251251

252252
if (! valid_id)
253253
{
254-
PyErr_SetString (PyExc_RuntimeError,
254+
PyErr_SetString (PyExc_RuntimeError,
255255
_("Invalid task ID."));
256256
return -1;
257257
}
@@ -341,7 +341,7 @@ bppy_set_hit_count (PyObject *self, PyObject *newvalue, void *closure)
341341

342342
if (newvalue == NULL)
343343
{
344-
PyErr_SetString (PyExc_TypeError,
344+
PyErr_SetString (PyExc_TypeError,
345345
_("Cannot delete `hit_count' attribute."));
346346
return -1;
347347
}
@@ -436,7 +436,7 @@ bppy_set_condition (PyObject *self, PyObject *newvalue, void *closure)
436436

437437
if (newvalue == NULL)
438438
{
439-
PyErr_SetString (PyExc_TypeError,
439+
PyErr_SetString (PyExc_TypeError,
440440
_("Cannot delete `condition' attribute."));
441441
return -1;
442442
}
@@ -644,7 +644,7 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs)
644644
bppy_pending_object = (gdbpy_breakpoint_object *) self;
645645
bppy_pending_object->number = -1;
646646
bppy_pending_object->bp = NULL;
647-
647+
648648
TRY_CATCH (except, RETURN_MASK_ALL)
649649
{
650650
char *copy = xstrdup (spec);
@@ -805,7 +805,7 @@ gdbpy_breakpoint_has_py_cond (struct gdbpy_breakpoint_object *bp_obj)
805805
struct gdbarch *garch = bp_obj->bp->gdbarch ? bp_obj->bp->gdbarch :
806806
get_current_arch ();
807807
struct cleanup *cleanup = ensure_python_env (garch, current_language);
808-
808+
809809
if (py_bp != NULL)
810810
has_func = PyObject_HasAttrString (py_bp, stop_func);
811811

@@ -829,9 +829,9 @@ gdbpy_breakpoint_created (struct breakpoint *bp)
829829
if (bp->number < 0 && bppy_pending_object == NULL)
830830
return;
831831

832-
if (bp->type != bp_breakpoint
832+
if (bp->type != bp_breakpoint
833833
&& bp->type != bp_watchpoint
834-
&& bp->type != bp_hardware_watchpoint
834+
&& bp->type != bp_hardware_watchpoint
835835
&& bp->type != bp_read_watchpoint
836836
&& bp->type != bp_access_watchpoint)
837837
return;
@@ -937,31 +937,31 @@ gdbpy_initialize_breakpoints (void)
937937
PyObject_GenericSetAttr to allow extra validation of the attribute
938938
being set. */
939939

940-
static int
940+
static int
941941
local_setattro (PyObject *self, PyObject *name, PyObject *v)
942942
{
943-
gdbpy_breakpoint_object *obj = (gdbpy_breakpoint_object *) self;
943+
gdbpy_breakpoint_object *obj = (gdbpy_breakpoint_object *) self;
944944
char *attr = python_string_to_host_string (name);
945-
945+
946946
if (attr == NULL)
947947
return -1;
948-
948+
949949
/* If the attribute trying to be set is the "stop" method,
950950
but we already have a condition set in the CLI, disallow this
951951
operation. */
952952
if (strcmp (attr, stop_func) == 0 && obj->bp->cond_string)
953953
{
954954
xfree (attr);
955-
PyErr_SetString (PyExc_RuntimeError,
955+
PyErr_SetString (PyExc_RuntimeError,
956956
_("Cannot set 'stop' method. There is an " \
957957
"existing GDB condition attached to the " \
958958
"breakpoint."));
959959
return -1;
960960
}
961-
961+
962962
xfree (attr);
963-
964-
return PyObject_GenericSetAttr ((PyObject *)self, name, v);
963+
964+
return PyObject_GenericSetAttr ((PyObject *)self, name, v);
965965
}
966966

967967
static PyGetSetDef breakpoint_object_getset[] = {

‎gdb/python/py-cmd.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,14 +308,14 @@ cmdpy_completer (struct cmd_list_element *command,
308308

309309
/* Helper for cmdpy_init which locates the command list to use and
310310
pulls out the command name.
311-
311+
312312
NAME is the command name list. The final word in the list is the
313313
name of the new command. All earlier words must be existing prefix
314314
commands.
315315
316316
*BASE_LIST is set to the final prefix command's list of
317317
*sub-commands.
318-
318+
319319
START_LIST is the list in which the search starts.
320320
321321
This function returns the xmalloc()d name of the new command. On
@@ -464,16 +464,16 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kw)
464464
return -1;
465465

466466
pfx_name = NULL;
467-
if (is_prefix != NULL)
467+
if (is_prefix != NULL)
468468
{
469469
cmp = PyObject_IsTrue (is_prefix);
470470
if (cmp == 1)
471471
{
472472
int i, out;
473-
473+
474474
/* Make a normalized form of the command name. */
475475
pfx_name = xmalloc (strlen (name) + 2);
476-
476+
477477
i = 0;
478478
out = 0;
479479
while (name[i])

‎gdb/python/py-evts.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static struct PyModuleDef EventModuleDef =
2626
PyModuleDef_HEAD_INIT,
2727
"gdb.events",
2828
NULL,
29-
-1,
29+
-1,
3030
NULL,
3131
NULL,
3232
NULL,

‎gdb/python/py-finishbreakpoint.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
185185

186186
if (frame == NULL)
187187
{
188-
PyErr_SetString (PyExc_ValueError,
188+
PyErr_SetString (PyExc_ValueError,
189189
_("Invalid ID for the `frame' object."));
190190
}
191191
else
@@ -232,9 +232,9 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
232232
if (internal)
233233
{
234234
internal_bp = PyObject_IsTrue (internal);
235-
if (internal_bp == -1)
235+
if (internal_bp == -1)
236236
{
237-
PyErr_SetString (PyExc_ValueError,
237+
PyErr_SetString (PyExc_ValueError,
238238
_("The value of `internal' must be a boolean."));
239239
return -1;
240240
}
@@ -303,10 +303,10 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
303303
0, 1, internal_bp, 0);
304304
}
305305
GDB_PY_SET_HANDLE_EXCEPTION (except);
306-
306+
307307
self_bpfinish->py_bp.bp->frame_id = frame_id;
308308
self_bpfinish->py_bp.is_finish_bp = 1;
309-
309+
310310
/* Bind the breakpoint with the current program space. */
311311
self_bpfinish->py_bp.bp->pspace = current_program_space;
312312

@@ -347,7 +347,7 @@ bpfinishpy_detect_out_scope_cb (struct breakpoint *b, void *args)
347347
struct breakpoint *bp_stopped = (struct breakpoint *) args;
348348
PyObject *py_bp = (PyObject *) b->py_bp_object;
349349
struct gdbarch *garch = b->gdbarch ? b->gdbarch : get_current_arch ();
350-
350+
351351
/* Trigger out_of_scope if this is a FinishBreakpoint and its frame is
352352
not anymore in the current callstack. */
353353
if (py_bp != NULL && b->py_bp_object->is_finish_bp)
@@ -412,11 +412,11 @@ gdbpy_initialize_finishbreakpoints (void)
412412
{
413413
if (PyType_Ready (&finish_breakpoint_object_type) < 0)
414414
return -1;
415-
415+
416416
if (gdb_pymodule_addobject (gdb_module, "FinishBreakpoint",
417417
(PyObject *) &finish_breakpoint_object_type) < 0)
418418
return -1;
419-
419+
420420
observer_attach_normal_stop (bpfinishpy_handle_stop);
421421
observer_attach_inferior_exit (bpfinishpy_handle_exit);
422422

‎gdb/python/py-frame.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ typedef struct {
6161
struct frame_info *
6262
frame_object_to_frame_info (PyObject *obj)
6363
{
64-
frame_object *frame_obj = (frame_object *) obj;
64+
frame_object *frame_obj = (frame_object *) obj;
6565
struct frame_info *frame;
6666

6767
frame = frame_find_by_id (frame_obj->frame_id);
@@ -583,7 +583,7 @@ gdbpy_frame_stop_reason_string (PyObject *self, PyObject *args)
583583

584584
if (reason < UNWIND_FIRST || reason > UNWIND_LAST)
585585
{
586-
PyErr_SetString (PyExc_ValueError,
586+
PyErr_SetString (PyExc_ValueError,
587587
_("Invalid frame stop reason."));
588588
return NULL;
589589
}

‎gdb/python/py-function.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ convert_values_to_python (int argc, struct value **argv)
3939
{
4040
int i;
4141
PyObject *result = PyTuple_New (argc);
42-
42+
4343
if (! result)
4444
return NULL;
4545

‎gdb/python/py-inferior.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ delete_thread_object (struct thread_info *tp, int ignore)
274274
struct cleanup *cleanup;
275275
inferior_object *inf_obj;
276276
struct threadlist_entry **entry, *tmp;
277-
277+
278278
if (!gdb_python_initialized)
279279
return;
280280

@@ -559,9 +559,9 @@ get_buffer (PyObject *self, Py_buffer *buf, int flags)
559559
{
560560
membuf_object *membuf_obj = (membuf_object *) self;
561561
int ret;
562-
562+
563563
ret = PyBuffer_FillInfo (buf, self, membuf_obj->buffer,
564-
membuf_obj->length, 0,
564+
membuf_obj->length, 0,
565565
PyBUF_CONTIG);
566566
buf->format = "c";
567567

@@ -647,7 +647,7 @@ infpy_search_memory (PyObject *self, PyObject *args, PyObject *kw)
647647
pattern_size = pybuf.len;
648648
#else
649649
PyObject *pattern;
650-
650+
651651
if (! PyArg_ParseTupleAndKeywords (args, kw, "OOO", keywords,
652652
&start_addr_obj, &length_obj,
653653
&pattern))
@@ -667,7 +667,7 @@ infpy_search_memory (PyObject *self, PyObject *args, PyObject *kw)
667667

668668
if (get_addr_from_python (start_addr_obj, &start_addr) < 0)
669669
goto fail;
670-
670+
671671
if (get_addr_from_python (length_obj, &length) < 0)
672672
goto fail;
673673

‎gdb/python/py-infthread.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ thpy_set_name (PyObject *self, PyObject *newvalue, void *ignore)
9595

9696
if (newvalue == NULL)
9797
{
98-
PyErr_SetString (PyExc_TypeError,
98+
PyErr_SetString (PyExc_TypeError,
9999
_("Cannot delete `name' attribute."));
100100
return -1;
101101
}

0 commit comments

Comments
 (0)