This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb and binutils branch master updated. c0d4881122d0491f5dea9fa2c017ab5d2ae5fe89


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  c0d4881122d0491f5dea9fa2c017ab5d2ae5fe89 (commit)
      from  c26e9cbb0ce70e8fca32a40c434a0837bf46750a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c0d4881122d0491f5dea9fa2c017ab5d2ae5fe89

commit c0d4881122d0491f5dea9fa2c017ab5d2ae5fe89
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Mon Dec 23 07:18:51 2013 +0400

    [python] Add gdb.Type.name attribute.
    
    Consider the following declarations:
    
        typedef long our_time_t;
        our_time_t current_time = 1384395743;
    
    The purpose of this patch is to allow the use of a pretty-printer
    for variables of type our_time_t.  Normally, pretty-printing sniffers
    use the tag name in order to determine which, if any, pretty-printer
    should be used. But in the case above, the tag name is not set, since
    it does not apply to integral types.
    
    This patch extends the gdb.Type list of attributes to also include
    the name of the type, thus allowing the sniffer to match against
    that name. With that change, I was able to write a pretty-printer
    which displays our variable as follow:
    
        (gdb) print current_time
        $1 = Thu Nov 14 02:22:23 2013 (1384395743)
    
    gdb/ChangeLog:
    
            * python/py-type.c (typy_get_name): New function.
            (type_object_getset): Add entry for attribute "name".
            * NEWS: Add entry mentioning this new attribute.
    
    gdb/doc/ChangeLog:
    
            * gdb.texinfo (Types In Python): Document new attribute Types.name.
    
    gdb/testsuite:
    
            * gdb.python/py-pp-integral.c: New file.
            * gdb.python/py-pp-integral.py: New file.
            * gdb.python/py-pp-integral.exp: New file.
    
    Tested on x86_64-linux.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog                               |    6 ++++
 gdb/NEWS                                    |    1 +
 gdb/doc/ChangeLog                           |    4 +++
 gdb/doc/gdb.texinfo                         |    5 +++
 gdb/python/py-type.c                        |   14 ++++++++++
 gdb/testsuite/ChangeLog                     |    6 ++++
 gdb/testsuite/gdb.python/py-pp-integral.c   |   33 +++++++++++++++++++++++
 gdb/testsuite/gdb.python/py-pp-integral.exp |   38 +++++++++++++++++++++++++++
 gdb/testsuite/gdb.python/py-pp-integral.py  |   35 ++++++++++++++++++++++++
 9 files changed, 142 insertions(+), 0 deletions(-)
 create mode 100644 gdb/testsuite/gdb.python/py-pp-integral.c
 create mode 100644 gdb/testsuite/gdb.python/py-pp-integral.exp
 create mode 100644 gdb/testsuite/gdb.python/py-pp-integral.py


hooks/post-receive
-- 
gdb and binutils


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]