From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6964 invoked by alias); 5 Jul 2010 20:27:15 -0000 Received: (qmail 6954 invoked by uid 22791); 5 Jul 2010 20:27:15 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Jul 2010 20:27:05 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 67C392BAC5E; Mon, 5 Jul 2010 16:27:03 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fhpFXwMPTivR; Mon, 5 Jul 2010 16:27:03 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 302A52BAC4B; Mon, 5 Jul 2010 16:27:02 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 22E39F5895; Mon, 5 Jul 2010 13:26:49 -0700 (PDT) Date: Mon, 05 Jul 2010 20:27:00 -0000 From: Joel Brobecker To: Martin Schr?der Cc: gdb@sourceware.org Subject: Re: Examining copied stack contents Message-ID: <20100705202649.GI2928@adacore.com> References: <4A25DE879BC24E8DAEAEBD722E363025@igor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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-07/txt/msg00013.txt.bz2 There are several possible ways to do callstack unwinding on each architecture. The prefered way is to rely on DWARF frame info, but we otherwise fallback on other methods (either native unwinding info, or if all else fails, prologue parsing). That's why the GDB code for each architecture registers "sniffers" which will tell GDB for each frame which unwinder would be best to use. The result also depends on the type of frame, since signal frames often require their own unwinder. I recommend that you have a look at i386-tdep.c, and in particular the various functions specified in the i386_frame_unwind structure. That should help you find out what is actually going on inside GDB. -- Joel