From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27458 invoked by alias); 8 Jan 2008 15:36:23 -0000 Received: (qmail 27430 invoked by uid 22791); 8 Jan 2008 15:36:23 -0000 X-Spam-Check-By: sourceware.org Received: from mail.artimi.com (HELO mail.artimi.com) (194.72.81.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 08 Jan 2008 15:35:58 +0000 Received: from rainbow ([192.168.8.46]) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 8 Jan 2008 15:35:53 +0000 From: "Dave Korn" To: "'ranjith kumar'" , References: <509320.35245.qm@web27407.mail.ukl.yahoo.com> Subject: RE: printing a string Date: Tue, 08 Jan 2008 15:36:00 -0000 Message-ID: <003701c8520c$2842c9d0$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <509320.35245.qm@web27407.mail.ukl.yahoo.com> 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: 2008-01/txt/msg00050.txt.bz2 On 08 January 2008 06:06, ranjith kumar wrote: > I know that a variable can be print in gdb by > "print var". > > But how to print a string??? "print" will display a string, if you're printing a variable of type "char *", or a std::string. Or you can use "x" (examine) with the "/s" modifier if you just have a memory address. cheers, DaveK -- Can't think of a witty .sigline today....