public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/12656] New: gdb.Block should expose whether the block is special
@ 2011-04-08 20:39 tromey at redhat dot com
  2011-04-12 21:15 ` [Bug python/12656] " jan.kratochvil at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2011-04-08 20:39 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12656

           Summary: gdb.Block should expose whether the block is special
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned@sourceware.org
        ReportedBy: tromey@redhat.com


Right now there is no clean way to discover that a block
is a global or static block from python.
There should be a method or two for this.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug python/12656] gdb.Block should expose whether the block is special
  2011-04-08 20:39 [Bug python/12656] New: gdb.Block should expose whether the block is special tromey at redhat dot com
@ 2011-04-12 21:15 ` jan.kratochvil at redhat dot com
  2011-04-13 16:39 ` tromey at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-04-12 21:15 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12656

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan.kratochvil at redhat
                   |                            |dot com

--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-04-12 21:15:25 UTC ---
Notes for Phil Muldoon which are more general and may not be specific for this
Bug:

http://sourceware.org/ml/gdb-patches/2011-04/msg00143.html
# There is still gdbpy_block_for_pc (unaffected by this patch at all) which
# works as described but it may be confusing as it does not behave well with
# inlined functions when used as is.

I do not see block_for_pc to be used in the .py scripts shipped in GDB but any
such use should be reviewed wrt inlined functions correctness.

One should always derive block from its frame by get_frame_block.  Relying on
any PC there may produce incorrect results.  Which should be already done fine
by frapy_block.

frapy_block should never need to return GLOBAL_BLOC or STATIC_BLOCK so there
should not be a problem the current code does not allow it.

Maybe everything is correct and nothing needs to be changed now, thanks.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug python/12656] gdb.Block should expose whether the block is special
  2011-04-08 20:39 [Bug python/12656] New: gdb.Block should expose whether the block is special tromey at redhat dot com
  2011-04-12 21:15 ` [Bug python/12656] " jan.kratochvil at redhat dot com
@ 2011-04-13 16:39 ` tromey at redhat dot com
  2011-10-07 10:31 ` pmuldoon at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2011-04-13 16:39 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12656

--- Comment #2 from Tom Tromey <tromey at redhat dot com> 2011-04-13 16:39:13 UTC ---
(In reply to comment #1)

> frapy_block should never need to return GLOBAL_BLOC or STATIC_BLOCK so there
> should not be a problem the current code does not allow it.
> 
> Maybe everything is correct and nothing needs to be changed now, thanks.

The return values are correct; but the problem in this bug is that
you can look upwards using Block.superblock -- but then you have no good
way to know when to stop searching upward.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug python/12656] gdb.Block should expose whether the block is special
  2011-04-08 20:39 [Bug python/12656] New: gdb.Block should expose whether the block is special tromey at redhat dot com
  2011-04-12 21:15 ` [Bug python/12656] " jan.kratochvil at redhat dot com
  2011-04-13 16:39 ` tromey at redhat dot com
