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