diff options
author | Hannes Domani <ssbssa@yahoo.de> | 2023-12-12 15:57:14 +0100 |
---|---|---|
committer | Hannes Domani <ssbssa@yahoo.de> | 2023-12-12 15:57:14 +0100 |
commit | 80ffe7226459e3edf840d0c23462d93cb560d2de (patch) | |
tree | 558fb8d74b28d63aae0fca8744249931798e7a0d /gdb/python/py-newobjfileevent.c | |
parent | 52e0b52e6f2dc1dc5a7b95740d22fd616241db67 (diff) | |
download | gdb-80ffe7226459e3edf840d0c23462d93cb560d2de.zip gdb-80ffe7226459e3edf840d0c23462d93cb560d2de.tar.gz gdb-80ffe7226459e3edf840d0c23462d93cb560d2de.tar.bz2 |
Fix gdb.FinishBreakpoint when returning to an inlined function
Currently, when creating a gdb.FinishBreakpoint in a function
called from an inline frame, it will never be hit:
```
(gdb) py fb=gdb.FinishBreakpoint()
Temporary breakpoint 1 at 0x13f1917b4: file C:/src/repos/binutils-gdb.git/gdb/testsuite/gdb.python/py-finish-breakpoint.c, line 47.
(gdb) c
Continuing.
Thread-specific breakpoint 1 deleted - thread 1 no longer in the thread list.
[Inferior 1 (process 1208) exited normally]
```
The reason is that the frame_id of a breakpoint has to be the
ID of a real frame, ignoring any inline frames.
With this fixed, it's working correctly:
```
(gdb) py fb=gdb.FinishBreakpoint()
Temporary breakpoint 1 at 0x13f5617b4: file C:/src/repos/binutils-gdb.git/gdb/testsuite/gdb.python/py-finish-breakpoint.c, line 47.
(gdb) c
Continuing.
Breakpoint 1, increase_inlined (a=0x40fa5c) at C:/src/repos/binutils-gdb.git/gdb/testsuite/gdb.python/py-finish-breakpoint.c:47
(gdb) py print(fb.return_value)
-8
```
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/py-newobjfileevent.c')
0 files changed, 0 insertions, 0 deletions