Bug 15399

Summary: Incorrect "cannot resolve function" error: gdb no longer promoting ints to pointers
Product: gdb Reporter: saurabh
Component: c++Assignee: Keith Seitz <keiths>
Severity: normal CC: keiths
Priority: P2    
Version: 7.5   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Attachments: C++ program to reproduce, see bug description

Description saurabh 2013-04-25 14:20:45 UTC
Created attachment 7000 [details]
C++ program to reproduce, see bug description

See steps below to reproduce. Promoting ints to arbitrary pointers was allowed by gdb 7.2.

> g++ -g int_ptr.cc 
> gdb a.out
GNU gdb (GDB) 7.5
[... snip ...]
(gdb) b 13
Breakpoint 1 at 0x4005bc: file int_ptr.cc, line 13.
(gdb) run
[... snip ...]
Breakpoint 1, main () at int_ptr.cc:13
13        return 0;
(gdb) print k
$1 = (int *) 0x7fffffffbf24
(gdb) call fn(0x7fffffffbf24)
Cannot resolve function fn to any overloaded instance
(gdb) quit
Comment 1 Keith Seitz 2013-04-25 18:36:35 UTC
The patch for this bug (from c++/13356) was committed after the 7.5 branch was cut. This will be included with 7.6.

*** This bug has been marked as a duplicate of bug 13356 ***