Bug 8416 - Audit get_frame_pc vs get_frame_address_in_block
Summary: Audit get_frame_pc vs get_frame_address_in_block
Status: ASSIGNED
Alias: None
Product: gdb
Classification: Unclassified
Component: backtrace (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 30929
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-04 12:38 UTC by ac131313
Modified: 2024-01-10 20:10 UTC (History)
2 users (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 ac131313 2003-08-04 12:38:00 UTC
[Converted from Gnats 1311]

There are many cases where get_frame_address_in_block (which handles the end-of-function edge case) should be used instead of get_frame_pc.

For instance, get_frame_func should use address_in_block since it needs to find this, and not the adjacent, frame's function.

(I'm posting a patch for that one but I bet there are many many other cases of the same problem)

Release:
unknown
Comment 1 Tom Tromey 2023-08-01 21:12:16 UTC
I also found an indirect case with the same bug, see
https://sourceware.org/pipermail/gdb-patches/2023-August/201262.html
No test case but the idea is that using the Python Frame.pc
can trigger this same problem.