This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug ada/23167] New: "catch exception foo" fails if current language is auto
- From: "simon at pushface dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 11 May 2018 15:46:57 +0000
- Subject: [Bug ada/23167] New: "catch exception foo" fails if current language is auto
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=23167
Bug ID: 23167
Summary: "catch exception foo" fails if current language is
auto
Product: gdb
Version: 8.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
Assignee: unassigned at sourceware dot org
Reporter: simon at pushface dot org
Target Milestone: ---
This is a log:
(gdb) start
Temporary breakpoint 1 at 0x10000168c: file
/Users/simon/Analytical_Engine/src/aes.adb, line 36.
Starting program: /Users/simon/Analytical_Engine/aes
[New Thread 0x1103 of process 85792]
warning: unhandled dyld version (15)
Temporary breakpoint 1, _ada_aes ()
at /Users/simon/Analytical_Engine/src/aes.adb:36
36 procedure Aes is
(gdb) catch exception constraint_error
warning: failed to reevaluate internal exception condition for catchpoint 0: A
syntax error in expression, near `e) = long_integer
(&standard.constraint_error)'.
Catchpoint 2: `constraint_error' Ada exception
(gdb) show lang
The current source language is "auto; currently ada".
(gdb) del 2
(gdb) set lang ada
(gdb) catch exception constraint_error
Catchpoint 3: `constraint_error' Ada exception
I suspect the problem is in parse.c(parse_exp_in_context_1):1181,
struct symbol *func = block_linkage_function (block);
if (func != NULL)
lang = language_def (SYMBOL_LANGUAGE (func));
if (lang == NULL || lang->la_language == language_unknown) <<< 1181
lang = current_language;
(gdb) catch exception constraint_error
Breakpoint 3, parse_exp_in_context_1 (stringptr=0x7ffeefbff120, pc=4296536729,
block=0x104b780d0, comma=0, void_context_p=0, out_subexp=0x0)
at ../../gdb-8.1/gdb/parse.c:1181
1181 if (lang == NULL || lang->la_language == language_unknown)
(top-gdb) p func
$1 = (symbol *) 0x104b77f70
(top-gdb) p lang
$2 = (const language_defn *) 0x10086d660 <c_language_defn>
(top-gdb) p lang->la_language
$3 = language_c
(top-gdb) p current_language
$4 = (const language_defn *) 0x10086c760 <ada_language_defn>
BUT - why is func in C language?
--
You are receiving this mail because:
You are on the CC list for the bug.