From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2272 invoked by alias); 26 Aug 2010 15:21:46 -0000 Received: (qmail 2260 invoked by uid 22791); 26 Aug 2010 15:21:45 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-fx0-f41.google.com (HELO mail-fx0-f41.google.com) (209.85.161.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Aug 2010 15:21:41 +0000 Received: by fxm3 with SMTP id 3so1605474fxm.0 for ; Thu, 26 Aug 2010 08:21:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.117.194 with SMTP id s2mr9811639faq.57.1282836099211; Thu, 26 Aug 2010 08:21:39 -0700 (PDT) Received: by 10.220.72.17 with HTTP; Thu, 26 Aug 2010 08:21:38 -0700 (PDT) In-Reply-To: References: Date: Thu, 26 Aug 2010 15:21:00 -0000 Message-ID: Subject: Re: gdb breaking down at printing variable From: Vikas Mishra To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-08/txt/msg00155.txt.bz2 Andre' On Thu, Aug 26, 2010 at 8:47 PM, Vikas Mishra wrot= e: > On Thursday 26 August 2010 13:41:29 ext Vikas Mishra wrote: >> Hello Folks, >> >> I am new to C++ but have used gdb in the past. I am using the python >> pretty print extensions to the GDB to print STL containers. I wanted >> to check with the mailing list about an issue that I was seeing >> recently. =A0I am seeing the issue both on Cygwin as well as in Linux. >> >> Problem : Unable to print a vector during debugging. >> >> How to reproduce it : I have attached a program which has two >> functions - main and split, It is a very simple program that takes a >> string and splits it into words (like Perl's split function). I am not >> able to print the variable "ret" anywhere in the "split" function. > > This is most likely http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D44731 > i.e. not gdb's fault. Thanks a lot for pointing this out. The error of course disappeared if I did a temporary hack and replaced the return with an assignment and return. This is good enough for me at the moment. Regards, Vikas