0

I'm issuing Cscope command using cmd in Winform.Sometimes it return successfully and some times gives(Most of the times) cygwin_exception::open_stackdumpfile: Dumping stack trace to cscope.exe.stackdump

I'm not able to identify the issue. Code of C# which turns into command is below:

Code :

CalledFunctionsNameCmdArgument = "/C cscope -k -u "+ FileNameAlongWIthDirectoryPath(in Windows Style i.e. G:\ABC\DEF.c) + " -L -3 " + @""".*""" + " | gawk '{$1=" + "\"" + "\"" + "; $3=" + "\"" + "\"" + ";sub(" + "\"" + " \"" + ", " + "\"" + "\"" + ");" + "sub(" + "\"" + " \"" + ", " + "\"" + "#" + "\"" + ");" + "print}' > " + OutputDirectory(In linux Style i.e. G:/ABC/DEF)

Output of Code Line mentioned above is:

/C cscope -k -u FileNameAlongWIthDirectoryPath -L -3 ".*" | gawk '{$1=""; $3="";sub(" ", "");sub(" ", "#");print}' > OutputDirectory

What can be the issue?

Stack Trace Dump

Exception: STATUS_ACCESS_VIOLATION at rip=0010040DCE8    
rax=0000000000000035 rbx=0000000000000001 rcx=0000000000000001    
rdx=0000000600055CE0 rsi=0000000600055CE0 rdi=0000000000000001    
r8 =00000000FFFFB7BC r9 =00000001801523A0 r10=0000000100000000    
r11=000000010040DF72 r12=00000000FFFFBE00 r13=00000001004DCDA8    
r14=0000000000000000 r15=00000001004DC880    
rbp=0000000000000000 rsp=00000000FFFFBA60    
program=G:\Cygwin\usr\local\bin\cscope.exe, pid 64364, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B    
Stack trace:    
Frame        Function    Args    
00000000000  0010040DCE8 (0060007A3CA, 0000000000A, 00180042D46, 000FFFFBFE0)    
000FFFFBB00  0010040EF1B (00100430038, 000FFFFCC70, 00000000006, 000FFFFCC70)    
00100430038  0010040C676 (001000001C0, 000FFFFC8F0, 001004DCEE0, 0000000FB6C)    
00100430038  0010042F7AA (00180276D60, 006000283A0, 00000000000, 000FFFFCCC0)    
000FFFFCCC0  00180047BD2 (00000000000, 00000000000, 00000000000, 00000000000)    
00000000000  0018004591C (00000000000, 00000000000, 00000000000, 00000000000)    
000FFFFFFF0  001800459B4 (00000000000, 00000000000, 00000000000, 00000000000)    
End of stack trace    
Naeem Khan
  • 31
  • 7
  • Without looking at cscope.exe.stackdump content is hard to say. Does the same problem happen in cygwin for the same data ? – matzeri Jul 03 '16 at 06:03
  • No when I run the same command in even in CMD ,I do not get any such error. – Naeem Khan Jul 03 '16 at 08:18
  • I have added the content to the question. – Naeem Khan Jul 03 '16 at 08:28
  • There is one more thing that i noticed.Visual studio is installed in C:\ directory and i run my code form there. But when i was issuing command on CMD,I was in the directory where my files resides i.e. G:\.NOw i issued the command when i was in C:\ on CMD and the same exception occurred. Now I think issue is of accessing the file.But how should i solve this problem? – Naeem Khan Jul 03 '16 at 08:43
  • No.If i issue the command in Cygwin terminal,I do not get such issues. – Naeem Khan Jul 03 '16 at 11:06
  • Though I solved it by placing files in the bin directory of winform project.But i still get errors when files are outside of Project Folder. – Naeem Khan Jul 03 '16 at 15:12
  • If cscope is a cygwin one, use POSIX style for input and ouput with proper escape. PS: cscope is available in as cygwin package. – matzeri Jul 04 '16 at 05:07
  • I guess problem is not of POSIX style.I run the same command for different files in the same directory one by one and it gives error for only few.Problem is related to Permission of files but i am not able to solve it. – Naeem Khan Jul 04 '16 at 09:13

1 Answers1

0

Though I could not find the exact cause of the problem but i guess it was of File permission.I needed to edit the file (Result of another command "unifdef") and saved the result in another file,then providing those resultant files to the cscope did not create problem.Saving file after applying unifdef command , somehow changed the file permissions(I guess not because of unifdef but saving the file through Command Prompt changed the Permissions of files ).

Naeem Khan
  • 31
  • 7