From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by sourceware.org (Postfix) with ESMTPS id 838C5398B178 for ; Wed, 3 Mar 2021 23:21:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 838C5398B178 Received: by mail-io1-xd33.google.com with SMTP id n14so27709235iog.3 for ; Wed, 03 Mar 2021 15:21:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=dG49G6UvIrjQhNxJOEp9CP5qjJtlpVOG4u5rQsXxBoY=; b=OlvthECNK3w1iBJM3uLXk9/r2PpIOZ7Jh8N7rDZ5ky9opKMpnoMD2n37E+HScmYuBh sGXXGmkf0RYTx/AEkp0Dp9OqPErCiQDq3Fz7fDVZw5j+wnViM+1c5O4KnlZPXB5CD0tE E+MOYE/nslXyJsd8I1A0na0wL+Uo4+lngoF82XT8uwRMIs+BAk43Mc+i6bgF2SjzOU5L l4Qv5KFRqxxO/Od95nB2xTFxalCkQVnv9IhLvjsVBFpt4bXq8z77mqoeStazdeWHjHCv D+Py5CHGLdbsFuYBsKe1w9/JQBPrMngvRE4Vk68HDU2JyGtm1MmACBhd2VSWWY8axKjn ImDQ== X-Gm-Message-State: AOAM531GGxF6NF2m2krANvII045XUH3NSJzfQQEvEehFyOi6VwtsIkwV bXkLomqFflsquJ2WP+pgtJ/ZBbm698D2oUdpEVj0AinoRbM5DQ== X-Google-Smtp-Source: ABdhPJxUwKHmvtmWFvPPwfmIOAn9UOeVPO1VYVB5xwE1xfh1/N/H279z30EZz+UVJ8gIrGLU3rAI01WYxUa8N0+W+vs= X-Received: by 2002:a02:294e:: with SMTP id p75mr1317704jap.34.1614813672758; Wed, 03 Mar 2021 15:21:12 -0800 (PST) MIME-Version: 1.0 References: <9f1dbafc6d1184d9ca07bdea98f696e0ca65b9e2.camel@yandex.ru> <998ef50db5faec782f174bd05394155a54830e11.camel@yandex.ru> <61f99c80b25f584bdcf0f03c271fd005a09757c4.camel@yandex.ru> <56fda69d99a5bdb4e7aed891a4af0e0a6112f16e.camel@yandex.ru> <578771c0c477e121db3fc5f87ecec37df9068c84.camel@yandex.ru> <947e1677c982b59d21fc4507f5cf6b284b3c8355.camel@yandex.ru> In-Reply-To: <947e1677c982b59d21fc4507f5cf6b284b3c8355.camel@yandex.ru> From: Peng Yu Date: Wed, 3 Mar 2021 17:21:01 -0600 Message-ID: Subject: Re: How to look up where a structure is defined? To: Konstantin Kharlamov , libc-help Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 23:21:14 -0000 On Wed, Mar 3, 2021 at 5:10 PM Konstantin Kharlamov wr= ote: > > On Wed, 2021-03-03 at 17:04 -0600, Peng Yu wrote: > > $ ctags --c-kinds=3D+p -R -o - | grep '^setsockopt\>' > > setsockopt sysdeps/unix/sysv/linux/setsockopt.c /^setsockopt (i= nt fd, > > int level, int optname, const void *optval, socklen_t len)$/;" f > > > > ctags can not recognize the following line because there is a __THROW > > at the end. Is there any other walkaround? > > > > https://github.com/bminor/glibc/blob/21c3f4b5368686ade28d90d8c7d79c4c95= c72c1b/socket/sys/socket.h#L215 > > So, when I run ctags over that file locally, I do get the definition, see= : > > =CE=BB ctags --c-kinds=3D+p -o - socket.h | grep '^setsockopt\>' > setsockopt socket.h /^extern int setsockopt (int __fd, in= t __level, int __optname,$/;" p typeref:typename:int > > Do you perhaps happen to have some old version of ctags? Mine is: > > =CE=BB ctags --version > Universal Ctags 5.9.0(p5.9.20210110.0), Copyright (C) 2015 Universal Ctag= s Team > Universal Ctags is derived from Exuberant Ctags. > Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert > Compiled: Jan 15 2021, 00:04:58 > URL: https://ctags.io/ > Optional compiled features: +wildcards, +regex, +iconv, +option-directo= ry, +xpath, +json, +interactive, +sandbox, +yaml, +packcc OK. I installed the same version of ctags. Now, it can find it. Thanks. $ ctags --version Universal Ctags 5.9.0(0071282), Copyright (C) 2015 Universal Ctags Team Universal Ctags is derived from Exuberant Ctags. Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert Compiled: Mar 3 2021, 17:15:45 URL: https://ctags.io/ Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +yaml, +case-insensitive-filenames, +packcc $ ctags --c-kinds=3D+p -o - socket.h | grep '^setsockopt\>' setsockopt socket.h /^extern int setsockopt (int __fd, int __level, int __optname,$/;" p typeref:typename:int --=20 Regards, Peng