This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug symtab/11827] New: const and volatile enum variables regression
- From: "pedro at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 21 Jul 2010 16:24:07 -0000
- Subject: [Bug symtab/11827] New: const and volatile enum variables regression
- Reply-to: sourceware-bugzilla at sourceware dot org
>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 <muller@ics.u-strasbg.fr>
> > 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}
--
Summary: const and volatile enum variables regression
Product: gdb
Version: 7.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: symtab
AssignedTo: unassigned at sourceware dot org
ReportedBy: pedro at codesourcery dot com
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11827
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.