gdb.base/sigaltstack.exp failures

Bug #615990 reported by Ulrich Weigand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro GDB
Invalid
Undecided
Unassigned
gdb
Fix Released
Medium

Bug Description

FAIL: gdb.base/sigaltstack.exp: continue to catch (the program exited)
(gdb) break catcher if level == INNER
A syntax error in expression, near `== INNER'.

Symbol resolution problem? In any case, further analysis required.

Revision history for this message
In , Pedro-codesourcery (pedro-codesourcery) wrote :

From <http://sourceware.org/ml/gdb-patches/2010-06/msg00365.html>:

On Friday 21 May 2010 21:35:37, Pierre Muller wrote:

> > Pierre> 2010-05-21 Pierre Muller <email address hidden>
> > Pierre> * dwarf2read.c (process_die): Also allow DW_TAG_const_type
> > Pierre> and DW_TAG_volatile_type.
> > Pierre> (new_symbol): Likewise.

caused

 @@ -7385,16 +7385,16 @@ PASS: gdb.base/sigaltstack.exp: handle S
  PASS: gdb.base/sigaltstack.exp: handle SIGVTALRM print pass nostop
  PASS: gdb.base/sigaltstack.exp: handle SIGPROF print pass nostop
  PASS: gdb.base/sigaltstack.exp: break catcher if level == INNER
 -PASS: gdb.base/sigaltstack.exp: continue to catch
 +FAIL: gdb.base/sigaltstack.exp: continue to catch (the program exited)
  PASS: gdb.base/sigaltstack.exp: next
 -PASS: gdb.base/sigaltstack.exp: backtrace
 -PASS: gdb.base/sigaltstack.exp: finish from catch LEAF
 -PASS: gdb.base/sigaltstack.exp: finish to throw INNER
 -PASS: gdb.base/sigaltstack.exp: finish to catch INNER
 -PASS: gdb.base/sigaltstack.exp: finish from catch INNER
 -PASS: gdb.base/sigaltstack.exp: finish to OUTER
 -PASS: gdb.base/sigaltstack.exp: finish to catch MAIN
 -PASS: gdb.base/sigaltstack.exp: finish to MAIN
 +FAIL: gdb.base/sigaltstack.exp: backtrace (pattern 1)
 +FAIL: gdb.base/sigaltstack.exp: finish from catch LEAF (the program is no
longer running)
 +FAIL: gdb.base/sigaltstack.exp: finish to throw INNER (the program is no
longer running)
 +FAIL: gdb.base/sigaltstack.exp: finish to catch INNER (the program is no
longer running)
 +FAIL: gdb.base/sigaltstack.exp: finish from catch INNER (the program is no
longer running)
 +FAIL: gdb.base/sigaltstack.exp: finish to OUTER (the program is no longer running)
 +FAIL: gdb.base/sigaltstack.exp: finish to catch MAIN (the program is no longer
running)
 +FAIL: gdb.base/sigaltstack.exp: finish to MAIN (the program is no longer running)

The problem is in the `level' variable in the test.

 (gdb) break catcher if level == INNER
 A syntax error in expression, near `== INNER'.
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 (gdb) PASS: gdb.base/sigaltstack.exp: break catcher if level == INNER
 continue
 Continuing.

 Program received signal SIGALRM, Alarm clock.

 Program received signal SIGVTALRM, Virtual timer expired.

 Program exited with code 03.
 (gdb) FAIL: gdb.base/sigaltstack.exp: continue to catch (the program exited)
 ...

Note that the variable has the same name as the enum:

 enum level { MAIN, OUTER, INNER, LEAF, NR_LEVELS };

 /* Levels completed flag. */
 volatile enum level level = NR_LEVELS;

It boils down to this --- before the patch, running sigaltstack
under gdb (run to main):

 (gdb) p level
 $1 = NR_LEVELS
 (gdb) ptype level
 type = volatile enum level {MAIN, OUTER, INNER, LEAF, NR_LEVELS}

and after the patch:

 (gdb) p level
 Attempt to use a type name as an expression
 (gdb) ptype level
 type = volatile enum level {MAIN, OUTER, INNER, LEAF, NR_LEVELS}

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

Subject: Bug 11827

CVSROOT: /cvs/src
Module name: src
Branch: gdb_7_2-branch
Changes by: <email address hidden> 2010-07-21 18:01:22

Modified files:
 gdb : ChangeLog dwarf2read.c
 gdb/testsuite : ChangeLog
 gdb/testsuite/gdb.base: printcmds.exp printcmds.c

Log message:
 gdb/
 2010-07-21 Pedro Alves <email address hidden>

 PR symtab/11827

 Revert:
 2010-05-21 Pierre Muller <email address hidden>
 * dwarf2read.c (process_die): Also allow DW_TAG_const_type
 and DW_TAG_volatile_type.
 (new_symbol): Likewise.

 gdb/testsuite/
 2010-07-21 Pedro Alves <email address hidden>

 PR symtab/11827

 * gdb.base/printcmds.c (enum some_volatile_enum): New enum.
 (some_volatile_enum): New variable.
 * gdb.base/printcmds.exp (test_print_enums): New.
 <top level>: Call it.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&only_with_tag=gdb_7_2-branch&r1=1.11973.2.12&r2=1.11973.2.13
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/dwarf2read.c.diff?cvsroot=src&only_with_tag=gdb_7_2-branch&r1=1.409.2.2&r2=1.409.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&only_with_tag=gdb_7_2-branch&r1=1.2376.2.4&r2=1.2376.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/printcmds.exp.diff?cvsroot=src&only_with_tag=gdb_7_2-branch&r1=1.34&r2=1.34.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/printcmds.c.diff?cvsroot=src&only_with_tag=gdb_7_2-branch&r1=1.3&r2=1.3.144.1

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

Subject: Bug 11827

CVSROOT: /cvs/src
Module name: src
Changes by: <email address hidden> 2010-07-21 18:08:28

Modified files:
 gdb : ChangeLog dwarf2read.c
 gdb/testsuite : ChangeLog
 gdb/testsuite/gdb.base: printcmds.exp printcmds.c

Log message:
 gdb/
 2010-07-21 Pedro Alves <email address hidden>

 PR symtab/11827

 Revert:
 2010-05-21 Pierre Muller <email address hidden>
 * dwarf2read.c (process_die): Also allow DW_TAG_const_type
 and DW_TAG_volatile_type.
 (new_symbol): Likewise.

 gdb/testsuite/
 2010-07-21 Pedro Alves <email address hidden>

 PR symtab/11827

 * gdb.base/printcmds.c (enum some_volatile_enum): New enum.
 (some_volatile_enum): New variable.
 * gdb.base/printcmds.exp (test_print_enums): New.
 <top level>: Call it.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12005&r2=1.12006
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/dwarf2read.c.diff?cvsroot=src&r1=1.420&r2=1.421
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2385&r2=1.2386
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/printcmds.exp.diff?cvsroot=src&r1=1.34&r2=1.35
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/printcmds.c.diff?cvsroot=src&r1=1.3&r2=1.4

Revision history for this message
In , Pedro-codesourcery (pedro-codesourcery) wrote :

Fixed on but 7.2 branch and mainline, by reverting original patch, and adding a
new explicit test for the regression.

Revision history for this message
Yao Qi (yao-codesourcery) wrote :

Can't reproduce this failure on gdb cvs head and gdb_7.1-1ubuntu4
$ make check RUNTESTFLAGS="sigaltstack.exp"
.....
Running /home/yao/maverick/home/yao/cvs/src/gdb/testsuite/gdb.base/sigaltstack.exp ...

  === gdb Summary ===

# of expected passes 14
/home/yao/maverick/home/yao/cvs/build/gdb/testsuite/../../gdb/gdb version 7.2.50.20100811-cvs -nw -nx

$ make check RUNTESTFLAGS="sigaltstack.exp"
.....
Running /home/yao/maverick/home/yao/gdb-7.1/gdb/testsuite/gdb.base/sigaltstack.exp ...

  === gdb Summary ===

# of expected passes 14
/home/yao/maverick/home/yao/gdb-7.1/build/objdir/gdb/testsuite/../../gdb/gdb version 7.1-ubuntu -nw -nx

Revision history for this message
Ulrich Weigand (uweigand) wrote :

Ah, this has already been fixed upstream in the meantime.

See GDB PR symtab/11827.

Changed in gdb-linaro:
status: New → Invalid
Changed in gdb:
status: Unknown → Fix Released
Changed in gdb:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.