From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59064 invoked by alias); 1 May 2017 16:37:09 -0000 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 Received: (qmail 59049 invoked by uid 89); 1 May 2017 16:37:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=Hx-languages-length:2643, straight, D*ieee.org, hits X-HELO: out4-smtp.messagingengine.com Received: from out4-smtp.messagingengine.com (HELO out4-smtp.messagingengine.com) (66.111.4.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 May 2017 16:37:07 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id DE757209C2; Mon, 1 May 2017 12:37:07 -0400 (EDT) Received: from web5 ([10.202.2.215]) by compute7.internal (MEProxy); Mon, 01 May 2017 12:37:07 -0400 X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id BF74C9E23D; Mon, 1 May 2017 12:37:07 -0400 (EDT) Message-Id: <1493656627.1159458.961959512.72D00241@webmail.messagingengine.com> From: David Boles To: Matt Rice , Eli Zaretskii Cc: GDB MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" References: <18055C3E-BBEA-4CBD-A12A-511B46D1B2AB@ieee.org> <83wpa1k9ab.fsf@gnu.org> In-Reply-To: Date: Mon, 01 May 2017 16:37:00 -0000 Subject: Re: repeat command on return after issuing guile command X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00003.txt.bz2 My apologies - I never run gdb outside of Emacs and made the assumption that an interaction between the gdb-mi.el code, guile, and command repeating wasn't plausible. The problem indeed does not occur with gdb itself, only when run from within emacs. I will go and investigate things from the Emacs side of things and try to develop a patch for this behavior. Thanks for setting me straight. - db On Mon, May 1, 2017, at 06:20 AM, Matt Rice wrote: > On Sun, Apr 30, 2017 at 12:03 PM, Eli Zaretskii wrote: > >> From: David Boles > >> Date: Fri, 28 Apr 2017 22:50:18 -0500 > >> > >> I have recently been learning to use the guile mechanism for extending= gdb=E2=80=99s capabilities - very powerful. One thing that I have noticed = is that after a =E2=80=9Cguile (=E2=80=A6)=E2=80=9D command is issued, the = normal behavior of gdb re-performing the last command executed if you just = hit enter is disabled. This applies to even native gdb commands like =E2=80= =9Cnext=E2=80=9D or =E2=80=9Cstep=E2=80=9D - which is quite painful. > >> > >> I have observed this with versions 7.10.x and 7.12.1. > > > > I cannot reproduce this with GDB 7.12 built with Guile 2.0.X. I tried > > this: > > > > (gdb) apropos file > > ... long list of commands ... > > (gdb) > > ... the same long list of commands ... > > (gdb) guile (display (+ 20 3)) (newline) > > 23 > > (gdb) apropos file > > ... long list of commands ... > > (gdb) > > ... the same long list of commands ... > > > > So it seems to work as expected for me. Can you show a recipe that > > exhibits the problem on your system? >=20 > One thing that I can think of is if the guile script being executed > causes the program to continue, > which then hits a breakpoint which has "commands" associated with it, > the call to prevent_dont_repeat in > breakpoint.c (bpstat_do_actions_1), could have some clobbering effect > messes with the repeat. >=20 > I cannot seem reproduce such behavior though >=20 > using the following foo.gdb: > set breakpoint pending on > break foo > commands 1 > print "foo" > end > guile (use-modules (gdb)) > guile (execute "start") > guile (execute "cont") >=20 > $ echo "void foo() {}; int main() { while (1) foo(); return 0; }" | > gcc -g -x c - && gdb -quiet ./a.out -ex 'source foo.gdb' > Reading symbols from ./a.out...done. > Breakpoint 1 at 0x4004aa: file , line 1. > Breakpoint 1, foo () at :1 > 1 in > $1 =3D "foo" > (gdb) guile (execute "cont") > Breakpoint 1, foo () at :1 > 1 in > $2 =3D "foo" > (gdb) > Breakpoint 1, foo () at :1 > 1 in > $3 =3D "foo" > (gdb)