Re: Re: Re: about using smatch in all debian C code

李书畅 <[email protected]> Wed, 6 Mar 2024 17:47:30 +0800 (GMT+08:00)
Newsgroups org.kernel.vger.smatch
Message-ID <[email protected]>
I'm sorry Dan,  after reading smatch.txt, I still can't figure out how to run smatch over a single C file before building a database, can you show me the commands I need to enter?  It's like the following directory format:

qemu (compiled)
 -block.c
smatch (compiled)

regards,
Lishu Chang



> -----原始邮件-----
> 发件人: "Dan Carpenter" <[email protected]>
> 发送时间: 2024-03-06 14:40:12 (星期三)
> 收件人: "李书畅" <[email protected]>
> 抄送: [email protected]
> 主题: Re: Re: about using smatch in all debian C code
> 
> On Wed, Mar 06, 2024 at 02:12:45PM +0800, 李书畅 wrote:
> > I'm trying to create a database for qemu (a C project, which is in the
> > same directory as smatch) and I've tried running the following script:
> > . ./smatch/devel/smatch_data/db/create_db.sh, but it's not working,
> > what should I do?
> 
> Before you create a database, you want to get Smatch running without a
> database.  Once that works, then you can build it again, passing the
> --info option to Smatch.  That will create a text file with a bunch of
> SQL in it.  Run the create_db.sh script on the test file.
> 
> regards,
> dan carpenter