public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] python: fix Linetable case to LineTable in docstrings and comments
@ 2015-07-25 14:19 Ciro Santilli
  2015-07-30 12:34 ` Ciro Santilli
  2015-08-04 16:56 ` Joel Brobecker
  0 siblings, 2 replies; 4+ messages in thread
From: Ciro Santilli @ 2015-07-25 14:19 UTC (permalink / raw)
  To: gdb-patches

This annoyed me a bit when doing help(gdb) as searches would fail.

Also profited to fix it the source comments as well to improve grepping.

From 53bb5d1e5c65a361f0165c70cef4ab9f4b5a02f0 Mon Sep 17 00:00:00 2001
From: Ciro Santilli <ciro.santilli@gmail.com>
Date: Thu, 23 Jul 2015 20:21:30 +0200
Subject: [PATCH] python: fix Linetable case to LineTable in docstrings and
 comments

The class is called LineTable, not Linetable, as specified by
py-linetable.c/gdbpy_initialize_linetable:

    if (gdb_pymodule_addobject (gdb_module, "LineTable",

gdb:

2015-07-24  Ciro Santilli  <ciro.santilli@gmail.com>

    * python/py-linetable.c: Fix case of Linetable to LineTable
    in docstrings and code comments.
    * python/py-symtab.c: Same.
---
 gdb/python/py-linetable.c | 14 +++++++-------
 gdb/python/py-symtab.c    |  8 ++++----
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/gdb/python/py-linetable.c b/gdb/python/py-linetable.c
index 82b4cfc..ff4414e 100644
--- a/gdb/python/py-linetable.c
+++ b/gdb/python/py-linetable.c
@@ -55,7 +55,7 @@ typedef struct {
 extern PyTypeObject ltpy_iterator_object_type
     CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("ltpy_iterator_object");

-/* Internal helper function to extract gdb.Symtab from a gdb.Linetable
+/* Internal helper function to extract gdb.Symtab from a gdb.LineTable
    object.  */

 static PyObject *
@@ -288,7 +288,7 @@ ltpy_get_all_source_lines (PyObject *self, PyObject *args)
   return source_list;
 }

-/* Implementation of gdb.Linetable.is_valid (self) -> Boolean.
+/* Implementation of gdb.LineTable.is_valid (self) -> Boolean.
    Returns True if this line table object still exists in GDB.  */

 static PyObject *
@@ -349,7 +349,7 @@ gdbpy_initialize_linetable (void)
   return 0;
 }

-/* Linetable entry object get functions.  */
+/* LineTable entry object get functions.  */

 /* Implementation of gdb.LineTableEntry.line (self) -> Long.  Returns
    a long integer associated with the line table entry.  */
@@ -373,7 +373,7 @@ ltpy_entry_get_pc (PyObject *self, void *closure)
   return  gdb_py_object_from_longest (obj->pc);
 }

-/* Linetable iterator functions.  */
+/* LineTable iterator functions.  */

 /* Return a new line table iterator.  */

@@ -460,7 +460,7 @@ ltpy_iternext (PyObject *self)
   return NULL;
 }

-/* Implementation of gdb.LinetableIterator.is_valid (self) -> Boolean.
+/* Implementation of gdb.LineTableIterator.is_valid (self) -> Boolean.
    Returns True if this line table iterator object still exists in
    GDB.  */

@@ -492,7 +492,7 @@ Return TRUE if this line has executable
information, FALSE if not." },
 Return a list of all executable source lines." },
   { "is_valid", ltpy_is_valid, METH_NOARGS,
     "is_valid () -> Boolean.\n\
-Return True if this Linetable is valid, False if not." },
+Return True if this LineTable is valid, False if not." },
   {NULL}  /* Sentinel */
 };

@@ -539,7 +539,7 @@ PyTypeObject linetable_object_type = {
 static PyMethodDef ltpy_iterator_methods[] = {
   { "is_valid", ltpy_iter_is_valid, METH_NOARGS,
     "is_valid () -> Boolean.\n\
-Return True if this Linetable iterator is valid, False if not." },
+Return True if this LineTable iterator is valid, False if not." },
   {NULL}  /* Sentinel */
 };

diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index 796a7fc..7c428a4 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -207,8 +207,8 @@ stpy_static_block (PyObject *self, PyObject *args)
   return block_to_block_object (block, SYMTAB_OBJFILE (symtab));
 }

-/* Implementation of gdb.Symtab.linetable (self) -> gdb.Linetable.
-   Returns a gdb.Linetable object corresponding to this symbol
+/* Implementation of gdb.Symtab.linetable (self) -> gdb.LineTable.
+   Returns a gdb.LineTable object corresponding to this symbol
    table.  */

 static PyObject *
