From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1146 invoked by alias); 25 Apr 2012 10:55:28 -0000 Received: (qmail 1124 invoked by uid 22791); 25 Apr 2012 10:55:28 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Apr 2012 10:55:14 +0000 Received: by iajr24 with SMTP id r24so3008627iaj.0 for ; Wed, 25 Apr 2012 03:55:14 -0700 (PDT) Received: by 10.50.189.200 with SMTP id gk8mr1798496igc.8.1335351314242; Wed, 25 Apr 2012 03:55:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.57.146 with HTTP; Wed, 25 Apr 2012 03:54:54 -0700 (PDT) In-Reply-To: <20120425124001.Horde.7iYfQ0isJlFPl9SBVQNWqLA@mail.elis.ugent.be> References: <1224346844.20120421150636@gmail.com> <20120425114420.Horde.vTwDIEisJlFPl8d0GiwUFMA@mail.elis.ugent.be> <1505053135.20120425140807@gmail.com> <20120425124001.Horde.7iYfQ0isJlFPl9SBVQNWqLA@mail.elis.ugent.be> From: Kevin Pouget Date: Wed, 25 Apr 2012 10:55:00 -0000 Message-ID: Subject: Re: Re[2]: feature request: set step-mode smart To: Ilya Basin Cc: Jonas Maebe , Sergio Durigan Junior , 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-04/txt/msg00210.txt.bz2 On Wed, Apr 25, 2012 at 12:40 PM, Jonas Maebe wrote: > > > Ilya Basin wrote on Wed, 25 Apr 2012: > > >> JM> up to figuring out yet. In the long term, it also does not seem >> JM> tenable to add pattern recognition to gdb for stubs generated by all >> JM> possible compilers (and possibly different versions of those >> compilers). >> >> No one's speaking about pattern recognition. > > > If gdb does not automatically step a number of instructions to see whether > subsequent code has debug information, you need pattern recognition in gdb > to automatically detect such situations and to avoid the problem you > described (gdb skipping or stepping over such code, rather than stepping > into it). See this thread: > http://sourceware.org/ml/gdb/2009-04/msg00008.html > > > Jonas > FWIW, I did something somehow similar lastly, which works fine if you know the "profile" of your trampoline function (not re-tested): > gdb.execute("stepi") > start_frame = gdb.newest_frame() > while True: > start_frame = gdb.newest_frame() > gdb.execute("stepi") > new_frame = gdb.newest_frame() > if start_frame != new_frame: > break this script should step into the trampoline function and execute its assembly instructions until the first frame creation (function call). Kevin