From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87559 invoked by alias); 1 May 2017 11:20:08 -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 87528 invoked by uid 89); 1 May 2017 11:20:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*Ad:D*ieee.org, Hx-languages-length:2072, D*ieee.org, hits X-HELO: mail-it0-f41.google.com Received: from mail-it0-f41.google.com (HELO mail-it0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 May 2017 11:20:06 +0000 Received: by mail-it0-f41.google.com with SMTP id r185so25591716itd.1 for ; Mon, 01 May 2017 04:20:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=2VDJ3svL6PMvd2V44vdiajJmzc8fhpwYxKwtJi5JIbQ=; b=tXp/UcIcGOh5fkYQZ5/v8Zu4TQ0r8eReX6EGiAJwMhVYDYZL75wCs+/GvvrQ2ooHL0 j5YwyBYVePRyJAauP9KaMj//GJsIwB5Zu6cSXH4b6hHTB6489o4hKEMnw3rGIupbP+4B 3V9q1RklUaCS5fKu0NXLSlhGR51juxuUrQeXZunz8a14mHz0LAJv8tSq9ksaqRkFLkrP dW+57kHutI656rTDViLFcSL0jkMi91W4UOCiElYlaRtE1/Y+b4a0VwBIh1jTAKws5cg9 WMP+4KGCmV0JRaA5xv6dA+7n9lAQ2lPHnR/d9/k8B4ZgWdjnFyweT9fWW4M2OES05R+s 3ZbQ== X-Gm-Message-State: AN3rC/6RL4TQtuEzrj1A0lWRK47rF2hEltrtwd0f0mYDe5uIMLK4lrpR 6+W1cqlm3XpVmtE/2NsQtALYrvMa8w== X-Received: by 10.36.213.3 with SMTP id a3mr22186032itg.106.1493637607158; Mon, 01 May 2017 04:20:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.120.81 with HTTP; Mon, 1 May 2017 04:20:06 -0700 (PDT) In-Reply-To: <83wpa1k9ab.fsf@gnu.org> References: <18055C3E-BBEA-4CBD-A12A-511B46D1B2AB@ieee.org> <83wpa1k9ab.fsf@gnu.org> From: Matt Rice Date: Mon, 01 May 2017 11:20:00 -0000 Message-ID: Subject: Re: repeat command on return after issuing guile command To: Eli Zaretskii Cc: David Boles , GDB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00001.txt.bz2 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 g= db=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 no= rmal behavior of gdb re-performing the last command executed if you just hi= t 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? 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. I cannot seem reproduce such behavior though 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") $ 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)