Bug 1948

Summary: cscope support doesn't work because no cscope.files is created
Product: Other Reporter: Thomas Glanzmann (sithglan)
Component: OtherAssignee: Sam Ravnborg (sam)
Status: CLOSED CODE_FIX    
Severity: normal    
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.1 Subsystem:
Regression: --- Bisected commit-id:
Attachments: This patch is against current bk tree and fixes the problem
cscope-fix

Description Thomas Glanzmann 2004-01-24 06:46:47 UTC
Software Environment: cscope
Problem Description:
when doing a make cscope in the top directory a cscope.out is created but no 
cscope.files But cscope isn't useable without a cscope.files

So the line in the makefile should be changed from:

cmd_cscope = $(all-sources) | cscope -k -b -i -

to:

cmd_cscope = $(all-sources) > cscope.files; cscope -k -b
Comment 1 Thomas Glanzmann 2004-01-24 06:49:23 UTC
Created attachment 1943 [details]
This patch is against current bk tree and fixes the problem

This patch fixes the problem and created the needed cscope.files
Comment 2 Sam Ravnborg 2004-01-24 11:14:00 UTC
The manpage for cscope reads:
-i namefile 
Browse through all source files whose names are listed in namefile (file names 
separated by spaces, tabs, or new-lines) instead of the default (cscope.files). 
If this option is specified, cscope ignores any files appearing on the command 
line. The argument namefile can be set to ``-'' to accept a list of files from 
stdio. Filenames in the namefile that contain whitespace have to be enclosed 
in "double quotes". Inside such quoted filenames, any double-quote and 
backslash characters have to be escaped by backslashes. 

And the linux kernel provide all the filenames on stdout.
In order to build a new database, "make cscope" must be used.

Could you please elaborate when cscope really needs the cscope.files file.

   Sam
Comment 3 Thomas Glanzmann 2004-01-24 11:36:19 UTC
This is perfectly fine for building the database. But when I try to use cscope 
By calling cscope in the kernel root directory after issuing a 'make cscope', 
cscope refuses to start because it doesn't find a cscope.files. And I found no 
way around it. And so the cscope support in the current kernel is totally 
useless on my point of view.

I already asked the Kai Germaschewski <kai.germaschewski@unh.edu> who merged the 
patch, and he wanted to fix it for ages, but I never heard of him and his last 
email bounced. I can forward my eMail traffic to you, but the whole traffic is 
in german.

To reproduce the problem type make cscope and after that try to start cscope
Comment 4 Sam Ravnborg 2004-01-25 00:38:50 UTC
Created attachment 1952 [details]
cscope-fix

Fix that has been sent to Andrew for merging
Comment 5 Thomas Glanzmann 2004-01-25 01:53:30 UTC
Code fix works for me.