This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: [using-directive] Regression against FSF GDB
- From: Sami Wagiaalla <swagiaal at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: archer at sourceware dot org
- Date: Wed, 28 Jan 2009 16:26:44 -0500
- Subject: Re: [using-directive] Regression against FSF GDB
- References: <20090128202903.GA20594@host0.dyn.jankratochvil.net>
Jan Kratochvil wrote:
> Hi Sami,
>
> I have noticed this regression during the demo. `print x' works in cases
> where it should not.
>
Yeah I noticed that too. Thanks Jan.
Incidentally I have also looked at this:
namespace A{
int x;
}
namespace B{
int x;
}
int main(){
using namespace A;
x; // This is okay [1]
using namespace B;
x; // This is illegal according to gcc [2]
}
The debug info is there and we have a choice of how to handle this in
gdb. [1] can be handled by checking the current line number with the
line number of the import that way we wont print B::x. Since [2] is
illegal we can do whatever we want in gdb, print the first x we find,
raise an error or ask the user to choose.
Sami