Bug 678454 - 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
Summary: for "p *foo" i get "Attempt to take contents of a non-pointer value." when fo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-18 01:35 UTC by Roland McGrath
Modified: 2011-03-05 02:35 UTC (History)
3 users (show)

Fixed In Version: gdb-7.2-45.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-05 02:35:39 UTC


Attachments (Terms of Use)
test case, C++ source (250 bytes, text/x-c++src)
2011-02-18 01:35 UTC, Roland McGrath
no flags Details

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.


Note You need to log in before you can comment on or make changes to this bug.