@ 2011-10-07 10:31 ` pmuldoon at redhat dot com
  2011-10-20 12:32 ` cvs-commit at gcc dot gnu.org
  2011-10-20 12:40 ` pmuldoon at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: pmuldoon at redhat dot com @ 2011-10-07 10:31 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12656

Phil Muldoon <pmuldoon at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |pmuldoon at redhat dot com
         AssignedTo|unassigned at sourceware    |pmuldoon at redhat dot com
                   |dot org                     |

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug python/12656] gdb.Block should expose whether the block is special
  2011-04-08 20:39 [Bug python/12656] New: gdb.Block should expose whether the block is special tromey at redhat dot com
                   ` (2 preceding siblings ...)
  2011-10-07 10:31 ` pmuldoon at redhat dot com
@ 2011-10-20 12:32 ` cvs-commit at gcc dot gnu.org
  2011-10-20 12:40 ` pmuldoon at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2011-10-20 12:32 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12656

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2011-10-20 12:31:38 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    pmuldoon@sourceware.org    2011-10-20 12:31:30

Modified files:
    gdb            : ChangeLog NEWS blockframe.c frame.h valops.c 
                     value.h 
    gdb/doc        : ChangeLog gdb.texinfo 
    gdb/python     : py-block.c py-frame.c py-symbol.c py-type.c 
                     python-internal.h 
    gdb/testsuite  : ChangeLog 
    gdb/testsuite/gdb.python: py-block.exp 

Log message:
    2011-10-20  Phil Muldoon  <pmuldoon@redhat.com>

    PR python/12656

    * python/py-frame.c (frapy_read_var): Use const struct *block.
    * python/py-type.c (typy_lookup_typename): Likewise.
    (typy_lookup_type): Likewise.
    (typy_legacy_template_argument): Likewise.
    (typy_template_argument): Likewise.
    (gdbpy_lookup_type): Likewise.
    * python/py-symbol.c (gdbpy_lookup_symbol): Likewise.
    * python/py-block.c (blpy_block_object): Likewise.
    (blpy_iter): Likewise.
    (blpy_get_start): Likewise.
    (blpy_get_end): Likewise.
    (blpy_get_function): Likewise.
    (blpy_get_superblock): Likewise.
    (set_block):  Likewise.
    (block_to_block_object): Likewise.
    (block_object_to_block): Likewise.
    (blpy_is_valid): Likewise.
    (blpy_get_global_block): New function.
    (blpy_get_static_block): New function.
    (blpy_is_global): New function.
    (blpy_is_static): New function.
    * blockframe.c (block_innermost_frame): Likewise.
    * valops.c (value_of_variable): Likewise.
    * frame.h: Update prototypes.
    * python/python-internal.h: Likewise.
    * value.h: Likewise.

    2011-10-20  Phil Muldoon  <pmuldoon@redhat.com>

    PR python/12656

    * gdb.texinfo (Blocks In Python): Document is_static, is_global,
    global_block, static_block function.

    2011-10-20  Phil Muldoon  <pmuldoon@redhat.com>

    PR python/12656

    * gdb.python/py-block.exp: Add is_global, is_static, static_block,
    global_block tests.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13444&r2=1.13445
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/NEWS.diff?cvsroot=src&r1=1.459&r2=1.460
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/blockframe.c.diff?cvsroot=src&r1=1.133&r2=1.134
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/frame.h.diff?cvsroot=src&r1=1.197&r2=1.198
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/valops.c.diff?cvsroot=src&r1=1.288&r2=1.289
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/value.h.diff?cvsroot=src&r1=1.188&r2=1.189
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.1230&r2=1.1231
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.879&r2=1.880
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-block.c.diff?cvsroot=src&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-frame.c.diff?cvsroot=src&r1=1.19&r2=1.20
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-symbol.c.diff?cvsroot=src&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-type.c.diff?cvsroot=src&r1=1.25&r2=1.26
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/python-internal.h.diff?cvsroot=src&r1=1.50&r2=1.51
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2904&r2=1.2905
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.python/py-block.exp.diff?cvsroot=src&r1=1.7&r2=1.8

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug python/12656] gdb.Block should expose whether the block is special
  2011-04-08 20:39 [Bug python/12656] New: gdb.Block should expose whether the block is special tromey at redhat dot com
                   ` (3 preceding siblings ...)
  2011-10-20 12:32 ` cvs-commit at gcc dot gnu.org
@ 2011-10-20 12:40 ` pmuldoon at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: pmuldoon at redhat dot com @ 2011-10-20 12:40 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12656

Phil Muldoon <pmuldoon at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |7.4

--- Comment #4 from Phil Muldoon <pmuldoon at redhat dot com> 2011-10-20 12:39:47 UTC ---
Fixed as committed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2011-10-20 12:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-08 20:39 [Bug python/12656] New: gdb.Block should expose whether the block is special tromey at redhat dot com
2011-04-12 21:15 ` [Bug python/12656] " jan.kratochvil at redhat dot com
2011-04-13 16:39 ` tromey at redhat dot com
2011-10-07 10:31 ` pmuldoon at redhat dot com
2011-10-20 12:32 ` cvs-commit at gcc dot gnu.org
2011-10-20 12:40 ` pmuldoon at redhat dot com

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).