From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11130 invoked by alias); 2 Aug 2012 01:32:30 -0000 Received: (qmail 11122 invoked by uid 22791); 2 Aug 2012 01:32:30 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Aug 2012 01:32:17 +0000 Received: by vbkv13 with SMTP id v13so8639183vbk.0 for ; Wed, 01 Aug 2012 18:32:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.21.80 with SMTP id i16mr18384803vcb.70.1343871136442; Wed, 01 Aug 2012 18:32:16 -0700 (PDT) Received: by 10.58.68.194 with HTTP; Wed, 1 Aug 2012 18:32:16 -0700 (PDT) Date: Thu, 02 Aug 2012 01:32:00 -0000 Message-ID: Subject: question about SIGTRAP From: John Smith To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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: 2012-08/txt/msg00000.txt.bz2 hi.when I print a vector element using operator [ ],gdb show me this : Program received signal SIGTRAP, Trace/breakpoint trap. 0x08048a0b in std::vector >::operator[] (this=0xbfffde70, __n=0) at /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_vector.h:479 The program being debugged was signaled while in a function called from GDB. GDB remains in the frame where the signal was received. To change this behavior use "set unwindonsignal on". Evaluation of the expression containing the function (std::vector >::operator[](unsigned int)) will be abandoned. When the function is done executing, GDB will silently stop. then it is trapped into the stl library,and I can not go out . how can I deal with this? thank you !