我在Winform中使用cmd发出Cscope命令。有时它会成功返回并且有时会给出(大多数时候)cygwin_exception :: open_stackdumpfile:将堆栈跟踪转储到cscope.exe.stackdump
我无法确定问题。变成命令的C#代码如下:
代码:
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)
上述代码行的输出是:
/C cscope -k -u FileNameAlongWIthDirectoryPath -L -3 ".*" | gawk '{$1=""; $3="";sub(" ", "");sub(" ", "#");print}' > OutputDirectory
可能是什么问题?
堆栈跟踪转储
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
答案 0 :(得分:0)
虽然我找不到问题的确切原因,但我猜它是文件权限。我需要编辑文件(另一个命令“unifdef”的结果)并将结果保存到另一个文件中,然后提供结果文件到cscope没有创建问题。应用unifdef命令后的文件。以某种方式改变了文件权限(我猜不是因为unifdef而是通过命令提示符保存文件改变了文件的权限)。