From: David Carlton <carlton@math.stanford.edu>
To: Jim Blandy <jimb@red-bean.com>
Cc: gdb <gdb@sources.redhat.com>
Subject: Re: current namespace game plan
Date: Mon, 07 Oct 2002 11:50:00 -0000 [thread overview]
Message-ID: <ro1it0em6ch.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <m3bs69obav.fsf@savonarola.red-bean.com>
On 04 Oct 2002 21:43:20 -0500, Jim Blandy <jimb@red-bean.com> said:
> For my own sake, at least, it would be nice to have specific
> examples of code and commands that GDB gets wrong at present.
I'm including a file with examples after my signature: break in main
and try to print out each expression listed in the body of main;
you'll have problems. And break in B::b2 and try to print out b1;
you'll have problems.
For some of these (u1, a1, and b1, but not the foo expression, D::b1,
or e2), GDB actually prints out an answer that is incorrect, rather
than saying that there isn't a symbol by that name. Pretty weird; I
just noticed that, and I really don't understand why GDB would do so.
I'll have to look into that, but if you happen to understand what's
going on with those examples, please tell me.
David Carlton
carlton@math.stanford.edu
namespace {
int u1 = 1;
}
namespace A {
int a1 = 1;
}
using namespace A;
namespace B {
int b1 = 1;
int b2()
{
return b1;
}
}
namespace C {
class c1 {};
void foo(c1 x)
{
}
}
namespace D = B;
namespace E {
int e1 = 1;
int e2 = 2;
}
using E::e2;
int main()
{
// For each of these, try to print out the expression in question,
// as typed here. (Well, you should probably enclose them in single
// quotes.) GDB either won't let you or will print out garbage.
// GDB can't see unnamed namespaces.
u1;
// GDB can't see using directives.
a1;
// GDB can't do Koenig lookup.
foo(C::c1());
// GDB can't see namespace aliases.
D::b1;
// GDB can't see using declarations.
e2;
// For this one, break in B::b2 and try to print b1. GDB won't let you.
B::b2();
}
next prev parent reply other threads:[~2002-10-07 18:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-04 14:57 David Carlton
2002-10-04 15:10 ` Daniel Jacobowitz
2002-10-04 15:58 ` David Carlton
2002-10-04 17:18 ` Daniel Jacobowitz
2002-10-04 19:43 ` Jim Blandy
2002-10-07 11:50 ` David Carlton [this message]
2002-10-16 11:14 ` Elena Zannoni
2002-10-16 11:46 ` David Carlton
2002-10-21 12:08 ` Andrew Cagney
2002-10-23 16:36 ` Andrew Cagney
2002-10-23 16:47 ` Daniel Jacobowitz
2002-10-23 18:22 ` Andrew Cagney
2002-10-23 21:02 ` Stan Shebs
2002-10-24 15:07 ` David Carlton
2002-10-24 15:26 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ro1it0em6ch.fsf@jackfruit.Stanford.EDU \
--to=carlton@math.stanford.edu \
--cc=gdb@sources.redhat.com \
--cc=jimb@red-bean.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox