It is currently Wed, 20 Jan 2021 17:22:15 GMT



 
Author Message
 cscope does not read cscope.out
The cscope that comes with Sun compilers does not read cscope.out at
all even with the -d option if the directory containing cscope.out is
not writable. Kinda stupid dont you think, especially when you realize
that permissions on cscope.out are not checked at all. Is there any
way to get around this restriction than make the directory world
writable? One workaround I got was to make a soft link to the real
cscope.out in my home directory but I'd like to hear it if there are
better ways or hacks.

Khan



 Tue, 26 Sep 2006 01:24:54 GMT   
 cscope does not read cscope.out
Can you grab a truss of the command that actually shows what is going on
and where it is failing?

alan.



 Tue, 26 Sep 2006 07:54:12 GMT   
 cscope does not read cscope.out
Alan Hargreaves <Alan.Hargrea...@Sun.COM> wrote

Jeez the problem is simple enough as it is, surely you can test if for
yourself. What do you mean by truss anyway? You are surely not
thinking I have a debug cscope exec do you? cscope exits with a
message to stderr which comes from main, if that is in any way
helpful.

Khan



 Sun, 01 Oct 2006 00:12:00 GMT   
 cscope does not read cscope.out

The problem may be specific to an aspect of your configuration. You
should provide as much information as you can so that the problem you
are experiencing can be accurately reproduced.

truss(1) traces the system calls made by process. It has nothing to do
with symbolic debugging.

--
Wishing you good fortune,
--Robin Kay-- (komadori)



 Sun, 01 Oct 2006 00:26:50 GMT   
 cscope does not read cscope.out

OK, I've gotten the trusses myself and logged a bug (5031319). For those
that are interested, the differences that I was looking for in the
trusses were:

No write permission on currrent dir:

28843/1@1:       0.1287 -> main(0x2, 0xffbfe7a4, 0xffbfe7b0, 0x35000)
28843/1@1:       0.1291   -> mygetenv(0x37308, 0x37310, 0x0, 0x64)
28843/1@1:       0.1297   <- mygetenv() = 0xffbff1f5
28843/1@1:       0.1301   -> mygetenv(0x37314, 0xffbff1f5, 0x0, 0x2f)
28843/1@1:       0.1305   <- mygetenv() = 0xffbff1f5
28843/1@1:       0.1314   -> mygetenv(0x37324, 0x3732c, 0xffbff4ed, 0x0)
28843/1@1:       0.1319   <- mygetenv() = 0xffbff34d
28843/1@1:       0.1323   -> mygetenv(0x37330, 0x37338, 0xffbff4ed, 0x2f)
28843/1@1:       0.1328   <- mygetenv() = 0x37338
28843/1:         0.1331 access(".", W_OK)
Err#13 EACCES [file_dac_write]
...
28843/1:         0.1430 open("/home/ah89892/cscope.out", O_RDONLY)      = 3

If we add write permission we see

28851/1@1:       0.1310 -> main(0x2, 0xffbfe7a4, 0xffbfe7b0, 0x35000)
28851/1@1:       0.1315   -> mygetenv(0x37308, 0x37310, 0x0, 0x64)
28851/1@1:       0.1321   <- mygetenv() = 0xffbff1f5
28851/1@1:       0.1324   -> mygetenv(0x37314, 0xffbff1f5, 0x0, 0x2f)
28851/1@1:       0.1329   <- mygetenv() = 0xffbff1f5
28851/1@1:       0.1333   -> mygetenv(0x37324, 0x3732c, 0xffbff4ed, 0x0)
28851/1@1:       0.1338   <- mygetenv() = 0xffbff34d
28851/1@1:       0.1341   -> mygetenv(0x37330, 0x37338, 0xffbff4ed, 0x2f)
28851/1@1:       0.1346   <- mygetenv() = 0x37338
28851/1:         0.1350 access(".", W_OK)                               = 0
...
28851/1:         0.1431 open("cscope.out", O_RDONLY)                    = 3

These show that the actual test is done up near the top of main() and it
does indeed exhibit the described behaviour. The abopve information has
been added to the bug and will assist those who have the task of
addressing it.

If you are doing development work, I can certainly recommend truss to
you as a tool for seeing exactly what the application is doing in the
leadup to an error condition. Further, I can recommend dtrace under
Solaris 10 (available as a download as Solaris Express) as giving you
this type of information and much more to be able to more easily find
where bottlenecks exist.

The command I used for the above was

$ truss -o /tmp/cscope.truss -faeld -ua.out cscope -d

alan.
--
Alan Hargreaves
Senior Technical Support Specialist/VOSJEC Engineer
Product Technical Support (APAC)
Sun Microsystems



 Sun, 01 Oct 2006 11:55:02 GMT   
 cscope does not read cscope.out
<Alan.Hargrea...@Sun.COM> wrote

Thanks for all the help. Didnt know truss existed, thanks for the
info, and sorry for dashing off that earlier post like a moron.
Khan



 Sun, 08 Oct 2006 08:04:36 GMT   
 
   [ 6 post ] 

Similar Threads

1. cscope not seeing my functinos

2. Cscope for Solaris 10 on intel

3. Problem with "cscope -f"

4. cscope 15.5

5. cscope 15.1 compile error on Solaris 7

6. CSCOPE for Solaris???

7. Where to find cscope for Solaris7 sparc platform

8. where do I get fast cscope?

9. cscope from ATT toolchest

10. Use of cscope (.files)?


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software