public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cel at us dot ibm.com" <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: Mon, 21 Nov 2022 16:34:25 +0000	[thread overview]
Message-ID: <bug-29793-4717-D0e2fZqJ0z@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 #18 from Carl E Love <cel at us dot ibm.com> ---
The issue on Friday was one of the hunks would not apply.  I could see the
source code was clearly different.  Even after doing a fresh pull it didn't
apply.  

I update the tree again this morning and applied the patch:

carll@ltcd97-lp3:~/GDB/binutils-gdb-test$ patch -p 1 < ../tom.patch
patching file gdb/breakpoint.c
Hunk #1 succeeded at 3296 (offset 13 lines).
Hunk #2 succeeded at 3310 (offset 13 lines).
Hunk #3 succeeded at 3586 (offset 13 lines).
Hunk #4 succeeded at 3613 (offset 13 lines).
Hunk #5 succeeded at 3683 (offset 13 lines).
Hunk #6 succeeded at 3705 (offset 13 lines).

So upstream seems to have moved a little but not a problem.  The source code
conflict is gone.

I ran the test before doing the make and the make install. The test fails as
expected:

   make check RUNTESTFLAGS='GDB=/home/carll/bin/gdb  gdb.cp/gdb2495.exp    '

  WARNING: Couldn't find the global config file.
  WARNING: Couldn't find tool init file
  WARNING: Couldn't find the global config file.
  WARNING: Couldn't find tool init file
  WARNING: Couldn't find the global config file.
  WARNING: Couldn't find tool init file
  WARNING: Couldn't find the global config file.
  WARNING: No tool specified
  WARNING: Couldn't find the global config file.
  make[4]: *** [Makefile:226: do-check-single] Error 1
  make[3]: *** [Makefile:161: check] Error 2
  make[2]: *** [Makefile:1922: check] Error 2
  make[1]: *** [Makefile:13585: check-gdb] Error 2

I checked the log file and see the failure:
-----------------------

(gdb) run 
Starting program:
/home/carll/GDB/build-twst/gdb/testsuite/outputs/gdb.cp/gdb2495/gdb2495 ^M
[Thread debugging using libthread_db enabled]^M
Using host libthread_db library "/lib64/libthread_db.so.1".^M

Breakpoint 1, main () at
/home/carll/GDB/build-test/gdb/testsuite/../../../binutils-gdb-test/gdb/testsuite/gdb.c\
p/gdb2495.cc:75^M
75        exceptions.raise_signal (-1);^M
(gdb) p exceptions.no_throw_function()^M
$1 = 1^M
(gdb) PASS: gdb.cp/gdb2495.exp: p exceptions.no_throw_function()
p exceptions.throw_function_with_handler()^M
Handled^M
$2 = 2^M
(gdb) PASS: gdb.cp/gdb2495.exp: p exceptions.throw_function_with_handler()
p exceptions.throw_function()^M
terminate called after throwing an instance of 'int'^M
^M
Program received signal SIGABRT, Aborted.^M
0x00007ffff76b9a8c in __pthread_kill_implementation () 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.
bt^M
#0  0x00007ffff76b9a8c in __pthread_kill_implementation () from
/lib64/libc.so.6^M
#1  0x00007ffff7657a9c in raise () from /lib64/libc.so.6^M
#2  0x00007ffff7630948 in abort () from /lib64/libc.so.6^M
#3  0x00007ffff7b19fa8 in __gnu_cxx::__verbose_terminate_handler() () from
/lib64/libstdc++.so.6^M
#4  0x00007ffff7b15114 in __cxxabiv1::__terminate(void (*)()) () from
/lib64/libstdc++.so.6^M
#5  0x00007ffff7b151e0 in std::terminate() () from /lib64/libstdc++.so.6^M
#6  0x00007ffff7b156a4 in __cxa_throw () from /lib64/libstdc++.so.6^M
#7  0x0000000010000f30 in SimpleException::throw_function (this=0x10020082
<exceptions>) at /home/carll/GDB/buil\
d-test/gdb/testsuite/../../../binutils-gdb-test/gdb/testsuite/gdb.cp/gdb2495.cc:41^M
#8  <function called from gdb>^M
#9  main () at
/home/carll/GDB/build-test/gdb/testsuite/../../../binutils-gdb-test/gdb/testsuite/gdb.cp/gdb2495.\
cc:75^M
(gdb) FAIL: gdb.cp/gdb2495.exp: bt after returning from a popped frame
info breakpoints^M
Num     Type           Disp Enb Address            What^M
1       breakpoint     keep y   0x0000000010000ca8 in main() at
/home/carll/GDB/build-test/gdb/testsuite/../../.\
./binutils-gdb-test/gdb/testsuite/gdb.cp/gdb2495.cc:75^M
        breakpoint already hit 1 time^M
(gdb) PASS: gdb.cp/gdb2495.exp: info breakpoints
set unwind-on-terminating-exception off^M
(gdb) PASS: gdb.cp/gdb2495.exp: set unwind-on-terminating-exception off
show unwind-on-terminating-exception^M
Unwind stack if a C++ exception is unhandled while in a call dummy is off.^M
(gdb) PASS: gdb.cp/gdb2495.exp: turn off unwind on terminating exception flag
p exceptions.throw_function()^M
terminate called recursively^M
^M
Program received signal SIGABRT, Aborted.^M
0x00007ffff76b9a8c in __pthread_kill_implementation () 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) PASS: gdb.cp/gdb2495.exp: call a function that raises an exception with
unwinding off..
delete breakpoints^M
Delete all breakpoints? (y or n) y^M
(gdb) info breakpoints^M
No breakpoints or watchpoints.^M

---------------------------

After doing the make and make install the test passes, the results from the
gdb/testsuite/gdb.lot file:

--------------------------
                === gdb Summary ===

# of expected passes            14

The patch is working on Power 10.

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

  parent reply	other threads:[~2022-11-21 16:34 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 [this message]
2022-11-23  5:52 ` cvs-commit at gcc dot gnu.org
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-D0e2fZqJ0z@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).