From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20412 invoked by alias); 27 Apr 2012 19:13:44 -0000 Received: (qmail 20393 invoked by uid 22791); 27 Apr 2012 19:13:42 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-qa0-f48.google.com (HELO mail-qa0-f48.google.com) (209.85.216.48) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Apr 2012 19:13:29 +0000 Received: by qady23 with SMTP id y23so603745qad.0 for ; Fri, 27 Apr 2012 12:13:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-system-of-record:x-gm-message-state; bh=X0KGpvik8C8DPtXG/vePLfb0lgTJXqinQ+aVf4CLnqc=; b=hxk0JJWV+LvLP076gdh8fqblzvg6FpFlindjKPmjkLfjyShx9D3xPLD5nVHbRIxM2+ g3mJj5h10PFHqqspJo6yp+PKkoct05ep5HQRi7IfUUDtB42R5uxi6YWPltdg9wwfg4qE 9FYXFg3nPQPve4TRXRrU4YgryxoLKnJKoleFS9ClYuE8cYOw9u0S0zvrFpB60UOVGtwH kbp8U47us7JWHk/a7+5uxWOSWCiMjXiQqrmK6ML+ub+mG02f+8BDcrqWZRXmBL6xtJfq +ORAD6cFAAUwwuwye03RI/xAXJBJeY4qRqLJXZdJ3oHbsbJ8eHuKyab635CC3oZZfQhN RIMA== Received: by 10.224.187.205 with SMTP id cx13mr10061249qab.80.1335554009090; Fri, 27 Apr 2012 12:13:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.187.205 with SMTP id cx13mr10061231qab.80.1335554008930; Fri, 27 Apr 2012 12:13:28 -0700 (PDT) Received: by 10.224.215.132 with HTTP; Fri, 27 Apr 2012 12:13:28 -0700 (PDT) In-Reply-To: <878vhh5gk8.fsf@fleche.redhat.com> References: <878vhh5gk8.fsf@fleche.redhat.com> Date: Fri, 27 Apr 2012 19:13:00 -0000 Message-ID: Subject: Re: [RFC] Extend gdb.Breakpoint to allow setting a breakpoint at the current execution address From: Siva Chandra To: Tom Tromey Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-Gm-Message-State: ALoCoQkr6PjlTHlFfdJsqqXwqE55K/ksFI2ir8cYOVYdE8DejJcL2a5cbSiy5hCt3Y05xZB2gUGeJYcqD34ozvHo0qFKRx7p/EuPQVwbr/CEMzaH4m8VCpOKuS/aiGyMvGoBP3oIW2VZ 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/msg00219.txt.bz2 Continuing from http://sourceware.org/ml/gdb-patches/2012-04/msg01001.html I am posting to gdb@ as it is more suitable now. Siva> I didn't find a way to set a breakpoint at the current execution Siva> address through the existing Python API. Tom> I think you can use '*$pc' as the linespec. Tom> Or you can get the value of the PC (any way you want) and use ('*%d' % pc). I didn't want to use $pc explicitly as the manual only says "on most machines" with regard to its meaning. I do not know of any machine where PC does not mean the program counter though. What are the other ways to get the value of the PC? Thanks, Siva Chandra