From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: improve gud-gdb completion Date: Fri, 30 Jul 2021 11:51:01 -0700 Message-ID: <86pmuzmy96.fsf@stephe-leake.org> References: <86r1fi4jd3.fsf@stephe-leake.org> <87czr2wl03.fsf@md5i.com> <86fsvwofwz.fsf@stephe-leake.org> <87y29ovc66.fsf@md5i.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5647"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt) Cc: emacs-devel To: Michael Welsh Duggan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 30 20:58:46 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9XiX-0001IJ-UF for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Jul 2021 20:58:46 +0200 Original-Received: from localhost ([::1]:40344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9XiW-0003C9-8m for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Jul 2021 14:58:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9XbE-0008Qj-GS for emacs-devel@gnu.org; Fri, 30 Jul 2021 14:51:13 -0400 Original-Received: from gateway22.websitewelcome.com ([192.185.47.179]:32861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9XbC-0000cl-OP for emacs-devel@gnu.org; Fri, 30 Jul 2021 14:51:12 -0400 Original-Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway22.websitewelcome.com (Postfix) with ESMTP id D0E14777B for ; Fri, 30 Jul 2021 13:51:05 -0500 (CDT) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with SMTP id 9Xb7mAk2rrJtZ9Xb7mrHsm; Fri, 30 Jul 2021 13:51:05 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Zdg77KJGpIABsFTStfl0hy9NXMKo7NWYN3bzRIOQXp8=; b=VVlAufnMgijTHg/I73WQr3Dg4i CZ63rGsRjyJUr13lQ8yb4zEMrRrie2yBZF4YB0aMYcfER7bP4zpNLwJzpHvFQkTf+FaDQg6RWcZJv cj/3vuDcnE5N7aOTfqWXu8ZNPwDmu4BqD6Dc29Ksm523Pqty8JOwIoien5+FGEkqO5XC/QGi0pafC 4iSCHIQqIeWp8ypQbUPt5ikn+YsSZ23roz/OQ6i/xEUJ/c1XKpOXQGE1XNZJPKq3UAackQ05Rkzgs YcTRKnByAu1uJ4DAPkR6ATE01i0GEsRt6q2niFbmwyBYnmfapo6Klx+za/hif/jJwocV4vZCyFH5H 8neDnr8Q==; Original-Received: from [76.77.182.20] (port=52199 helo=Takver4) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m9Xb7-0017Ss-9k; Fri, 30 Jul 2021 12:51:05 -0600 In-Reply-To: <87y29ovc66.fsf@md5i.com> (Michael Welsh Duggan's message of "Thu, 29 Jul 2021 21:10:57 -0400") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 76.77.182.20 X-Source-L: No X-Exim-ID: 1m9Xb7-0017Ss-9k X-Source-Sender: (Takver4) [76.77.182.20]:52199 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 16 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: permerror client-ip=192.185.47.179; envelope-from=stephen_leake@stephe-leake.org; helo=gateway22.websitewelcome.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NEUTRAL=0.779 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271867 Archived-At: Michael Welsh Duggan writes: > Stephen Leake writes: > >> Michael Welsh Duggan writes: >> >>> Stephen Leake writes: >>> >>>> I'd like to improve completion in gud-gdb. >>>> >>>> Currently, it completes on names in the buffer being debugged, but it >>>> doesn't include "." in the name, so if I'm trying to print >>>> "Incremental_Parser.Parse_Errors.Length", it only completes to >>>> "Incremental_Parser". >>>> >>>> However, I can't figure out exactly what elisp code is harvesting names >>>> from the buffer. >>>> >>>> TAB is bound to completion-at-point. >>>> >>>> completion-at-point-functions is >>>> (gud-gdb-completion-at-point comint-completion-at-point t) >>>> >>>> (default-value 'completion-at-point-functions) is >>>> (tags-completion-at-point-function) >>>> >>>> None of those completion functions look at the text in buffers. >>>> >>>> What am I missing? >>> >>> Are you certain that it looks at the text in buffers at all? If you >>> look at gud-gdb-completions, you'll see that it uses gdb's completion >>> mechanism based on symbols in the binary. >> >> It finds names from my code; "Incremental_Parser" above. >> >> I found a workaround by replacing the completion with hippie-expand, but >> I'd still like to understand how the original configuration works. > > I'm afraid I don't understand. If you are debugging a binary that > contains the "Incremental_Parser" symbol, then gdb knows that, and its > completion mechanism returns that. Ah, sorry, I misread what you wrote. Ok, that answers my question, and to fix my original problem, I'd have to modify gdb itself. -- -- Stephe