This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
Re: mi/2309: Internal error (Assertion failure) on "-var-update" command
- From: Aleksandar Ristovski <ARistovski at qnx dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 10 Jan 2008 20:58:01 -0000
- Subject: Re: mi/2309: Internal error (Assertion failure) on "-var-update" command
- Reply-to: Aleksandar Ristovski <ARistovski at qnx dot com>
The following reply was made to PR mi/2309; it has been noted by GNATS.
From: Aleksandar Ristovski <ARistovski@qnx.com>
To: gdb-gnats@sources.redhat.com
Cc:
Subject: Re: mi/2309: Internal error (Assertion failure) on "-var-update"
command
Date: Thu, 10 Jan 2008 15:51:45 -0500
Another test case where this happens:
NOTE: The problem occurs on both current snapshot from CVS and gdb 6.7
NOTE2: gdb 6.6 seems to not have this issue.
Compilers tried: 4.1.1, 4.2.1
Sample code:
============= main.cc ====================
class B {
public:
int b;
virtual ~B() {};
};
class A: public B {
public:
int a;
};
int main(int argc, char **argv) {
B * b = new A();
b->b = 2;
A * a = dynamic_cast<A*>(b);
a->a = 1;
}
========================================
====== initcrash =======================
file test
-break-insert main
-exec-run
-var-create - * b
-var-list-children var1
-var-list-children var1.public
========================================
To compile:
g++ -g main.cc -o test
To reproduce assertion:
gdb -i=mi < initcrash
gdb version:
gdb --version
GNU gdb 6.7.50.20080110-cvs
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
---
Aleksandar Ristovski
QNX Software Systems