public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12673] New: Can not identify the new variable type by typedef.
@ 2011-04-14  2:39 flyxiao_2000 at 163 dot com
  2011-04-14 17:36 ` [Bug c++/12673] " keiths at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: flyxiao_2000 at 163 dot com @ 2011-04-14  2:39 UTC (permalink / raw)
  To: gdb-prs

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

           Summary: Can not identify the new variable type by typedef.
           Product: gdb
           Version: 7.2
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@sourceware.org
        ReportedBy: flyxiao_2000@163.com


Hi,

  When i declare the below struct to a class, then gdb can not identify the
keyList_t.

 typedef struct {
     uint64 key[MAX_KEYS];
     long   dataIndex;
     long next;
  } keyList_t;


(gdb) ptype CTest::keyList_t
There is no field named keyList_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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/12673] Can not identify the new variable type by typedef.
  2011-04-14  2:39 [Bug c++/12673] New: Can not identify the new variable type by typedef flyxiao_2000 at 163 dot com
@ 2011-04-14 17:36 ` keiths at redhat dot com
  2011-04-15  1:22 ` flyxiao_2000 at 163 dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: keiths at redhat dot com @ 2011-04-14 17:36 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/12673] Can not identify the new variable type by typedef.
  2011-04-14  2:39 [Bug c++/12673] New: Can not identify the new variable type by typedef flyxiao_2000 at 163 dot com
  2011-04-14 17:36 ` [Bug c++/12673] " keiths at redhat dot com
@ 2011-04-15  1:22 ` flyxiao_2000 at 163 dot com
  2011-04-18 20:56 ` keiths at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: flyxiao_2000 at 163 dot com @ 2011-04-15  1:22 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from flyxiao_2000 at 163 dot com 2011-04-15 01:22:24 UTC ---
Hi,
   Thanks for your quick answer !
   The below is my case as your try !
    linux-j9au ----------------my suse hostname


linux-j9au:/local/test # cat foo.cc
#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;
}
linux-j9au:/local/test # g++ -g foo.cc
linux-j9au:/local/test # gdb -nx -q a.out
Reading symbols from /local/test/a.out...done.
(gdb) ptype foo::keyList_t
There is no field named keyList_t
(gdb) q
linux-j9au:/local/test # gdb -v
GNU gdb (GDB) 7.2
Copyright (C) 2010 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".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
linux-j9au:/local/test # uname -a
Linux linux-j9au 2.6.22.5-31-bigsmp #1 SMP 2007/09/21 22:29:00 UTC i686 i686
i386 GNU/Linux
linux-j9au:/local/test # uname -r
2.6.22.5-31-bigsmp
linux-j9au:/local/test # lsb_release -a
LSB Version:   
core-2.0-noarch:core-3.0-noarch:core-2.0-ia32:core-3.0-ia32:desktop-3.1-ia32:desktop-3.1-noarch:graphics-2.0-ia32:graphics-2.0-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: SUSE LINUX
Description:    openSUSE 10.3 (i586)
Release:        10.3
Codename:       n/a











At 2011-04-15 01:36:26,"keiths at redhat dot com"
<sourceware-bugzilla@sourceware.org> wrote:

>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 reported the bug.

-- 
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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/12673] Can not identify the new variable type by typedef.
  2011-04-14  2:39 [Bug c++/12673] New: Can not identify the new variable type by typedef flyxiao_2000 at 163 dot com
  2011-04-14 17:36 ` [Bug c++/12673] " keiths at redhat dot com
  2011-04-15  1:22 ` flyxiao_2000 at 163 dot com
@ 2011-04-18 20:56 ` keiths at redhat dot com
  2011-08-19 15:48 ` tromey at redhat dot com
  2014-09-12 22:59 ` sergiodj at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: keiths at redhat dot com @ 2011-04-18 20:56 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Keith Seitz <keiths at redhat dot com> 2011-04-18 20:56:04 UTC ---
What version of gcc are you using? (gcc -v)

-- 
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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/12673] Can not identify the new variable type by typedef.
  2011-04-14  2:39 [Bug c++/12673] New: Can not identify the new variable type by typedef flyxiao_2000 at 163 dot com
                   ` (2 preceding siblings ...)
  2011-04-18 20:56 ` keiths at redhat dot com
@ 2011-08-19 15:48 ` tromey at redhat dot com
  2014-09-12 22:59 ` sergiodj at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2011-08-19 15:48 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
                 CC|                            |tromey at redhat dot com

--- Comment #4 from Tom Tromey <tromey at redhat dot com> 2011-08-19 15:46:33 UTC ---
Almost certainly a compiler bug.
Works for me on F15.
Changed state pending feedback.

-- 
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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/12673] Can not identify the new variable type by typedef.
  2011-04-14  2:39 [Bug c++/12673] New: Can not identify the new variable type by typedef flyxiao_2000 at 163 dot com
                   ` (3 preceding siblings ...)
  2011-08-19 15:48 ` tromey at redhat dot com
@ 2014-09-12 22:59 ` sergiodj at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: sergiodj at redhat dot com @ 2014-09-12 22:59 UTC (permalink / raw)
  To: gdb-prs

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

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
                 CC|                            |sergiodj at redhat dot com
         Resolution|---                         |OBSOLETE

--- Comment #5 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
Closing as OBSOLETE due to inactivity.  Feel free to reopen if still valid.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-12 22:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-14  2:39 [Bug c++/12673] New: Can not identify the new variable type by typedef flyxiao_2000 at 163 dot com
2011-04-14 17:36 ` [Bug c++/12673] " keiths at redhat dot com
2011-04-15  1:22 ` flyxiao_2000 at 163 dot com
2011-04-18 20:56 ` keiths at redhat dot com
2011-08-19 15:48 ` tromey at redhat dot com
2014-09-12 22:59 ` sergiodj at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).