Bug 16484 - Frame.block documentation incomplete
Summary: Frame.block documentation incomplete
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: python (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 8.3
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-22 05:52 UTC by Tom Tromey
Modified: 2018-09-10 13:51 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2014-01-22 05:52:12 UTC
Frame.block's docs just say:

 -- Function: Frame.block ()
     Return the frame's code block.  *Note Blocks In Python::.


However it ought to mention that if the frame does not have
a block, then an exception is thrown.
Comment 1 Sourceware Commits 2018-09-10 13:50:00 UTC
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

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

commit 60c0454d3dda99635d331f6002f3f04fe34546a7
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Sep 8 09:08:56 2018 -0600

    Document that Frame.block can throw
    
    PR python/16484 points out that Frame.block can throw an exception,
    but this is not documented.
    
    This patch fixes the documentation.  Changing Frame.block to return
    None would be nice, but I suspect it's too late for that change.
    
    gdb/doc/ChangeLog
    2018-09-10  Tom Tromey  <tom@tromey.com>
    
    	PR python/16484:
    	* python.texi (Frames In Python): Document that Frame.block can
    	throw.
Comment 2 Tom Tromey 2018-09-10 13:51:36 UTC
Fixed.