Bug 678454

Summary: for "p *foo" i get "Attempt to take contents of a non-pointer value." when foo is a reference to a type that has an operator* method
Product: [Fedora] Fedora Reporter: Roland McGrath <roland>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: jan.kratochvil, pmuldoon, sergiodj
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gdb-7.2-45.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-05 02:35:39 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:
Attachments:
Description Flags
test case, C++ source none

Description Roland McGrath 2011-02-18 01:35:16 UTC
Created attachment 479436 [details]
test case, C++ source

Description of problem:


Version-Release number of selected component (if applicable):

gdb-7.2-36.fc14.x86_64

How reproducible:
100%

Steps to Reproduce:
1. g++ -g -o foo foo.cc (attached)
2. gdb foo
3. b foo
   run
   p *i
   <error>
   up
   p *i
   <no error>
  
Actual results:
(gdb) b foo
Breakpoint 1 at 0x400950: file fmh.cc, line 7.
(gdb) run
Starting program: /tmp/fmh 

Breakpoint 1, foo (i=23) at fmh.cc:7
(gdb) p *i
Attempt to take contents of a non-pointer value.
(gdb) up
#1  0x00000000004009e6 in main () at fmh.cc:15
(gdb) p *i
$1 = (const int &) @0x602010: 23
(gdb) 

Expected results:

First "p *i" behaves similarly to second.

Additional info:

Comment 1 Jan Kratochvil 2011-02-18 15:58:27 UTC
[patch] C++ operators do not resolve through typedefs
http://sourceware.org/ml/gdb-patches/2011-02/msg00469.html

Comment 2 Fedora Update System 2011-02-21 17:54:31 UTC
gdb-7.2-44.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/gdb-7.2-44.fc14

Comment 3 Fedora Update System 2011-02-22 04:53:18 UTC
gdb-7.2-44.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gdb'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/gdb-7.2-44.fc14

Comment 4 Fedora Update System 2011-02-24 09:28:51 UTC
gdb-7.2-45.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/gdb-7.2-45.fc14

Comment 5 Fedora Update System 2011-03-05 02:35:22 UTC
gdb-7.2-45.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.