Bug 631158

Summary: Symbol lookup misses methods of the current class
Product: [Fedora] Fedora Reporter: Dodji Seketeli <dodji>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: jan.kratochvil, pmuldoon, swagiaal, xan
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gdb-7.2-4.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-14 04:59:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.