Bug 12213 - operator() does not work
Summary: operator() does not work
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: c++ (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 16106
  Show dependency treegraph
 
Reported: 2010-11-12 18:27 UTC by Tom Tromey
Modified: 2023-12-28 11:48 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2010-11-12 18:27:48 UTC
C++ operator() overloading does not work in gdb.
Try this program:

struct S {
  int operator() (int x) { return x + 5; }
};

int main () {
  S s;

  return s(23);
}


When I try "print s(23)", I get:

(gdb) p s(23)
Invalid data type for function to be called.