From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by sourceware.org (Postfix) with ESMTPS id 9B6383857832 for ; Wed, 3 Mar 2021 19:51:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9B6383857832 Received: by mail-il1-x12f.google.com with SMTP id h18so22552019ils.2 for ; Wed, 03 Mar 2021 11:51: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:cc; bh=8iepciXpSJ8v2GwCgCaK67pllzf2sXlpXp2spOy0PXU=; b=HyCCZbt7x/3Mp8Q5pzcV6Aa/6GEYYy0S3WopwLbzzbns2x2WWzUgV/1O2wS3FMOkdL /lCSb8KDFHRuDggYp+cz8mgsHZ3yRf+BI5vDdCSX6wrSzmdERmVAn8kM+nVpURLOcgeT fOVfufdF9aUY1ScpSW8PPQjU9u379tfez/D4w1xKFVe4zkoYGVayqKgvuKSQ0yx7WOoJ p3zRrmIXZHJfnUqTeXdpyepIYFR3Te9QFdhmU3vYGNDnT9Ll5Hl3v1k6/uovswz8ahQ8 7GOg349yltvoPfYmBrkmw3+ZfdBGBgpbrej59dABesijI7VUu4ZF2rVqPSewt+NKtcEg CbNQ== X-Gm-Message-State: AOAM531GzdA3/SX+0F8KYoMQZv2OZPrZCt3yVXQuZ4YM0p3i0C1knScC MzMZLkPG7EB9KJcqFwy7hK5IIYDd1snDYCcY6Vp98S6VWzY= X-Google-Smtp-Source: ABdhPJxC7+rmn4whQfYagCwiv7m00eiehVXjWNynupgKzb1vYk8LhDuw1XX0w+Nd8CRVWOXt7QL4+CsTaRSoVU8183k= X-Received: by 2002:a05:6e02:1bad:: with SMTP id n13mr842726ili.260.1614801073215; Wed, 03 Mar 2021 11:51:13 -0800 (PST) MIME-Version: 1.0 References: <9f1dbafc6d1184d9ca07bdea98f696e0ca65b9e2.camel@yandex.ru> In-Reply-To: <9f1dbafc6d1184d9ca07bdea98f696e0ca65b9e2.camel@yandex.ru> From: Peng Yu Date: Wed, 3 Mar 2021 13:51:02 -0600 Message-ID: Subject: Re: How to look up where a structure is defined? To: Konstantin Kharlamov Cc: libc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 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 19:51:15 -0000 This seems to be a complicated solution. I just want to get a database (a TSV file should be fine) of types and the header they appear. I don't want to build the project just to get this info. It seems that this database could be made and hosted online for easy download or lookup. On Wed, Mar 3, 2021 at 8:55 AM Konstantin Kharlamov wrote: > > On Wed, 2021-03-03 at 17:26 +0300, Konstantin Kharlamov wrote: > > there's `bear` utility, which takes a make command as input, and parses it > > output while it builds the project, and stores the output into > > `compile_commands.json` file. So for example: if you usually build glibc with > > `make`, then to generate the file you have to use a `bear -- make` instead. > > To clarify: if you already built the project you'll need somehow to re-build it > with bear. So, for example, you can call a `find -type f -exec touch {} \;` in > the source tree to cause timestamps of all files to get bumped, and then running > a make command will trigger a full rebuild. -- Regards, Peng