From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [IPv6:2a02:6b8:0:801:2::107]) by sourceware.org (Postfix) with ESMTPS id 2F8B23846070 for ; Wed, 3 Mar 2021 14:55:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2F8B23846070 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hi-angel@yandex.ru Received: from sas1-1650ac5d911d.qloud-c.yandex.net (sas1-1650ac5d911d.qloud-c.yandex.net [IPv6:2a02:6b8:c08:d927:0:640:1650:ac5d]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 55BA44A1077; Wed, 3 Mar 2021 17:55:31 +0300 (MSK) Received: from sas8-b61c542d7279.qloud-c.yandex.net (sas8-b61c542d7279.qloud-c.yandex.net [2a02:6b8:c1b:2912:0:640:b61c:542d]) by sas1-1650ac5d911d.qloud-c.yandex.net (mxback/Yandex) with ESMTP id 3GI5j7sRla-tVI0Gv1b; Wed, 03 Mar 2021 17:55:31 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1614783331; bh=J9UvC4gKmCKROjlG26bxgZcTQ/eH+t0jQEYMAk0tXGQ=; h=In-Reply-To:To:From:Subject:Message-ID:References:Date; b=BMWnJ8i+8X806WS2Z9hgLqvuGhNqbOtVfVP7a/uQm7jLh4ANMjDh6K+PQHbvpxDCa G9JOCc6NF2fwH7Pmw2onUoTsW2u/9B1Fhy5JepzS95EfgJPTHI+PIalh1eCYKAagrc QXS/ZFiSX9kqSNdkefe7Xy8x4sQKetJkae443oO0= Authentication-Results: sas1-1650ac5d911d.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: by sas8-b61c542d7279.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id CL4ZCfA1zQ-tUnWHloW; Wed, 03 Mar 2021 17:55:30 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Message-ID: <9f1dbafc6d1184d9ca07bdea98f696e0ca65b9e2.camel@yandex.ru> Subject: Re: How to look up where a structure is defined? From: Konstantin Kharlamov To: Peng Yu , libc-help@sourceware.org Date: Wed, 03 Mar 2021 17:55:29 +0300 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, 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 14:55:35 -0000 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.