@@ -571,8 +571,8 @@ Return the global block of the symbol table." },
     "static_block () -> gdb.Block.\n\
 Return the static block of the symbol table." },
     { "linetable", stpy_get_linetable, METH_NOARGS,
-    "linetable () -> gdb.Linetable.\n\
-Return the Linetable associated with this symbol table" },
+    "linetable () -> gdb.LineTable.\n\
+Return the LineTable associated with this symbol table" },
   {NULL}  /* Sentinel */
 };

-- 
1.9.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] python: fix Linetable case to LineTable in docstrings and comments
  2015-07-25 14:19 [PATCH] python: fix Linetable case to LineTable in docstrings and comments Ciro Santilli
@ 2015-07-30 12:34 ` Ciro Santilli
  2015-08-04 16:56 ` Joel Brobecker
  1 sibling, 0 replies; 4+ messages in thread
From: Ciro Santilli @ 2015-07-30 12:34 UTC (permalink / raw)
  To: gdb-patches

Ping.

On Sat, Jul 25, 2015 at 4:19 PM, Ciro Santilli <ciro.santilli@gmail.com> wrote:
> This annoyed me a bit when doing help(gdb) as searches would fail.
>
> Also profited to fix it the source comments as well to improve grepping.
>
> From 53bb5d1e5c65a361f0165c70cef4ab9f4b5a02f0 Mon Sep 17 00:00:00 2001
> From: Ciro Santilli <ciro.santilli@gmail.com>
> Date: Thu, 23 Jul 2015 20:21:30 +0200
> Subject: [PATCH] python: fix Linetable case to LineTable in docstrings and
>  comments
>
> The class is called LineTable, not Linetable, as specified by
> py-linetable.c/gdbpy_initialize_linetable:
>
>     if (gdb_pymodule_addobject (gdb_module, "LineTable",
>
> gdb:
>
> 2015-07-24  Ciro Santilli  <ciro.santilli@gmail.com>
>
>     * python/py-linetable.c: Fix case of Linetable to LineTable
>     in docstrings and code comments.
>     * python/py-symtab.c: Same.
> ---
>  gdb/python/py-linetable.c | 14 +++++++-------
>  gdb/python/py-symtab.c    |  8 ++++----
>  2 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/gdb/python/py-linetable.c b/gdb/python/py-linetable.c
> index 82b4cfc..ff4414e 100644
> --- a/gdb/python/py-linetable.c
> +++ b/gdb/python/py-linetable.c
> @@ -55,7 +55,7 @@ typedef struct {
>  extern PyTypeObject ltpy_iterator_object_type
>      CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("ltpy_iterator_object");
>
> -/* Internal helper function to extract gdb.Symtab from a gdb.Linetable
> +/* Internal helper function to extract gdb.Symtab from a gdb.LineTable
>     object.  */
>
>  static PyObject *
> @@ -288,7 +288,7 @@ ltpy_get_all_source_lines (PyObject *self, PyObject *args)
>    return source_list;
>  }
>
> -/* Implementation of gdb.Linetable.is_valid (self) -> Boolean.
> +/* Implementation of gdb.LineTable.is_valid (self) -> Boolean.
>     Returns True if this line table object still exists in GDB.  */
>
>  static PyObject *
> @@ -349,7 +349,7 @@ gdbpy_initialize_linetable (void)
>    return 0;
>  }
>
> -/* Linetable entry object get functions.  */
> +/* LineTable entry object get functions.  */
>
>  /* Implementation of gdb.LineTableEntry.line (self) -> Long.  Returns
>     a long integer associated with the line table entry.  */
> @@ -373,7 +373,7 @@ ltpy_entry_get_pc (PyObject *self, void *closure)
>    return  gdb_py_object_from_longest (obj->pc);
>  }
>
> -/* Linetable iterator functions.  */
> +/* LineTable iterator functions.  */
>
>  /* Return a new line table iterator.  */
>
> @@ -460,7 +460,7 @@ ltpy_iternext (PyObject *self)
>    return NULL;
>  }
>
> -/* Implementation of gdb.LinetableIterator.is_valid (self) -> Boolean.
> +/* Implementation of gdb.LineTableIterator.is_valid (self) -> Boolean.
>     Returns True if this line table iterator object still exists in
>     GDB.  */
>
> @@ -492,7 +492,7 @@ Return TRUE if this line has executable
> information, FALSE if not." },
>  Return a list of all executable source lines." },
>    { "is_valid", ltpy_is_valid, METH_NOARGS,
>      "is_valid () -> Boolean.\n\
> -Return True if this Linetable is valid, False if not." },
> +Return True if this LineTable is valid, False if not." },
>    {NULL}  /* Sentinel */
>  };
>
> @@ -539,7 +539,7 @@ PyTypeObject linetable_object_type = {
>  static PyMethodDef ltpy_iterator_methods[] = {
>    { "is_valid", ltpy_iter_is_valid, METH_NOARGS,
>      "is_valid () -> Boolean.\n\
> -Return True if this Linetable iterator is valid, False if not." },
> +Return True if this LineTable iterator is valid, False if not." },
>    {NULL}  /* Sentinel */
>  };
>
> diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
> index 796a7fc..7c428a4 100644
> --- a/gdb/python/py-symtab.c
> +++ b/gdb/python/py-symtab.c
> @@ -207,8 +207,8 @@ stpy_static_block (PyObject *self, PyObject *args)
>    return block_to_block_object (block, SYMTAB_OBJFILE (symtab));
>  }
>
> -/* Implementation of gdb.Symtab.linetable (self) -> gdb.Linetable.
> -   Returns a gdb.Linetable object corresponding to this symbol
> +/* Implementation of gdb.Symtab.linetable (self) -> gdb.LineTable.
> +   Returns a gdb.LineTable object corresponding to this symbol
>     table.  */
>
>  static PyObject *
> @@ -571,8 +571,8 @@ Return the global block of the symbol table." },
>      "static_block () -> gdb.Block.\n\
>  Return the static block of the symbol table." },
>      { "linetable", stpy_get_linetable, METH_NOARGS,
> -    "linetable () -> gdb.Linetable.\n\
> -Return the Linetable associated with this symbol table" },
> +    "linetable () -> gdb.LineTable.\n\
> +Return the LineTable associated with this symbol table" },
>    {NULL}  /* Sentinel */
>  };
>
> --
> 1.9.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] python: fix Linetable case to LineTable in docstrings and comments
  2015-07-25 14:19 [PATCH] python: fix Linetable case to LineTable in docstrings and comments Ciro Santilli
  2015-07-30 12:34 ` Ciro Santilli
@ 2015-08-04 16:56 ` Joel Brobecker
  2015-08-05  9:25   ` Ciro Santilli
  1 sibling, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2015-08-04 16:56 UTC (permalink / raw)
  To: Ciro Santilli; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

> 2015-07-24  Ciro Santilli  <ciro.santilli@gmail.com>
> 
>     * python/py-linetable.c: Fix case of Linetable to LineTable
>     in docstrings and code comments.
>     * python/py-symtab.c: Same.

Thanks for the patch, and sorry again for the delay. The patch
you sent didn't apply cleanly for some reason, but it was easy
enough to reproduce, so here is what I just pushed (we accepted
it under the "obvious" rule).

Let me know if I missed anything.

-- 
Joel

[-- Attachment #2: 0001-python-fix-Linetable-case-to-LineTable-in-docstrings.patch --]
[-- Type: text/x-diff, Size: 4635 bytes --]

From 4efd80aa8a99adbb38d0719ba56b07c9970793b5 Mon Sep 17 00:00:00 2001
From: Ciro Santilli <ciro.santilli@gmail.com>
Date: Tue, 4 Aug 2015 09:03:15 -0700
Subject: [PATCH] python: fix Linetable case to LineTable in docstrings and
 comments

The class is called LineTable, not Linetable, as specified by
py-linetable.c/gdbpy_initialize_linetable:

    if (gdb_pymodule_addobject (gdb_module, "LineTable",

gdb/ChangeLog:

        * python/py-linetable.c: Fix case of Linetable to LineTable
        in docstrings and code comments.
        * python/py-symtab.c: Same.
---
 gdb/ChangeLog             |  6 ++++++
 gdb/python/py-linetable.c | 14 +++++++-------
 gdb/python/py-symtab.c    |  8 ++++----
 3 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index af41072..4c500df 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2015-08-04  Ciro Santilli  <ciro.santilli@gmail.com>  (obvious patch)
+
+	* python/py-linetable.c: Fix case of Linetable to LineTable
+	in docstrings and code comments.
+	* python/py-symtab.c: Same.
+
 2015-08-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	* infcmd.c (signal_command): Call do_cleanups for args_chain.
diff --git a/gdb/python/py-linetable.c b/gdb/python/py-linetable.c
index 82b4cfc..ff4414e 100644
--- a/gdb/python/py-linetable.c
+++ b/gdb/python/py-linetable.c
@@ -55,7 +55,7 @@ typedef struct {
 extern PyTypeObject ltpy_iterator_object_type
     CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("ltpy_iterator_object");
 
-/* Internal helper function to extract gdb.Symtab from a gdb.Linetable
+/* Internal helper function to extract gdb.Symtab from a gdb.LineTable
    object.  */
 
 static PyObject *
@@ -288,7 +288,7 @@ ltpy_get_all_source_lines (PyObject *self, PyObject *args)
   return source_list;
 }
 
-/* Implementation of gdb.Linetable.is_valid (self) -> Boolean.
+/* Implementation of gdb.LineTable.is_valid (self) -> Boolean.
    Returns True if this line table object still exists in GDB.  */
 
 static PyObject *
@@ -349,7 +349,7 @@ gdbpy_initialize_linetable (void)
   return 0;
 }
 
-/* Linetable entry object get functions.  */
+/* LineTable entry object get functions.  */
 
 /* Implementation of gdb.LineTableEntry.line (self) -> Long.  Returns
    a long integer associated with the line table entry.  */
@@ -373,7 +373,7 @@ ltpy_entry_get_pc (PyObject *self, void *closure)
   return  gdb_py_object_from_longest (obj->pc);
 }
 
-/* Linetable iterator functions.  */
+/* LineTable iterator functions.  */
 
 /* Return a new line table iterator.  */
 
@@ -460,7 +460,7 @@ ltpy_iternext (PyObject *self)
   return NULL;
 }
 
-/* Implementation of gdb.LinetableIterator.is_valid (self) -> Boolean.
+/* Implementation of gdb.LineTableIterator.is_valid (self) -> Boolean.
    Returns True if this line table iterator object still exists in
    GDB.  */
 
@@ -492,7 +492,7 @@ Return TRUE if this line has executable information, FALSE if not." },
 Return a list of all executable source lines." },
   { "is_valid", ltpy_is_valid, METH_NOARGS,
     "is_valid () -> Boolean.\n\
-Return True if this Linetable is valid, False if not." },
+Return True if this LineTable is valid, False if not." },
   {NULL}  /* Sentinel */
 };
 
@@ -539,7 +539,7 @@ PyTypeObject linetable_object_type = {
 static PyMethodDef ltpy_iterator_methods[] = {
   { "is_valid", ltpy_iter_is_valid, METH_NOARGS,
     "is_valid () -> Boolean.\n\
-Return True if this Linetable iterator is valid, False if not." },
+Return True if this LineTable iterator is valid, False if not." },
   {NULL}  /* Sentinel */
 };
 
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index 796a7fc..7c428a4 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -207,8 +207,8 @@ stpy_static_block (PyObject *self, PyObject *args)
   return block_to_block_object (block, SYMTAB_OBJFILE (symtab));
 }
 
-/* Implementation of gdb.Symtab.linetable (self) -> gdb.Linetable.
-   Returns a gdb.Linetable object corresponding to this symbol
+/* Implementation of gdb.Symtab.linetable (self) -> gdb.LineTable.
+   Returns a gdb.LineTable object corresponding to this symbol
    table.  */
 
 static PyObject *
@@ -571,8 +571,8 @@ Return the global block of the symbol table." },
     "static_block () -> gdb.Block.\n\
 Return the static block of the symbol table." },
     { "linetable", stpy_get_linetable, METH_NOARGS,
-    "linetable () -> gdb.Linetable.\n\
-Return the Linetable associated with this symbol table" },
+    "linetable () -> gdb.LineTable.\n\
+Return the LineTable associated with this symbol table" },
   {NULL}  /* Sentinel */
 };
 
-- 
2.1.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] python: fix Linetable case to LineTable in docstrings and comments
  2015-08-04 16:56 ` Joel Brobecker
@ 2015-08-05  9:25   ` Ciro Santilli
  0 siblings, 0 replies; 4+ messages in thread
From: Ciro Santilli @ 2015-08-05  9:25 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

Thanks, looks good.

Must be my gmail messing up the patch... I will try with Thunderbird.
I miss pull requests :-)

On Tue, Aug 4, 2015 at 6:55 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> 2015-07-24  Ciro Santilli  <ciro.santilli@gmail.com>
>>
>>     * python/py-linetable.c: Fix case of Linetable to LineTable
>>     in docstrings and code comments.
>>     * python/py-symtab.c: Same.
>
> Thanks for the patch, and sorry again for the delay. The patch
> you sent didn't apply cleanly for some reason, but it was easy
> enough to reproduce, so here is what I just pushed (we accepted
> it under the "obvious" rule).
>
> Let me know if I missed anything.
>
> --
> Joel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-05  9:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-25 14:19 [PATCH] python: fix Linetable case to LineTable in docstrings and comments Ciro Santilli
2015-07-30 12:34 ` Ciro Santilli
2015-08-04 16:56 ` Joel Brobecker
2015-08-05  9:25   ` Ciro Santilli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).