This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
c++/912: overloaded static member functions
- From: kraftche at cae dot wisc dot edu
- To: gdb-gnats at sources dot redhat dot com
- Date: 8 Jan 2003 17:12:20 -0000
- Subject: c++/912: overloaded static member functions
- Reply-to: kraftche at cae dot wisc dot edu
>Number: 912
>Category: c++
>Synopsis: overloaded static member functions
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 08 09:18:02 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: kraftche@cae.wisc.edu
>Release: 5.3
>Organization:
>Environment:
linux
>Description:
gdb won't resolve overloaded static member functions
>How-To-Repeat:
#!/bin/sh
cat >gdb-overload.cpp <<FILE
#include <iostream>
class A
{
public:
static int foo()
{ return 1; }
static int foo(int i)
{ return i+1; }
static int foo(int i, int j)
{ return i + j + 1; }
};
int main()
{
int i = 1, j = 2;
std::cout << A::foo() << std::endl;
}
FILE
g++ -g gdb-overload.cpp -o over
gdb over <<GDB
break 20
run
print A::foo()
print A::foo(1)
print A::foo(1,2)
quit
GDB
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: