From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19865 invoked by alias); 5 Aug 2009 14:22:38 -0000 Received: (qmail 19846 invoked by uid 22791); 5 Aug 2009 14:22:36 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-qy0-f198.google.com (HELO mail-qy0-f198.google.com) (209.85.221.198) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 Aug 2009 14:22:28 +0000 Received: by qyk36 with SMTP id 36so104737qyk.12 for ; Wed, 05 Aug 2009 07:22:26 -0700 (PDT) Received: by 10.224.67.198 with SMTP id s6mr7050448qai.229.1249482146567; Wed, 05 Aug 2009 07:22:26 -0700 (PDT) Received: from dyn-209-2-226-84.dyn.columbia.edu (dyn-209-2-226-84.dyn.columbia.edu [209.2.226.84]) by mx.google.com with ESMTPS id 7sm7290692qwb.40.2009.08.05.07.22.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 05 Aug 2009 07:22:25 -0700 (PDT) Message-Id: From: kceiwH To: gdb@sourceware.org In-Reply-To: <614D83AC-2659-4D60-8309-196D0EDE8050@gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: How and When a frame is constructed Date: Wed, 05 Aug 2009 14:22:00 -0000 References: <614D83AC-2659-4D60-8309-196D0EDE8050@gmail.com> 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: 2009-08/txt/msg00027.txt.bz2 And I wonder if I know the values of all registers, could I construct a frame from those values? Regards, Mao On Aug 5, 2009, at 9:44 AM, kceiwH wrote: > Hi, > > When I read GDB source codes, I don't understand how a frame is > constructed, and when. > As far as I know, get_current_frame is used to get a current frame. > When current_frame is NULL, it will construct a sentinel_frame and > unwind it to get current_frame. But I don't know where current_frame > will be updated except get_current_frame. The > > I also guess that the frame stack will be updated when the inferior > is running, stepped. But I still don't find the code to update the > frame stack. > > I'm wondering when the first frame is constructed and pushed to > frame stack and how to push to and pop from frame stack. > > Thanks in advance. > > Best Wishes, > > Mao