This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/832: GDB doesn't know when types are defined within namespaces


>Number:         832
>Category:       gdb
>Synopsis:       GDB doesn't know when types are defined within namespaces
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 15 15:28:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     carlton@math.stanford.edu
>Release:        GNU gdb 2002-11-15-cvs
>Organization:
>Environment:
any
>Description:
GDB doesn't know when a type is defined within a C++
namespace: it treats such types as being defined within
the global namespace.
>How-To-Repeat:
Compile this file:

namespace A {
  struct C {
    int x;
  };
}

int main()
{
  A::C theC;

  return 0;
}

Then try to print out the type A::C.  That doesn't work,
but just printing out C does even though it shouldn't.

(gdb) b main
Breakpoint 1 at 0x80484a0: file types.cc, line 11.
(gdb) r
Starting program: /cartan/carlton/sync/gdb-backup/namespace/prs/types 

Breakpoint 1, main () at types.cc:11
11	  return 0;
(gdb) ptype A::C
No symbol "A" in current context.
(gdb) ptype 'A::C'
No symbol "A::C" in current context.
(gdb) ptype C
type = class C {
  public:
    int x;
}
>Fix:
Daniel Jacobowitz is working on this one.
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]