This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] (Ada) "catch assert" spurious internal error
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Sat, 08 Sep 2018 18:08:02 -0400
- Subject: [binutils-gdb] (Ada) "catch assert" spurious internal error
*** TEST RESULTS FOR COMMIT 57aff202b4b17a05d73e71680a26fe12a817f110 ***
Author: Joel Brobecker <brobecker@adacore.com>
Branch: master
Commit: 57aff202b4b17a05d73e71680a26fe12a817f110
(Ada) "catch assert" spurious internal error
We noticed while debugging a program compiled without assertions
enabled and using an older compiler that inserting a catchpoint
on failed assertions would cause an internal error:
(gdb) catch assert
../../src/gdb/ada-lang.c:13321: internal-error: ada_exception_sal:
Assertion`sym != NULL' failed.
A problem internal to GDB has been detected,
This is due to a combination of factors:
1. With older versions of the compiler, the function used as a hook
was provided by a unit that's different from the unit which
provides the hooks for the other exception catchpoints.
2. The program either does not use any assertion, or is compiled
without the assertions enabled.
With newer versions of the compiler, all such functions are provided
by the same unit, so should normally always be available. However,
there can still be reasons why this is not the case. Consider, for
instance, the case of a runtime compiled with -ffunction-sections,
in which case the hook might be eliminated unless assertions are
used and enabled.
So this patch transforms the internal error into a simple error.
gdb/ChangeLog:
* ada-lang.c (ada_exception_sal): Replace gdb_assert calls
by calls to error.
No testcase added, as the existing testcase gdb.ada/catch_ex.exp
should trigger it when using an older version of GNAT as the Ada
compiler.
- Follow-Ups:
- *** COMPILATION FAILED *** Failures on RHEL-s390x-m64, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Debian-s390x-native-extended-gdbserver-m64, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Debian-s390x-native-gdbserver-m64, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Debian-s390x-m64, branch master *** BREAKAGE ***
- Failures on Fedora-i686, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master