[Bug ada/24919] New: FAIL: gdb.ada/catch_ex.exp: insert catchpoint on Program_Error (GDB internal error)

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24919] New: FAIL: gdb.ada/catch_ex.exp: insert catchpoint on Program_Error (GDB internal error)

cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24919

            Bug ID: 24919
           Summary: FAIL: gdb.ada/catch_ex.exp: insert catchpoint on
                    Program_Error (GDB internal error)
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ada
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Commit f21c2bd7b7 "Fix Fortran regression with variables in nested functions"
introduced the following regression:
...
FAIL: gdb.ada/catch_ex.exp: insert catchpoint on Program_Error (GDB internal
error)
...

In more detail:
...
(gdb) PASS: gdb.ada/catch_ex.exp: continuing to second exception
delete breakpoints^M
Delete all breakpoints? (y or n) y^M
(gdb) info breakpoints^M
No breakpoints or watchpoints.^M
(gdb) break main^M
Breakpoint 3 at 0x401f39: file
/data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.ada/catch_ex/b~foo.adb,
line 132.^M
(gdb) run ^M
The program being debugged has been started already.^M
Start it from the beginning? (y or n) y^M
Starting program:
/data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.ada/catch_ex/foo ^M
^M
Breakpoint 3, main (argc=1, argv=0x7fffffffd3f8, envp=0x7fffffffd408) at
/data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.ada/catch_ex/b~foo.adb:132^M
132           Ensure_Reference : aliased System.Address :=
Ada_Main_Program_Name'Address;^M
(gdb) catch exception Program_Error^M
/data/gdb_versions/devel/src/gdb/dwarf2loc.c:727: internal-error: virtual void
dwarf_evaluate_loc_desc::get_frame_base(const gdb_byte**, size_t*): Assertion
`framefunc != NULL' failed.^M
A problem internal to GDB has been detected,^M
further debugging may prove unreliable.^M
Quit this debugging session? (y or n) FAIL: gdb.ada/catch_ex.exp: insert
catchpoint on Program_Error (GDB internal error)
...

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24919] FAIL: gdb.ada/catch_ex.exp: insert catchpoint on Program_Error (GDB internal error)

cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24919

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24919] FAIL: gdb.ada/catch_ex.exp: insert catchpoint on Program_Error (GDB internal error)

cvs-commit at gcc dot gnu.org
In reply to this post by cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24919

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Minimal reproducer:
...
$ gdb build/gdb/testsuite/outputs/gdb.ada/catch_ex/foo -batch -ex "break main"
-ex run -ex "catch exception Program_Error"
Breakpoint 1 at 0x401f39: file
build/gdb/testsuite/outputs/gdb.ada/catch_ex/b~foo.adb, line 132.

Breakpoint 1, main (argc=1, argv=0x7fffffffdbd8, envp=0x7fffffffdbe8) at
build/gdb/testsuite/outputs/gdb.ada/catch_ex/b~foo.adb:132
132           Ensure_Reference : aliased System.Address :=
Ada_Main_Program_Name'Address;
src/gdb/dwarf2loc.c:727: internal-error: virtual void
dwarf_evaluate_loc_desc::get_frame_base(const gdb_byte**, size_t*): Assertion
`framefunc != NULL' failed.
...

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24919] FAIL: gdb.ada/catch_ex.exp: insert catchpoint on Program_Error (GDB internal error)

cvs-commit at gcc dot gnu.org
In reply to this post by cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24919

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(gdb) bt
#0  0x00007ffff4fae160 in raise () from /lib64/libc.so.6
#1  0x00007ffff4faf741 in abort () from /lib64/libc.so.6
#2  0x0000000000937926 in dump_core () at src/gdb/utils.c:202
#3  0x0000000000937e30 in internal_vproblem(internal_problem *, const char *,
int, const char *, typedef __va_list_tag __va_list_tag *) (problem=0x110cf40
<internal_error_problem>,
    file=0xb10aa0 "src/gdb/dwarf2loc.c", line=727,
    fmt=0xb10b00 "%s: Assertion `%s' failed.", ap=0x7fffffffc098) at
src/gdb/utils.c:412
#4  0x0000000000937ef8 in internal_verror (file=0xb10aa0 "src/gdb/dwarf2loc.c",
    line=727, fmt=0xb10b00 "%s: Assertion `%s' failed.", ap=0x7fffffffc098)
    at src/gdb/utils.c:437
#5  0x000000000064bdbd in internal_error (file=0xb10aa0 "src/gdb/dwarf2loc.c",
    line=727, fmt=0xb10b00 "%s: Assertion `%s' failed.")
    at src/gdb/gdbsupport/errors.c:55
#6  0x00000000005a4690 in dwarf_evaluate_loc_desc::get_frame_base
(this=0x7fffffffc410, start=0x7fffffffc250,
    length=0x7fffffffc248) at src/gdb/dwarf2loc.c:727
#7  0x000000000059787e in dwarf_expr_context::execute_stack_op
(this=0x7fffffffc410,
    op_ptr=0x7ffff19e5d62 "\r\227\035", op_end=0x7ffff19e5d62 "\r\227\035")
    at src/gdb/dwarf2expr.c:863
