| 1926 | } |
| 1927 | |
| 1928 | void idGameEditExt::MSG_WriteCallstackFunc(idBitMsg* msg, const prstack_t* stack, const idProgram* program, int instructionPtr) |
| 1929 | { |
| 1930 | const statement_t* st; |
| 1931 | const function_t* func; |
| 1932 | |
| 1933 | func = stack->f; |
| 1934 | |
| 1935 | // If the function is unknown then just fill in with default data. |
| 1936 | if (!func) |
| 1937 | { |
| 1938 | msg->WriteString("<UNKNOWN>"); |
| 1939 | msg->WriteString("<UNKNOWN>"); |
| 1940 | msg->WriteInt(0); |
| 1941 | return; |
| 1942 | } |
| 1943 | else |
| 1944 | { |
| 1945 | msg->WriteString(va("%s( )", func->Name())); |
| 1946 | } |
| 1947 | |
| 1948 | if (stack->s == -1) //this is a fake stack created by debugger, use intruction pointer for retrieval. |
| 1949 | st = &const_cast<idProgram*>(program)->GetStatement(instructionPtr); |
| 1950 | else // Use the calling statement as the filename and linenumber where the call was made from |
| 1951 | st = &const_cast<idProgram*>(program)->GetStatement(stack->s); |
| 1952 | |
| 1953 | if (st) |
| 1954 | { |
| 1955 | idStr qpath = const_cast<idProgram*>(program)->GetFilename(st->file); |
| 1956 | if (idStr::FindChar(qpath, ':') != -1) |
| 1957 | qpath = fileSystem->OSPathToRelativePath(qpath.c_str()); |
| 1958 | qpath.BackSlashesToSlashes(); |
| 1959 | msg->WriteString(qpath); |
| 1960 | msg->WriteInt(st->linenumber); |
| 1961 | } |
| 1962 | else |
| 1963 | { |
| 1964 | msg->WriteString("<UNKNOWN>"); |
| 1965 | msg->WriteInt(0); |
| 1966 | } |
| 1967 | } |
| 1968 | |
| 1969 | void idGameEditExt::MSG_WriteInterpreterInfo(idBitMsg* msg, const idInterpreter* interpreter, const idProgram* program, int instructionPtr) |
| 1970 | { |
nothing calls this directly
no test coverage detected