From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10512 invoked by alias); 5 Aug 2009 13:45:07 -0000 Received: (qmail 10479 invoked by uid 22791); 5 Aug 2009 13:45:04 -0000 X-SWARE-Spam-Status: No, hits=-1.2 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 13:44:58 +0000 Received: by qyk36 with SMTP id 36so77260qyk.12 for ; Wed, 05 Aug 2009 06:44:55 -0700 (PDT) Received: by 10.224.54.3 with SMTP id o3mr7074038qag.92.1249479895516; Wed, 05 Aug 2009 06:44:55 -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 7sm2148598qwf.38.2009.08.05.06.44.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 05 Aug 2009 06:44:54 -0700 (PDT) Message-Id: <614D83AC-2659-4D60-8309-196D0EDE8050@gmail.com> From: kceiwH To: gdb@sourceware.org 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: How and When a frame is constructed Date: Wed, 05 Aug 2009 13:45:00 -0000 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/msg00026.txt.bz2 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