#27 cscope opening directories as include files


Some C++ apps #include <iostream>. There is such an include file, but also, there is a directory by that name in a -I directory, so when rebuilding the cscope database file, cscope crashes opening that directory as a flat file.

I run cscope -L in a ksh script as a <PRE> html doc producing web service, which annotates the query and db rebuilding process:

Find this global definition: 'userlog'

Rebuilding file tree . . .

Listing file tree . . .

Rebuilding DB . . .

Cannot open file /opt/aCC/include/iostream


Refresh CScope DB from Files First
Search String:
Case-Insensitive Search
Find this C symbol
Find this global definition
Find functions called by this function
Find functions calling this function
Find this text string
Find this egrep pattern
Find this file
Find files #including this file
Wrap output lines

------------------------------- command line ---------------------
cscope -f ../db_tr_x -I/appl/tuxedo/8.0.X8/include -I/appl/sybase/OCS-12_5.10192/include -I/appl/db2cnt8/sqllib/include -I/appl/informix/7.31.UD3.SDK290HC1X4/incl -I/appl/informix/7.31.UD3.SDK290HC1X4/incl/esql -I/appl/rsa/rsa5.0/cryptoc50/include -I/appl/rsa/rsa5.0/cryptoc50/samples/demo/bdemo -I/appl/rsa/rsa5.0/cryptoc50/samples/common/include -I/appl/rsa42/Bsafe42/hpux/pa_risc20/32bit/library -I/appl/iplanet/ldap/include -I/prod1/csdsit/cs_core/200708/include -I/prod1/csdsit/cs_rw_base/200708/include -I/prod1/csdsit/cs_securit/200708/include -I/prod1/csdsit/cs_access/200708/include -I/prod1/csdsit/csc_ghis/201002/include -I/prod1/csdsit/cs_perf/200708/include -I/opt/aCC/include -I/opt/aCC/include/iostream -I/opt/aCC/include/SC -I/opt/aCC/include/rw -L -1 'userlog' -i ../fl_tr_x


  • DGPickett

    It also brings the directory name up on file search, as if it was a flat file.

  • And you're sure the actual compiler can live with that same setup?

    cscope does test the directory entry it found with access(3) --- I'm not entirely sure why that should fail to detect that directories aren't readable.

    • status: open --> pending
    • status: pending --> closed
  • This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).