#8  0x0000000000596874 in dwarf_expr_context::eval (this=0x7fffffffc410,
addr=0x7ffff19e5d60 "\221h\r\227\035",
    len=2) at src/gdb/dwarf2expr.c:302
#9  0x000000000059ef0b in dwarf2_evaluate_loc_desc_full (type=0x1ba6130,
frame=0x1c07890,
    data=0x7ffff19e5d60 "\221h\r\227\035", size=2, per_cu=0x19b2580,
subobj_type=0x1ba6130, subobj_byte_offset=0)
    at src/gdb/dwarf2loc.c:2169
#10 0x000000000059f616 in dwarf2_evaluate_loc_desc (type=0x1ba6130,
frame=0x1c07890,
    data=0x7ffff19e5d60 "\221h\r\227\035", size=2, per_cu=0x19b2580)
    at src/gdb/dwarf2loc.c:2350
#11 0x00000000005a19d6 in locexpr_read_variable (symbol=0x1ba6590,
frame=0x1c07890) at src/gdb/dwarf2loc.c:3527
#12 0x0000000000625c78 in default_read_var_value (var=0x1ba6590,
var_block=0x1ba6670, frame=0x1c07890) at src/gdb/findvar.c:610
#13 0x0000000000438c7e in ada_read_var_value (var=0x1ba6590,
var_block=0x1ba6670, frame=0x18e6530) at src/gdb/ada-lang.c:14309
#14 0x0000000000626715 in read_var_value (var=0x1ba6590, var_block=0x1ba6670,
frame=0x18e6530) at src/gdb/findvar.c:815
#15 0x0000000000945d04 in value_of_variable (var=0x1ba6590, b=0x1ba6670) at
src/gdb/valops.c:1293
#16 0x0000000000605d48 in evaluate_var_value (noside=EVAL_AVOID_SIDE_EFFECTS,
blk=0x1ba6670, var=0x1ba6590) at src/gdb/eval.c:719
#17 0x0000000000607408 in evaluate_subexp_standard (expect_type=0x0,
exp=0x1b55510, pos=0x7fffffffd0f4, noside=EVAL_AVOID_SIDE_EFFECTS) at
src/gdb/eval.c:1308
#18 0x00000000004309a9 in ada_evaluate_subexp (expect_type=0x0, exp=0x1b55510,
pos=0x7fffffffd0f4, noside=EVAL_AVOID_SIDE_EFFECTS) at src/gdb/ada-lang.c:10726
#19 0x0000000000604952 in evaluate_subexp (expect_type=0x0, exp=0x1b55510,
pos=0x7fffffffd0f4, noside=EVAL_AVOID_SIDE_EFFECTS) at src/gdb/eval.c:81
#20 0x000000000042ddd3 in evaluate_subexp_type (exp=0x1b55510,
pos=0x7fffffffd0f4) at src/gdb/ada-lang.c:9487
#21 0x0000000000421544 in resolve_subexp (expp=0x7fffffffd3d8,
pos=0x7fffffffd0f4, deprocedure_p=1, context_type=0x0, parse_completion=0,
tracker=0x7fffffffd230) at src/gdb/ada-lang.c:3547
#22 0x0000000000420b68 in resolve_subexp (expp=0x7fffffffd3d8,
pos=0x7fffffffd0f4, deprocedure_p=1, context_type=0x0, parse_completion=0,
tracker=0x7fffffffd230) at src/gdb/ada-lang.c:3359
#23 0x0000000000420b68 in resolve_subexp (expp=0x7fffffffd3d8,
pos=0x7fffffffd0f4, deprocedure_p=1, context_type=0x0, parse_completion=0,
tracker=0x7fffffffd230) at src/gdb/ada-lang.c:3359
#24 0x0000000000420601 in resolve (expp=0x7fffffffd3d8, void_context_p=0,
parse_completion=0, tracker=0x7fffffffd230) at src/gdb/ada-lang.c:3182
#25 0x0000000000792a0f in parse_exp_in_context (stringptr=0x7fffffffd310,
pc=4213187, block=0x1ba6670, comma=0, void_context_p=0, out_subexp=0x0,
tracker=0x7fffffffd230, cstate=0x0) at src/gdb/parse.c:1149
#26 0x00000000007926be in parse_exp_1 (stringptr=0x7fffffffd310, pc=4213187,
block=0x1ba6670, comma=0, tracker=0x0) at src/gdb/parse.c:1031
#27 0x0000000000434870 in create_excep_cond_exprs (c=0x19d93a0,
ex=ada_catch_exception) at src/gdb/ada-lang.c:12408
#28 0x000000000043612e in create_ada_exception_catchpoint (gdbarch=0x1a62620,
ex_kind=ada_catch_exception, excep_string="Program_Error", cond_string="",
tempflag=0, disabled=1, from_tty=0) at src/gdb/ada-lang.c:13211
#29 0x00000000004362d2 in catch_ada_exception_command (arg_entry=0x7fffffffe0fd
"Program_Error", from_tty=0, command=0x1269d80) at src/gdb/ada-lang.c:13236
#30 0x00000000004f41a2 in do_sfunc (c=0x1269d80, args=0x7fffffffe0fd
"Program_Error", from_tty=0) at src/gdb/cli/cli-decode.c:123
#31 0x00000000004f70b9 in cmd_func (cmd=0x1269d80, args=0x7fffffffe0fd
"Program_Error", from_tty=0) at src/gdb/cli/cli-decode.c:1948
#32 0x00000000008da204 in execute_command (p=0x7fffffffe109 "r", from_tty=0) at
src/gdb/top.c:627
#33 0x0000000000728ae0 in catch_command_errors (command=0x8d9e16
<execute_command(char const*, int)>, arg=0x7fffffffe0ed "catch exception
Program_Error", from_tty=0) at src/gdb/main.c:372
#34 0x0000000000729cdf in captured_main_1 (context=0x7fffffffd9e0) at
src/gdb/main.c:1136
#35 0x0000000000729e1f in captured_main (data=0x7fffffffd9e0) at
src/gdb/main.c:1161
#36 0x0000000000729e8a in gdb_main (args=0x7fffffffd9e0) at src/gdb/main.c:1186
#37 0x0000000000413c59 in main (argc=13, argv=0x7fffffffdae8) at
src/gdb/gdb.c:32

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24919] FAIL: gdb.ada/catch_ex.exp: insert catchpoint on Program_Error (GDB internal error)

