public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix "catch exception" with dynamic linking
@ 2019-04-30 15:28 sergiodj+buildbot
  2019-04-30 15:45 ` Failures on RHEL-s390x-m64, branch master sergiodj+buildbot
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: sergiodj+buildbot @ 2019-04-30 15:28 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 2ff0a947394eebf5ff9cd26088dce60ec8c10b48 ***

Author: Tom Tromey <tromey@adacore.com>
Branch: master
Commit: 2ff0a947394eebf5ff9cd26088dce60ec8c10b48

Fix "catch exception" with dynamic linking

When an Ada program is dynamically linked against libgnat, and when
one of the standard exceptions is used, the exception object may be
referenced by the main executable using a copy relocation.

In this situation, a "catch exception" for those exceptions will not
manage to stop.  This happens because, under the hood, "catch
exception" creates an expression object that examines the object
addresses -- but in this case, the address will be incorrect.

This patch fixes the problem by arranging for these filter expressions
to examine all the relevant minimal symbols.  This way, the object
from libgnat will be found as well.

Tested on x86-64 Fedora 29.

gdb/ChangeLog
2019-04-30  Tom Tromey  <tromey@adacore.com>

	* ada-lang.c (ada_lookup_simple_minsyms): New function.
	(create_excep_cond_exprs): Iterate over program spaces.
	(ada_exception_catchpoint_cond_string): Examine all minimal
	symbols for exception types.

gdb/testsuite/ChangeLog
2019-04-30  Tom Tromey  <tromey@adacore.com>

	* lib/ada.exp (find_ada_tool): New proc.
	* lib/gdb.exp (gdb_compile_shlib): Allow .o files as inputs.
	* gdb.ada/catch_ex_std.exp: New file.
	* gdb.ada/catch_ex_std/foo.adb: New file.
	* gdb.ada/catch_ex_std/some_package.adb: New file.
	* gdb.ada/catch_ex_std/some_package.ads: New file.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-05-05 17:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-30 15:28 [binutils-gdb] Fix "catch exception" with dynamic linking sergiodj+buildbot
2019-04-30 15:45 ` Failures on RHEL-s390x-m64, branch master sergiodj+buildbot
2019-05-01  9:09 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot
2019-05-01 10:01 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot
2019-05-01 10:12 ` Failures on Debian-s390x-m64, " sergiodj+buildbot
2019-05-04 23:35 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2019-05-04 23:55 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2019-05-04 23:59 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2019-05-05  0:22 ` Failures on Fedora-i686, " sergiodj+buildbot
2019-05-05  0:23 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2019-05-05  0:24 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot
2019-05-05 17:51 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot

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).