From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4729 invoked by alias); 13 Jul 2005 13:31:45 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 4716 invoked by uid 22791); 13 Jul 2005 13:31:41 -0000 Received: from pluton.ispras.ru (HELO pluton.ispras.ru) (83.149.199.253) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Wed, 13 Jul 2005 13:31:41 +0000 Received: (qmail 57911 invoked from network); 13 Jul 2005 13:28:17 -0000 Received: from unknown (HELO truba.ispras.ru) (83.149.198.41) by pluton.ispras.ru with SMTP; 13 Jul 2005 13:28:17 -0000 Received: from truba.ispras.ru (root@localhost) by truba.ispras.ru (8.13.1/8.13.1) with SMTP id j6DDBIRB016059 for ; Wed, 13 Jul 2005 17:11:18 +0400 Received: from ispserv.ispras.ru (ispserv [83.149.198.72]) by truba.ispras.ru (8.13.1/8.13.1) with ESMTP id j6DDBIrl016049; Wed, 13 Jul 2005 17:11:18 +0400 Received: from ispserv.ispras.ru (localhost [127.0.0.1]) by ispserv.ispras.ru (8.12.8/8.12.8) with ESMTP id j6DDH1wg007812; Wed, 13 Jul 2005 17:17:01 +0400 Received: from localhost (kostik@localhost) by ispserv.ispras.ru (8.12.8/8.12.8/Submit) with ESMTP id j6DDH1S9007808; Wed, 13 Jul 2005 17:17:01 +0400 Date: Wed, 13 Jul 2005 13:31:00 -0000 From: Konstantin Karganov To: Daniel Jacobowitz cc: gdb@sources.redhat.com Subject: Re: GDB is stepping past main() In-Reply-To: <20050713130541.GA1992@nevyn.them.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SpamTest-Version: SMTP-Filter Version 2.0.0 [0125], KAS/Release SMTP-Filter Version 2.0.0 [0125], KAS/Release X-Spamtest-Info: Pass through X-SW-Source: 2005-07/txt/msg00147.txt.bz2 > Because the user (in your example) has asked it to step out of main. I asked to step and started waiting for the program termination message. And get that stopped somewhere "don't know where"... > If you want to handle this in a debugger, try detecting when you're in > main, step, are no longer in main, and main is no longer in the > backtrace. Don't you think all this detecting is a debugger's task??? Or else it turns out that the "step" in gdb is broken and has no defined semantics and needs to be carefully controlled from outside (whether it made the stepping or not and where it happened to stop)! And all this "detecting" and outside patches-workarounds are very ugly solution :( Working with GDB MI itself is finding the way in the dark, and such "surprises" like broken commands doesn't rise gdb in users eyes at all... Best regards, Konstantin.