cvs-commit at gcc dot gnu.org
In reply to this post by cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24919

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
Thanks for the report.

Can you attach your executable to this bug?
That might help.

I couldn't reproduce this.  I'm on x86-64 Fedora 29,
and I tried both the system compiler and a compiler
built from gcc trunk today.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24919] FAIL: gdb.ada/catch_ex.exp: insert catchpoint on Program_Error (GDB internal error)

cvs-commit at gcc dot gnu.org
In reply to this post by cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24919

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 11957
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11957&action=edit
catch_ex.tgz

I've applied the following patch to keep the intermediate results and annotate
foo.s:
...
diff --git a/gdb/testsuite/gdb.ada/catch_ex.exp
b/gdb/testsuite/gdb.ada/catch_ex.exp
index 5a560c1217..7ed169e4a4 100644
--- a/gdb/testsuite/gdb.ada/catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex.exp
@@ -17,7 +17,7 @@ load_lib "ada.exp"

 standard_ada_testfile foo

-if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug
additional_flags=-gnata ]] != "" } {
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug
additional_flags=-gnata additional_flags=-save-temps -additional_flags="-largs
-dA -margs"]] != "" } {
   return -1
 }

...

So hopefully you should be able to reproduce using these files:
...
$ ls -1 build/gdb/testsuite/outputs/gdb.ada/catch_ex
b~foo.adb
b~foo.ads
b~foo.ali
b~foo.o
foo
foo.ali
foo.o
foo.s
...

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24919] FAIL: gdb.ada/catch_ex.exp: insert catchpoint on Program_Error (GDB internal error)

cvs-commit at gcc dot gnu.org
In reply to this post by cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24919

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
FTR, using the foo executable in attached catch_ex.tgz, I managed to reproduce
the problem on Fedora 30:
...
[vries@localhost gdb]$ ./build/gdb/gdb
tmp/build/gdb/testsuite/outputs/gdb.ada/catch_ex/foo -batch -ex "b main" -ex
run -ex "catch exception Program_Error"
Breakpoint 1 at 0x401f39: file
/data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.ada/catch_ex/b~foo.adb,
line 132.

Breakpoint 1, main (argc=1, argv=0x7fffffffd6f8, envp=0x7fffffffd708) at
/data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.ada/catch_ex/b~foo.adb:132
132    
/data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.ada/catch_ex/b~foo.adb:
No such file or directory.
/home/vries/gdb/src/gdb/dwarf2loc.c:727: internal-error: virtual void
dwarf_evaluate_loc_desc::get_frame_base(const gdb_byte**, size_t*): Assertion
`framefunc != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]

This is a bug, please report it.  For instructions, see:
<http://www.gnu.org/software/gdb/bugs/>.

/home/vries/gdb/src/gdb/dwarf2loc.c:727: internal-error: virtual void
dwarf_evaluate_loc_desc::get_frame_base(const gdb_byte**, size_t*): Assertion
`framefunc != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]
Aborted (core dumped)
...

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24919] FAIL: gdb.ada/catch_ex.exp: insert catchpoint on Program_Error (GDB internal error)

cvs-commit at gcc dot gnu.org
In reply to this post by cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24919

--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom Tromey from comment #3)
> Thanks for the report.
>
> Can you attach your executable to this bug?
> That might help.
>
> I couldn't reproduce this.  I'm on x86-64 Fedora 29,
> and I tried both the system compiler and a compiler
> built from gcc trunk today.

Hi Tom, can you reproduce it now with the data I've provided?

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