This is the mail archive of the gdb-prs@sourceware.org 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]

[Bug c++/12673] Can not identify the new variable type by typedef.


http://sourceware.org/bugzilla/show_bug.cgi?id=12673

Keith Seitz <keiths at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |keiths at redhat dot com

--- Comment #1 from Keith Seitz <keiths at redhat dot com> 2011-04-14 17:36:08 UTC ---
I am unable to reproduce this bug, which works for me with 7.2 and newer on
Fedora 13 w/gcc 4.4.5 (Red Hat 4.4.5-2), at least for this simple test case:

#include <stdint.h>
#define MAX_KEYS 256
class foo
{
public:
 typedef struct {
     uint64_t key[MAX_KEYS];
     long   dataIndex;
     long next;
  } keyList_t;

};

int
main (void)
{
  foo::keyList_t kt;
  return 1;
}

$ g++ -g foo.cc
$ gdb -nx -q a.out
Reading symbols from /home/keiths/tmp/12673...done.
(gdb) ptype foo::keyList_t
type = struct foo::keyList_t {
    uint64_t key[256];
    long dataIndex;
    long next;
}
(gdb)

Several causes for this may include:
1) Not compiling with debuginfo ("-g" flag to GCC/G++)
2) Not referencing the type in your program (compiler didn't include it)
3) Bug in compiler
4) Some other bug not so trivially reproduced with this test case

Can you supply a specific test case for this? What compiler are you using? What
host platform (output of "gdb -v"/"show version") Are you using Windows? [Your
test case uses "uint64" instead of "uint64_t".]

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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