public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/29865] The GDB dies during unwind the stack - question
Date: Mon, 29 Jan 2024 14:34:08 +0000	[thread overview]
Message-ID: <bug-29865-4717-8g290Ddr1Y@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29865-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29865

--- Comment #5 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Hannes Domani <ssbssa@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=633680620bb85ed6f80b22371ef49610faec8d03

commit 633680620bb85ed6f80b22371ef49610faec8d03
Author: Hannes Domani <ssbssa@yahoo.de>
Date:   Mon Jan 29 15:31:44 2024 +0100

    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>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2024-01-29 14:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 15:24 [Bug gdb/29865] New: " filip.bascarevic at siemens dot com
2022-12-07 23:02 ` [Bug gdb/29865] " tromey at sourceware dot org
2022-12-08  7:55 ` filip.bascarevic at siemens dot com
2022-12-21 18:42 ` tromey at sourceware dot org
2024-01-06 14:01 ` ssbssa at sourceware dot org
2024-01-06 20:16 ` ssbssa at sourceware dot org
2024-01-06 20:16 ` ssbssa at sourceware dot org
2024-01-29 14:34 ` cvs-commit at gcc dot gnu.org [this message]
2024-01-29 14:36 ` ssbssa at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29865-4717-8g290Ddr1Y@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).