Bug 631158 - Symbol lookup misses methods of the current class
Summary: Symbol lookup misses methods of the current class
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-07 17:03 UTC by Dodji Seketeli
Modified: 2010-09-15 05:21 UTC (History)
4 users (show)

Fixed In Version: gdb-7.2-4.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-14 04:59:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 11992 0 None None None Never

Description Dodji Seketeli 2010-09-07 17:03:07 UTC
Description of problem:

cat test.cc

~=~                                                                                                                                                                          
struct s
{
  s()
  {
  }

  int
  foo()
  {
    int i = 0;
    ++i;
    return i;
  }

  void
  bar()
  {
    int j = 0;
    j *= 2;
  }
};

int
main()
{
  s something;
  something.bar();
  something.foo();
  return 0;
}
~=~

[dodji@adjoa tests]$ g++ -g -Wall -o test test.cc
[dodji@adjoa tests]$ gdb test
GNU gdb (GDB) Fedora (7.1-33.fc13)
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 "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/dodji/tests/test...done.
(gdb) b main
Breakpoint 1 at 0x40055c: file test.cc, line 26.
(gdb) run
Starting program: /home/dodji/tests/test

Breakpoint 1, main () at test.cc:26
26        s something;
Missing separate debuginfos, use: debuginfo-install libgcc-4.4.4-10.fc13.x86_64 libstdc++-4.4.4-10.fc13.x86_64
(gdb) n
27        something.bar();
(gdb) s
s::bar (this=0x7fffffffdfaf) at test.cc:18
18          int j = 0;
(gdb) p foo()
No symbol "foo" in current context.
(gdb) p this->foo()
$1 = 1
(gdb) 

Version-Release number of selected component (if applicable):
7.1-33.fc13

How reproducible:
Always.

Comment 1 Jan Kratochvil 2010-09-11 16:03:54 UTC
Upstream Sami's post:
[patch] PR 11992 "Regression: C++ this scope sometimes does not work"
http://sourceware.org/ml/gdb-patches/2010-09/msg00229.html

Comment 2 Fedora Update System 2010-09-11 19:16:16 UTC
gdb-7.1-34.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/gdb-7.1-34.fc13

Comment 3 Fedora Update System 2010-09-11 19:17:20 UTC
gdb-7.2-4.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/gdb-7.2-4.fc14

Comment 4 Fedora Update System 2010-09-14 04:59:00 UTC
gdb-7.2-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2010-09-15 05:21:06 UTC
gdb-7.1-34.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.