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 tdep/29793] [gdb/tdep, powerpc] FAIL: gdb.cp/gdb2495.exp: call a function that raises an exception without a handler.
Date: Wed, 23 Nov 2022 05:52:48 +0000	[thread overview]
Message-ID: <bug-29793-4717-sNl5XyogbN@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29793-4717@http.sourceware.org/bugzilla/>

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

--- Comment #19 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

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

commit 829b6b3736d972f5fbacda09c82b31802d3b594c
Author: Tom de Vries <tdevries@loganberry-1.arch.suse.de>
Date:   Wed Nov 23 06:52:42 2022 +0100

    Fix gdb.cp/gdb2495.exp on powerpc64le

    On powerpc64le-linux I ran into this FAIL:
    ...
    (gdb) p exceptions.throw_function()^M
    terminate called after throwing an instance of 'int'^M
    ^M
    Program received signal SIGABRT, Aborted.^M
    0x00007ffff7979838 in raise () from /lib64/libc.so.6^M
    The program being debugged was signaled while in a function called from
GDB.^M
    GDB remains in the frame where the signal was received.^M
    To change this behavior use "set unwindonsignal on".^M
    Evaluation of the expression containing the function^M
    (SimpleException::throw_function()) will be abandoned.^M
    When the function is done executing, GDB will silently stop.^M
    (gdb) FAIL: gdb.cp/gdb2495.exp: call a function that raises an exception \
      without a handler.
    ...

    The following happens:
    - we start an inferior call
    - an internal breakpoint is set on the global entry point of std::terminate
    - the inferior call uses the local entry point
    - the breakpoint is not triggered
    - we run into std::terminate

    We can fix this by simply adding the missing gdbarch_skip_entrypoint call
in
    create_std_terminate_master_breakpoint, but we try to do this a bit more
    generic, by:
    - adding a variant of function create_internal_breakpoint which takes a
      minimal symbol instead of an address as argument
    - in the new function:
      - using both gdbarch_convert_from_func_ptr_addr and
gdbarch_skip_entrypoint
      - documenting why we don't need to use gdbarch_addr_bits_remove
      - adding a note about possibly
        needing gdbarch_deprecated_function_start_offset.
    - using the new function in:
      - create_std_terminate_master_breakpoint
      - create_exception_master_breakpoint_hook, which currently uses only
        gdbarch_convert_from_func_ptr_addr.

    Note: we could use the new function in more locations in breakpoint.c, but
    as we're not aware of any related failures, we declare this out of scope
for
    this patch.

    Tested on x86_64-linux, powerpc64le-linux.

    Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>
    Tested-by: Carl Love <cel@us.ibm.com>
    PR tdep/29793
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29793

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

  parent reply	other threads:[~2022-11-23  5:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 17:18 [Bug tdep/29793] New: " vries at gcc dot gnu.org
2022-11-16 17:19 ` [Bug tdep/29793] " vries at gcc dot gnu.org
2022-11-16 17:22 ` vries at gcc dot gnu.org
2022-11-16 17:39 ` cel at us dot ibm.com
2022-11-16 18:35 ` vries at gcc dot gnu.org
2022-11-16 18:53 ` vries at gcc dot gnu.org
2022-11-16 23:01 ` cel at us dot ibm.com
2022-11-17  9:24 ` vries at gcc dot gnu.org
2022-11-17  9:42 ` vries at gcc dot gnu.org
2022-11-17 13:11 ` uweigand at gcc dot gnu.org
2022-11-17 18:03 ` cel at us dot ibm.com
2022-11-18  9:57 ` vries at gcc dot gnu.org
2022-11-18 11:18 ` vries at gcc dot gnu.org
2022-11-18 13:20 ` vries at gcc dot gnu.org
2022-11-18 14:17 ` vries at gcc dot gnu.org
2022-11-18 16:44 ` vries at gcc dot gnu.org
2022-11-18 19:25 ` cel at us dot ibm.com
2022-11-19  7:11 ` vries at gcc dot gnu.org
2022-11-19 11:18 ` vries at gcc dot gnu.org
2022-11-21 16:34 ` cel at us dot ibm.com
2022-11-23  5:52 ` cvs-commit at gcc dot gnu.org [this message]
2022-11-23  5:54 ` vries at gcc dot gnu.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-29793-4717-sNl5XyogbN@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).