From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27375 invoked by alias); 3 Mar 2007 14:36:06 -0000 Received: (qmail 27366 invoked by uid 22791); 3 Mar 2007 14:36:05 -0000 X-Spam-Check-By: sourceware.org Received: from mailgw3.ericsson.se (HELO mailgw3.ericsson.se) (193.180.251.60) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 03 Mar 2007 14:35:59 +0000 Received: from mailgw3.ericsson.se (unknown [127.0.0.1]) by mailgw3.ericsson.se (Symantec Mail Security) with ESMTP id ACD9F20756; Sat, 3 Mar 2007 15:35:56 +0100 (CET) X-AuditID: c1b4fb3c-a79babb000004e66-fb-45e987ccd0a8 Received: from esealmw128.eemea.ericsson.se (unknown [153.88.254.121]) by mailgw3.ericsson.se (Symantec Mail Security) with ESMTP id 90BD720413; Sat, 3 Mar 2007 15:35:56 +0100 (CET) Received: from esealmw126.eemea.ericsson.se ([153.88.254.170]) by esealmw128.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Sat, 3 Mar 2007 15:35:56 +0100 Received: from mikro.mikro ([159.107.199.0]) by esealmw126.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Sat, 3 Mar 2007 15:35:56 +0100 Received: from localhost (localhost [127.0.0.1]) by mikro.mikro (Postfix) with ESMTP id 8CC442B033C; Sat, 3 Mar 2007 15:35:55 +0100 (CET) Subject: Re: (Not) debugging STL From: =?ISO-8859-1?Q?Alp=E1r_J=FCttner?= To: Nick Roberts Cc: Daniel Jacobowitz , gdb@sourceware.org In-Reply-To: <1172926723.4011.11.camel@mikro.mikro> References: <1172750690.4155.24.camel@mikro.mikro> <20070301121854.GA10896@caradoc.them.org> <1172752794.4155.35.camel@mikro.mikro> <20070301124621.GA11292@caradoc.them.org> <1172864572.4272.21.camel@mikro.mikro> <17897.23824.618849.817120@kahikatea.snap.net.nz> <1172926723.4011.11.camel@mikro.mikro> Content-Type: text/plain; charset=ISO-8859-2 Date: Sat, 03 Mar 2007 14:36:00 -0000 Message-Id: <1172932555.4011.25.camel@mikro.mikro> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: quoted-printable 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: 2007-03/txt/msg00043.txt.bz2 Hi, It seems to me that variable 'gud-last-last-frame' contains the name of current source file. Thus I tried the following. (defun my-step () (interactive) (gud-step 1) (while (string-match "/usr/.*" (car gud-last-last-frame)) (gud-step 1))) However this did not work, I think because gud-step doesn't seem to update the variable gud-last-last-frame. At least the following function always prints the same string twice. (defun m-step () (interactive) (print (car gud-last-last-frame)) (gud-step 1) (print (car gud-last-last-frame)) ) What to do then? Shall I use something else instead of gud-step? Alpar > On Sat, 2007-03-03 at 13:58 +0100, Alp=E1r J=FCttner wrote: > > > Then, my next idea is to use the gdb interface of emacs. It should be > > > trivial to do a lisp function doing this, but I couldn't figure out = how > > > to do that. > >=20 > > I'm not sure that I understand exactly what you're trying to do, but if > > Daniel says it can't be done in GDB, then I dont think it can be done in > > Emacs, as Emacs can only use the output that GDB gives it. >=20 > At first, I would simply write an emacs function that iterates the gdb > 'step' command until we get out of any files whose full name starts > say /usr. > >=20 > > > For example how to obtain the file name of the currently > > > debugged line in emacs/gud/gdb? > > ... > > from the command line, then step a few times. You'll see the current l= ine, > > that Emacs uses, get printed out. >=20 > I understand, that emacs parses this line, so I would like to know how > to have emacs to tell me the file name. >=20 > Regards, > Alpar >=20