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 symtab/11992] New: Regression: C++ this scope sometimes does not work


downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=631158

Actual:
gdb -nx ./1 -ex 'b 18' -ex r -ex 'p foo()' -ex 'p this->foo()'
Breakpoint 1, s::bar (this=0x7fffffffdf0f) at 1.C:18
18	    int j = 0;
No symbol "foo" in current context.
$1 = 1

Expected:
$1 = 1
$2 = 1

PASS GNU gdb (GDB) 7.1.0.20100707-cvs
FAIL GNU gdb (GDB) 7.2.0.20100908-cvs
FAIL GNU gdb (GDB) 7.2.50.20100908-cvs
 = regression

Unrelated to GCC version, tested with:
g++ (GCC) 4.4.5 20100908 (prerelease)
g++ (GCC) 4.6.0 20100908 (experimental)
gcc-4.5.1-1.fc14.x86_64

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;
}

-- 
           Summary: Regression: C++ this scope sometimes does not work
           Product: gdb
           Version: 7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: symtab
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: jan dot kratochvil at redhat dot com
                CC: gdb-prs at sourceware dot org
GCC target triplet: x86_64-unknown-linux-gnu


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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