2010-05-17 Michael Snyder <msnyder@vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Mon, 17 May 2010 21:23:25 +0000 (21:23 +0000)
committerMichael Snyder <msnyder@vmware.com>
Mon, 17 May 2010 21:23:25 +0000 (21:23 +0000)
* 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.

16 files changed:
gdb/ChangeLog
gdb/python/py-auto-load.c
gdb/python/py-block.c
gdb/python/py-breakpoint.c
gdb/python/py-cmd.c
gdb/python/py-function.c
gdb/python/py-lazy-string.c
gdb/python/py-objfile.c
gdb/python/py-param.c
gdb/python/py-prettyprint.c
gdb/python/py-progspace.c
gdb/python/py-symtab.c
gdb/python/py-type.c
gdb/python/py-utils.c
gdb/python/py-value.c
gdb/python/python.c

index a05f867a7cf1229fedff6bf1a807523cbc9fefb6..cd91d9d0cb96c8df8421c89ca7c9f87d3f4bb29d 100644 (file)
@@ -1,5 +1,21 @@
 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.
+
        * mi/mi-cmd-break.c: White space.
        * mi/mi-cmd-env.c: White space.
        * mi/mi-cmds.c: White space.
index 932ae68d0b19d878a9c4de7b011c0338bdaf3a37..044d968b57584c7e936951438c7f5f904ea9bf58 100644 (file)
@@ -128,6 +128,7 @@ static hashval_t
 hash_loaded_script_entry (const void *data)
 {
   const struct loaded_script_entry *e = data;
+
   return htab_hash_string (e->name);
 }
 
@@ -138,6 +139,7 @@ eq_loaded_script_entry (const void *a, const void *b)
 {
   const struct loaded_script_entry *ea = a;
   const struct loaded_script_entry *eb = b;
+
   return strcmp (ea->name, eb->name) == 0;
 }
 
