From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29231 invoked by alias); 7 Sep 2011 09:33:08 -0000 Received: (qmail 29148 invoked by uid 22791); 7 Sep 2011 09:33:07 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_GJ X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Sep 2011 09:32:38 +0000 Received: by vwm42 with SMTP id 42so7499304vwm.14 for ; Wed, 07 Sep 2011 02:32:37 -0700 (PDT) Received: by 10.52.96.10 with SMTP id do10mr2729369vdb.194.1315387956485; Wed, 07 Sep 2011 02:32:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.178.11 with HTTP; Wed, 7 Sep 2011 02:32:16 -0700 (PDT) In-Reply-To: <32414505.post@talk.nabble.com> References: <32414505.post@talk.nabble.com> From: Kevin Pouget Date: Wed, 07 Sep 2011 09:33:00 -0000 Message-ID: Subject: Re: How to check that GDB is going to make a longjmp? To: adeeshah Cc: 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: 2011-09/txt/msg00024.txt.bz2 I guess you want to catch longjump of the inferior, not GDB itself, right? One way is to set a breakpoint on the `longjmp' function itself, and then jump over the function, or enter `return' to return directly from the function without executing its body. The content of the jmp_bug depends of your system, so you need to check your local setjmp.h. For instance, you can see in this =B5libC [1] implementation that they use a buffer to store the relevant CPU registers, with pre-processor macro. setjump populates the buffer with the registers, longjmp pushes the buffer values back to the CPU registers. Cordially, Kevin [1]: http://cristi.indefero.net/p/uClibc-cristi/source/tree/0_9_29_rc1/libc= /sysdeps/linux/cris/bits/setjmp.h On Wed, Sep 7, 2011 at 11:10 AM, adeeshah wrote: > > Hi, > > I want to avoid the GDB's longjmp. Is there a way to check that GDB is go= ing > to make a longjmp? > > How can i check the contents of jmp_buf? > > Adeel. > -- > View this message in context: http://old.nabble.com/How-to-check-that-GDB= -is-going-to-make-a-longjmp--tp32414505p32414505.html > Sent from the Sourceware - gdb list mailing list archive at Nabble.com. >