mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
[gdb] Simplify get_frame_function
Use block::containing_function to simplify get_frame_function. While we're at it, modernize using nullptr.
This commit is contained in:
parent
08610a4004
commit
e1557abbb0
1 changed files with 3 additions and 7 deletions
|
|
@ -116,14 +116,10 @@ struct symbol *
|
|||
get_frame_function (const frame_info_ptr &frame)
|
||||
{
|
||||
const struct block *bl = get_frame_block (frame, 0);
|
||||
if (bl == nullptr)
|
||||
return nullptr;
|
||||
|
||||
if (bl == NULL)
|
||||
return NULL;
|
||||
|
||||
while (bl->function () == NULL && bl->superblock () != NULL)
|
||||
bl = bl->superblock ();
|
||||
|
||||
return bl->function ();
|
||||
return bl->containing_function ();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue