This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit/Ada] Skip unwind-seh.c when searching first "user" frame
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Wed, 24 Oct 2012 14:09:02 -0400
- Subject: [commit/Ada] Skip unwind-seh.c when searching first "user" frame
On x86_64-windows with GCC 4.7 (using native SEH info), the debugger
behaves as follow:
(gdb) catch exception unhandled
Catchpoint 1: unhandled Ada exceptions
(gdb) run
Starting program: C:\[...]\b.exe
Catchpoint 1, unhandled CONSTRAINT_ERROR at 0x000000000040cc57 in _GCC_specific_handler ([...]) at ../../../src/libgcc/unwind-seh.c:289
[...]
This is after compiler the following code:
procedure B is
begin
raise Constraint_Error;
end B;
... using the following command:
% gnatmake -g b
When hitting the exception catchpoint, it should have gone up the stack
all the way until finding the frame corresponding to procedure B.
But if stopped short because unwind-seh.c is compiled with debugging
information, and the debugger is also able to locate that source file.
To prevent this from happening, this patch adds unwind-seh.c to the list
of files that should be ignored, regardless of other factors.
gdb/ChangeLog:
* ada-lang.h (ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS): Add entry for
"unwind-seh.c".
Tested on x86_64-linux, and on x86_64-windows (using AdaCore's testsuite).
Checked in.
---
gdb/ChangeLog | 5 +++++
gdb/ada-lang.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6f2fb0c..4d3c3ec 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2012-10-24 Joel Brobecker <brobecker@adacore.com>
+ * ada-lang.h (ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS): Add entry for
+ "unwind-seh.c".
+
+2012-10-24 Joel Brobecker <brobecker@adacore.com>
+
* ada-lang.c (ada_template_to_fixed_record_type_1): Do not
strip typedef layer when computing the fixed type's field type,
only when computing its size.
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index 9a93c50..b56d453 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -45,6 +45,7 @@ struct inferior;
#if !defined (ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS)
#define ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS \
+ "^unwind-seh.c$", \
"^[agis]-.*\\.ad[bs]$",
#endif
--
1.7.9.5