@@ -202,6 +204,7 @@ source_section_scripts (struct objfile *objfile, const char *source_name,
       if (p == end)
        {
          char *buf = alloca (p - file + 1);
+
          memcpy (buf, file, p - file);
          buf[p - file] = '\0';
          warning (_("Non-null-terminated path in %s: %s"),
@@ -236,6 +239,7 @@ source_section_scripts (struct objfile *objfile, const char *source_name,
       if (! in_hash_table)
        {
          char *p;
+
          *slot = xmalloc (sizeof (**slot)
                           + strlen (file) + 1
                           + (opened ? (strlen (full_path) + 1) : 0));
index 40551743e59029c918f96acaff754f43424b5c12..8d7fb79231146093f91419144374ad5331178e5d 100644 (file)
@@ -259,6 +259,7 @@ static void
 blpy_block_syms_dealloc (PyObject *obj)
 {
   block_syms_iterator_object *iter_obj = (block_syms_iterator_object *) obj;
+
   Py_XDECREF (iter_obj->source);
 }
 
@@ -300,6 +301,7 @@ static void
 del_objfile_blocks (struct objfile *objfile, void *datum)
 {
   block_object *obj = datum;
+
   while (obj)
     {
       block_object *next = obj->next;
index 24eebb7759da8fde8fb8a722f36a4920cf26358c..fb96b54251661f1d4f33f9a96605cba0af643443 100644 (file)
@@ -642,6 +642,7 @@ gdbpy_breakpoints (PyObject *self, PyObject *args)
   if (result)
     {
       int i, out = 0;
+
       for (i = 0; out < bppy_live; ++i)
        {
          if (! bppy_breakpoints[i])
@@ -684,6 +685,7 @@ gdbpy_breakpoint_created (int num)
   if (num >= bppy_slots)
     {
       int old = bppy_slots;
+
       bppy_slots = bppy_slots * 2 + 10;
       bppy_breakpoints
        = (breakpoint_object **) xrealloc (bppy_breakpoints,
index 677a03da5659c2244e9a160486630a621922860a..f9a4130f26db37730f4154d8f2ff856d48aeba84 100644 (file)
@@ -156,8 +156,8 @@ cmdpy_function (struct cmd_list_element *command, char *args, int from_tty)
          /* Make a temporary copy of the string data.  */
          char *s = PyString_AsString (pvalue);
          char *copy = alloca (strlen (s) + 1);
-         strcpy (copy, s);
 
+         strcpy (copy, s);
          PyErr_Restore (ptype, pvalue, ptraceback);
          gdbpy_print_stack ();
          error (_("Error occurred in Python command: %s"), copy);
@@ -217,6 +217,7 @@ cmdpy_completer (struct cmd_list_element *command, char *text, char *word)
     {
       Py_ssize_t i, len = PySequence_Size (resultobj);
       Py_ssize_t out;
+
       if (len < 0)
        goto done;
 
@@ -224,6 +225,7 @@ cmdpy_completer (struct cmd_list_element *command, char *text, char *word)
       for (i = out = 0; i < len; ++i)
        {
          PyObject *elt = PySequence_GetItem (resultobj, i);
+
          if (elt == NULL || ! gdbpy_is_string (elt))
            {
              /* Skip problem elements.  */
@@ -240,6 +242,7 @@ cmdpy_completer (struct cmd_list_element *command, char *text, char *word)
       /* User code may also return one of the completion constants,
         thus requesting that sort of completion.  */
       long value = PyInt_AsLong (resultobj);
+
       if (value >= 0 && value < (long) N_COMPLETERS)
        result = completers[value].completer (command, text, word);
     }
@@ -438,6 +441,7 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kw)
   if (PyObject_HasAttr (self, gdbpy_doc_cst))
     {
       PyObject *ds_obj = PyObject_GetAttr (self, gdbpy_doc_cst);
+
       if (ds_obj && gdbpy_is_string (ds_obj))
        docstring = python_string_to_host_string (ds_obj);
     }
index 7286d646219d0e5f34998978c6e7e7a79e1bf546..f09c6b41c58821bbe0abc1049cad84f7718ffd90 100644 (file)
@@ -38,6 +38,7 @@ convert_values_to_python (int argc, struct value **argv)
 {
   int i;
   PyObject *result = PyTuple_New (argc);
+
   for (i = 0; i < argc; ++i)
     {
       PyObject *elt = value_to_value_object (argv[i]);
@@ -103,6 +104,7 @@ static int
 fnpy_init (PyObject *self, PyObject *args, PyObject *kwds)
 {
   char *name, *docstring = NULL;
+
   if (! PyArg_ParseTuple (args, "s", &name))
     return -1;
   Py_INCREF (self);
index d28aae2ec06a35f191c840c9aa4af26ebe25ebf7..23cf13a0577623cd67bfcc92231687a3318d6887 100644 (file)
@@ -52,6 +52,7 @@ static PyObject *
 stpy_get_address (PyObject *self, void *closure)
 {
   lazy_string_object *self_string = (lazy_string_object *) self;
+
   return PyLong_FromUnsignedLongLong (self_string->address);
 }
 
@@ -78,6 +79,7 @@ static PyObject *
 stpy_get_length (PyObject *self, void *closure)
 {
   lazy_string_object *self_string = (lazy_string_object *) self;
+
   return PyLong_FromLong (self_string->length);
 }
 
@@ -85,6 +87,7 @@ PyObject *
 stpy_get_type (PyObject *self, void *closure)
 {
   lazy_string_object *str_obj = (lazy_string_object *) self;
+
   return type_to_type_object (str_obj->type);
 }
 
@@ -109,6 +112,7 @@ static void
 stpy_dealloc (PyObject *self)
 {
   lazy_string_object *self_string = (lazy_string_object *) self;
+
   xfree (self_string->encoding);
 }
 
index 732edb0077f56787d561965272df716326ff4730..1aa6a4dabca04331feb132cf4c9ed70423e075f3 100644 (file)
@@ -45,6 +45,7 @@ static PyObject *
 objfpy_get_filename (PyObject *self, void *closure)
 {
   objfile_object *obj = (objfile_object *) self;
+
   if (obj->objfile && obj->objfile->name)
     return PyString_Decode (obj->objfile->name, strlen (obj->objfile->name),
                            host_charset (), NULL);
@@ -55,6 +56,7 @@ static void
 objfpy_dealloc (PyObject *o)
 {
   objfile_object *self = (objfile_object *) o;
+
   Py_XDECREF (self->printers);
   self->ob_type->tp_free ((PyObject *) self);
 }
@@ -63,6 +65,7 @@ static PyObject *
 objfpy_new (PyTypeObject *type, PyObject *args, PyObject *keywords)
 {
   objfile_object *self = (objfile_object *) type->tp_alloc (type, 0);
+
   if (self)
     {
       self->objfile = NULL;
@@ -81,6 +84,7 @@ PyObject *
 objfpy_get_printers (PyObject *o, void *ignore)
 {
   objfile_object *self = (objfile_object *) o;
+
   Py_INCREF (self->printers);
   return self->printers;
 }
@@ -90,6 +94,7 @@ objfpy_set_printers (PyObject *o, PyObject *value, void *ignore)
 {
   PyObject *tmp;
   objfile_object *self = (objfile_object *) o;
+
   if (! value)
     {
       PyErr_SetString (PyExc_TypeError,
index e2319e595f31459c30778e29338d6bbc6e11b391..5596eb793ab58215756556c97c9b7153e593ee8b 100644 (file)
@@ -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);
     }
index dcca24d2d0c6a56d39ff41feeefa90501f096c61..e678898c00bb269b5609f53a1e4615adbc223771 100644 (file)
@@ -319,6 +319,7 @@ py_restore_tstate (void *p)
 {
   PyFrameObject *frame = p;
   PyThreadState *tstate = PyThreadState_GET ();
+
   tstate->frame = frame;
 }
 
index ead616ba1edd90f16577272395d560ea59895fe3..87245328c83e4cbca45d161dad0f48fe6b7562f3 100644 (file)
@@ -47,9 +47,11 @@ static PyObject *
 pspy_get_filename (PyObject *self, void *closure)
 {
   pspace_object *obj = (pspace_object *) self;
+
   if (obj->pspace)
     {
       struct objfile *objfile = obj->pspace->symfile_object_file;
+
       if (objfile && objfile->name)
        return PyString_Decode (objfile->name, strlen (objfile->name),
                                host_charset (), NULL);
@@ -61,6 +63,7 @@ static void
 pspy_dealloc (PyObject *self)
 {
   pspace_object *ps_self = (pspace_object *) self;
+
   Py_XDECREF (ps_self->printers);
   self->ob_type->tp_free (self);
 }
@@ -69,6 +72,7 @@ static PyObject *
 pspy_new (PyTypeObject *type, PyObject *args, PyObject *keywords)
 {
   pspace_object *self = (pspace_object *) type->tp_alloc (type, 0);
+
   if (self)
     {
       self->pspace = NULL;
@@ -87,6 +91,7 @@ PyObject *
 pspy_get_printers (PyObject *o, void *ignore)
 {
   pspace_object *self = (pspace_object *) o;
+
   Py_INCREF (self->printers);
   return self->printers;
 }
@@ -96,6 +101,7 @@ pspy_set_printers (PyObject *o, PyObject *value, void *ignore)
 {
   PyObject *tmp;
   pspace_object *self = (pspace_object *) o;
+
   if (! value)
     {
       PyErr_SetString (PyExc_TypeError,
index 6c805b72b2ae8f8efab9b1f6338df503df04acab..5b4294d7eef86794ed8b27ba200474e639e718f4 100644 (file)
@@ -322,8 +322,8 @@ symtab_and_line_to_sal_object (struct symtab_and_line sal)
 {
   sal_object *sal_obj;
   int success = 0;
-  sal_obj = PyObject_New (sal_object, &sal_object_type);
 
+  sal_obj = PyObject_New (sal_object, &sal_object_type);
   if (sal_obj)
     {
       success = set_sal (sal_obj, sal);
@@ -365,6 +365,7 @@ static void
 del_objfile_symtab (struct objfile *objfile, void *datum)
 {
   symtab_object *obj = datum;
+
   while (obj)
     {
       symtab_object *next = obj->next;
@@ -385,6 +386,7 @@ static void
 del_objfile_sal (struct objfile *objfile, void *datum)
 {
   sal_object *obj = datum;
+
   while (obj)
     {
       sal_object *next = obj->next;
index ef658dfa79b3e5c94d9a7471a5065d3a7bd7d2da..b9012554350d6c3ec13adb50d0f75883b6038658 100644 (file)
@@ -101,6 +101,7 @@ static void
 field_dealloc (PyObject *obj)
 {
   field_object *f = (field_object *) obj;
+
   Py_XDECREF (f->dict);
   f->ob_type->tp_free (obj);
 }
@@ -109,6 +110,7 @@ static PyObject *
 field_new (void)
 {
   field_object *result = PyObject_New (field_object, &field_object_type);
+
   if (result)
     {
       result->dict = PyDict_New ();
@@ -128,6 +130,7 @@ static PyObject *
 typy_get_code (PyObject *self, void *closure)
 {
   struct type *type = ((type_object *) self)->type;
+
   return PyInt_FromLong (TYPE_CODE (type));
 }
 
@@ -222,6 +225,7 @@ typy_fields (PyObject *self, PyObject *args)
   for (i = 0; i < TYPE_NFIELDS (type); ++i)
     {
       PyObject *dict = convert_field (type, i);
+
       if (!dict)
        {
          Py_DECREF (result);
@@ -243,6 +247,7 @@ static PyObject *
 typy_get_tag (PyObject *self, void *closure)
 {
   struct type *type = ((type_object *) self)->type;
+
   if (!TYPE_TAG_NAME (type))
     Py_RETURN_NONE;
   return PyString_FromString (TYPE_TAG_NAME (type));
@@ -439,6 +444,7 @@ typy_lookup_typename (char *type_name, struct block *block)
 {
   struct type *type = NULL;
   volatile struct gdb_exception except;
+
   TRY_CATCH (except, RETURN_MASK_ALL)
     {
       if (!strncmp (type_name, "struct ", 7))
@@ -675,6 +681,7 @@ typy_dealloc (PyObject *obj)
     {
       /* Must reset head of list.  */
       struct objfile *objfile = TYPE_OBJFILE (type->type);
+
       if (objfile)
        set_objfile_data (objfile, typy_objfile_data_key, type->next);
     }
index aed8fffd49fa78ee366ed488737a3f0878ca5e29..cd118341b5526876d61c6e3df6600652f705201a 100644 (file)
@@ -29,6 +29,7 @@ static void
 py_decref (void *p)
 {
   PyObject *py = p;
+
   /* Note that we need the extra braces in this 'if' to avoid a
      warning from gcc.  */
   if (py)
index abf50ffb7eefc67c4c81cb90b83736bb0a8c9368..eb20de8cf2f2a3cfe65913cd5600410fbeb0e80a 100644 (file)
@@ -207,6 +207,7 @@ static PyObject *
 valpy_get_type (PyObject *self, void *closure)
 {
   value_object *obj = (value_object *) self;
+
   if (!obj->type)
     {
       obj->type = type_to_type_object (value_type (obj->value));
@@ -356,11 +357,13 @@ valpy_getitem (PyObject *self, PyObject *key)
             value code throw an exception if the index has an invalid
             type.  */
          struct value *idx = convert_value_from_python (key);
+
          if (idx != NULL)
            {
              /* Check the value's type is something that can be accessed via
                 a subscript.  */
              struct type *type;
+
              tmp = coerce_ref (tmp);
              type = check_typedef (value_type (tmp));
              if (TYPE_CODE (type) != TYPE_CODE_ARRAY
@@ -632,6 +635,7 @@ static PyObject *
 valpy_absolute (PyObject *self)
 {
   struct value *value = ((value_object *) self)->value;
+
   if (value_less (value, value_zero (value_type (value), not_lval)))
     return valpy_negative (self);
   else
@@ -917,6 +921,7 @@ struct value *
 value_object_to_value (PyObject *self)
 {
   value_object *real;
+
   if (! PyObject_TypeCheck (self, &value_object_type))
     return NULL;
   real = (value_object *) self;
@@ -984,6 +989,7 @@ convert_value_from_python (PyObject *obj)
        {
          PyObject *result;
          PyObject *function = PyString_FromString ("value");
+
          result = PyObject_CallMethodObjArgs (obj, function,  NULL);
          value = value_copy (((value_object *) result)->value);
        }
index 0f66f67d81e633b8e0a5589c57d0b1c0be454d14..f03af2e17011697cb57be32859d8504127a1f27d 100644 (file)
@@ -77,6 +77,7 @@ static void
 restore_python_env (void *p)
 {
   struct python_env *env = (struct python_env *)p;
+
   PyGILState_Release (env->state);
   python_gdbarch = env->gdbarch;
   python_language = env->language;
@@ -124,6 +125,7 @@ compute_python_string (struct command_line *l)
   for (iter = l; iter; iter = iter->next)
     {
       int len = strlen (iter->line);
+
       strcpy (&script[here], iter->line);
       here += len;
       script[here++] = '\n';
@@ -165,8 +167,8 @@ static void
 python_command (char *arg, int from_tty)
 {
   struct cleanup *cleanup;
-  cleanup = ensure_python_env (get_current_arch (), current_language);
 
+  cleanup = ensure_python_env (get_current_arch (), current_language);
   while (arg && *arg && isspace (*arg))
     ++arg;
   if (arg && *arg)
@@ -180,6 +182,7 @@ python_command (char *arg, int from_tty)
   else
     {
       struct command_line *l = get_command_line (python_control, "");
+
       make_cleanup_free_command_lines (&l);
       execute_control_command_untraced (l);
     }
@@ -204,6 +207,7 @@ gdbpy_parameter_value (enum var_types type, void *var)
     case var_enum:
       {
        char *str = * (char **) var;
+
        if (! str)
          str = "";
        return PyString_Decode (str, strlen (str), host_charset (), NULL);
@@ -220,6 +224,7 @@ gdbpy_parameter_value (enum var_types type, void *var)
     case var_auto_boolean:
       {
        enum auto_boolean ab = * (enum auto_boolean *) var;
+
        if (ab == AUTO_BOOLEAN_TRUE)
          Py_RETURN_TRUE;
        else if (ab == AUTO_BOOLEAN_FALSE)
@@ -238,6 +243,7 @@ gdbpy_parameter_value (enum var_types type, void *var)
     case var_uinteger:
       {
        unsigned int val = * (unsigned int *) var;
+
        if (val == UINT_MAX)
          Py_RETURN_NONE;
        return PyLong_FromUnsignedLong (val);
@@ -286,6 +292,7 @@ static PyObject *
 gdbpy_target_charset (PyObject *self, PyObject *args)
 {
   const char *cset = target_charset (python_gdbarch);
+
   return PyUnicode_Decode (cset, strlen (cset), host_charset (), NULL);
 }
 
@@ -295,6 +302,7 @@ static PyObject *
 gdbpy_target_wide_charset (PyObject *self, PyObject *args)
 {
   const char *cset = target_wide_charset (python_gdbarch);
+
   return PyUnicode_Decode (cset, strlen (cset), host_charset (), NULL);
 }
 
@@ -326,6 +334,7 @@ execute_gdb_command (PyObject *self, PyObject *args)
       /* Copy the argument text in case the command modifies it.  */
       char *copy = xstrdup (arg);
       struct cleanup *cleanup = make_cleanup (xfree, copy);
+
       execute_command (copy, from_tty);
       do_cleanups (cleanup);
     }
@@ -383,6 +392,7 @@ static PyObject *
 gdbpy_write (PyObject *self, PyObject *args)
 {
   char *arg;
+
   if (! PyArg_ParseTuple (args, "s", &arg))
     return NULL;
   printf_filtered ("%s", arg);
@@ -440,6 +450,7 @@ gdbpy_progspaces (PyObject *unused1, PyObject *unused2)
   ALL_PSPACES (ps)
   {
     PyObject *item = pspace_to_pspace_object (ps);
+
     if (!item || PyList_Append (list, item) == -1)
       {
        Py_DECREF (list);
@@ -509,6 +520,7 @@ gdbpy_objfiles (PyObject *unused1, PyObject *unused2)
   ALL_OBJFILES (objf)
   {
     PyObject *item = objfile_to_objfile_object (objf);
+
     if (!item || PyList_Append (list, item) == -1)
       {
        Py_DECREF (list);
@@ -534,6 +546,7 @@ python_command (char *arg, int from_tty)
     {
       struct command_line *l = get_command_line (python_control, "");
       struct cleanup *cleanups = make_cleanup_free_command_lines (&l);
+
       execute_control_command_untraced (l);
       do_cleanups (cleanups);
     }
This page took 0.039472 seconds and 4 git commands to generate.