From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#24753: 26.0.50; Error using Edebug on code that uses cl-defmethod Date: Tue, 11 Apr 2017 15:16:47 +0300 Message-ID: <35640890-0451-771d-578e-666552b141ec@yandex.ru> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1491913041 2976 195.159.176.226 (11 Apr 2017 12:17:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 11 Apr 2017 12:17:21 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 To: Gemini Lasswell , 24753@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 11 14:17:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxujM-0000RK-V1 for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Apr 2017 14:17:09 +0200 Original-Received: from localhost ([::1]:38990 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxujP-0001L8-Hs for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Apr 2017 08:17:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxujJ-0001Kx-7h for bug-gnu-emacs@gnu.org; Tue, 11 Apr 2017 08:17:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cxujG-0007nQ-3m for bug-gnu-emacs@gnu.org; Tue, 11 Apr 2017 08:17:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43829) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cxujF-0007nH-Um for bug-gnu-emacs@gnu.org; Tue, 11 Apr 2017 08:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cxujF-0004As-N6 for bug-gnu-emacs@gnu.org; Tue, 11 Apr 2017 08:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Apr 2017 12:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24753 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24753-submit@debbugs.gnu.org id=B24753.149191301616032 (code B ref 24753); Tue, 11 Apr 2017 12:17:01 +0000 Original-Received: (at 24753) by debbugs.gnu.org; 11 Apr 2017 12:16:56 +0000 Original-Received: from localhost ([127.0.0.1]:42028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxujA-0004AW-EE for submit@debbugs.gnu.org; Tue, 11 Apr 2017 08:16:56 -0400 Original-Received: from mail-wr0-f178.google.com ([209.85.128.178]:34400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxuj8-0004AJ-Tb for 24753@debbugs.gnu.org; Tue, 11 Apr 2017 08:16:55 -0400 Original-Received: by mail-wr0-f178.google.com with SMTP id z109so27585046wrb.1 for <24753@debbugs.gnu.org>; Tue, 11 Apr 2017 05:16:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=rc01iOkpwZdRhXSKxZrAaRPDzaSJBLYMoDk16HTbDDY=; b=DTFtbDRI87d81FTHX0qAl/T1/3h8zUdGKyo6IM5djIkkKEfbz7y3suE8QN65b4WATc hJP3u9kFlVbT5gqQghQRVJ0gONrdCnFkAnvnd97ImC92u8Le4LhsGSjOUtAN2xI9t8UA JllHYV0gV5KW5hwToLDJs0EioyG4Sq6Qpc2sEA5Re0EjG63JXfv8cqJIYDX6KU0d9XKo KguC3I9L9Yb8W/UFXHDuGeKWquv20yzEiG49COrQKofW6sruEtkysbpVBdebH2GkB0Rn TUUGuXH+WiJPGxgMqzDAi/3pA/IK8GB5NS0NA/zmD3gRDul96jcIdp9Sre3lnLTBHZeH Zngg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rc01iOkpwZdRhXSKxZrAaRPDzaSJBLYMoDk16HTbDDY=; b=o88p7nqbxae25dWW4Uuefhc4IvvOA+SlbrWTmLrZ+V1EdIIaHcC+Of+tOcxWtiOEIH ylhZvEn2+bOJrIYJllycLqyy9LKdTqqSGBMjxtVyN5d6EecydbjFkyYIWOEZrkV/Yq6X ZG80tmQguS6O+i28v1dp9lThnFQghsifEdZ/MYJqbjuVTNJ8j8lEV3Pm7PW4IxaJDaBh XOyAlZpG2uVrwF04qy3fHvgpRrcSWNUG4Xp0ssIhRcoMNXoBNrAQp/TszyvPXHA/f8kx yGgABFn3pcjzO/697sL2BHE6WoUgCNpEjsp44MEHf3HQSFRKKD7RuJgXSbowdXibNKUu X+Ow== X-Gm-Message-State: AN3rC/437hqV1uSBUAOsX6dP1CK0+NPkHE0lZMCoOIgAahSJJGp7mzJLwQa677Mha9c0zg== X-Received: by 10.223.133.195 with SMTP id 3mr19980204wru.173.1491913009089; Tue, 11 Apr 2017 05:16:49 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.173.156]) by smtp.googlemail.com with ESMTPSA id f135sm2290422wmd.7.2017.04.11.05.16.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Apr 2017 05:16:48 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131467 Archived-At: On 21.10.2016 18:15, Gemini Lasswell wrote: > Edebug gets confused after instrumenting multiple methods with the same > name created by cl-defgeneric and cl-defmethod. To reproduce, save the > following bit of code (which is an excerpt from cl-generic-tests.el) > to bug.el: > > (require 'cl-generic) > > (fmakunbound 'foo) > (cl-defgeneric foo (x y)) > (cl-defgeneric (setf foo) (v y z) "My generic doc.") > (cl-defmethod (setf foo) (v (y t) z) (list v y z)) > (cl-defmethod (setf foo) (v (_y (eql 4)) z) (list v "four!" z)) > > (defun foo-bug () > (message "%s" (setf (foo 'a 'b) 'v))) > > (foo-bug) > > Steps to reproduce: > 1. emacs -Q > 2. C-x C-f bug.el RET > 3. M-x edebug-all-defs RET > 4. M-x eval-buffer RET > 5. g > > Result: edebug--display: Args out of range: [44 51 61 62], 4 I can reproduce this scenario, but I don't recall seeing this exact error in practice. TBH, I'm not sure what (setf foo) does in the NAME slot. A similar scenario with existing functions leads to a related problem: 1. Search for the definitions of semantic-symref-perform-search. 2. Instrument the one in semantic/symref/grep.el and some other one, like semantic/symref/cscope.el (the order is important). 3. Make sure there are no index files belonging to any tools in the Emacs root directory, so that the Grep tool will be used for search. 4. Type M-x xref-find-references, input something. 5. See edebug jump in the definition in cscope.el, even though the TOOL argument is ...-grep. As I step through it, it quickly gives up with "Source has changed". Your patch seems to fix that as well. I hope someone else more familiar with edebug will take a look at it soon.