public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "swagiaal at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/11500] gdb does not support smart pointers
Date: Wed, 14 Apr 2010 20:31:00 -0000	[thread overview]
Message-ID: <20100414203118.10491.qmail@sourceware.org> (raw)
In-Reply-To: <20100414143544.11500.swagiaal@redhat.com>


------- Additional Comments From swagiaal at redhat dot com  2010-04-14 20:31 -------
Here is a better example (Without the template)

#include "stdio.h"

class MyType{
  public:
  void foo(){
    printf("I am foo\n");
  }
};

class SmartPointer{
  MyType* p;
 public:
  SmartPointer(MyType *pointer){
    p = pointer;
  }

  MyType* operator->(){
    return p;
  }

};


int main(){
  MyType mt;

  SmartPointer sp(&mt);
  sp->foo();

  return 0;
}

(gdb) p sp->foo()
Couldn't find method SmartPointer::foo



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1


http://sourceware.org/bugzilla/show_bug.cgi?id=11500

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


  reply	other threads:[~2010-04-14 20:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14 14:35 [Bug c++/11500] New: " swagiaal at redhat dot com
2010-04-14 20:31 ` swagiaal at redhat dot com [this message]
2010-04-21 15:20 ` [Bug c++/11500] " jonathon at quotidian dot org
2010-07-20 15:46 ` swagiaal at redhat dot com
     [not found] <bug-11500-4717@http.sourceware.org/bugzilla/>
2012-11-28 17:52 ` tromey at redhat dot com
2012-11-28 20:03 ` tromey at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100414203118.10491.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).