diff options
author | Hannes Domani <ssbssa@yahoo.de> | 2024-01-29 15:31:44 +0100 |
---|---|---|
committer | Hannes Domani <ssbssa@yahoo.de> | 2024-01-29 15:33:01 +0100 |
commit | 633680620bb85ed6f80b22371ef49610faec8d03 (patch) | |
tree | a95295f2cd52f692496343d0c1cccd506ee6b85a /gdb/infcmd.c | |
parent | fff48b7cb03489a8cd87990cbad18c7d6cdfe29a (diff) | |
download | gdb-633680620bb85ed6f80b22371ef49610faec8d03.zip gdb-633680620bb85ed6f80b22371ef49610faec8d03.tar.gz gdb-633680620bb85ed6f80b22371ef49610faec8d03.tar.bz2 |
Fix backtrace limit stopping on inline frame
If you have set up a backtrace limit, and the backtrace stops
because of this in an inline frame with arguments, you get an
assertion failure:
```
(gdb) bt
(gdb) set backtrace limit 2
(gdb) bt
C:/src/repos/binutils-gdb.git/gdb/frame.c:3346: internal-error: reinflate: Assertion `m_cached_level >= -1' failed.
```
And if this one is fixed, there is another one as well:
```
(gdb) bt
C:/src/repos/binutils-gdb.git/gdb/dwarf2/loc.c:1160: internal-error: dwarf_expr_reg_to_entry_parameter: Assertion `frame != NULL' failed.
```
The reason for both of them is this kind of loop:
```
while (get_frame_type (frame) == INLINE_FRAME)
frame = get_prev_frame (frame);
```
Since get_prev_frame respects the backtrace limit, it will return
NULL, and from there on you can't continue.
This changes these loops to use get_prev_frame_always instead, so
you always get a non-inline frame in the end.
With this backtrace works:
```
(gdb) bt
(gdb)
```
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29865
Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/infcmd.c')
0 files changed, 0 insertions, 0 deletions