Bug in gdb.block_for_pc documentation?

Roman Popov <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAATAM3H4ExzcrVCuPjKng72Omhfqz90ZvVDvNmmOKwYQStehLw@mail.gmail.com>
Hi all,
Looks like there is a bug in docs:

*"Function: gdb.block_for_pc (pc)*

*Return the innermost gdb.Block containing the given pc value. If the block
cannot be found for the pc value specified, the function will return None."*
https://sourceware.org/gdb/current/onlinedocs/gdb/Blocks-In-Python.html#Blocks-In-Python


Instead of returning None it throws runtime exception:

gdb.block_for_pc(0)
>> RuntimeError: Cannot locate object file for block.

Thanks,
Roman
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.