| 1923 | } |
| 1924 | |
| 1925 | void PipeInit() |
| 1926 | { |
| 1927 | using namespace RemoteData; |
| 1928 | |
| 1929 | // Start by retrieving source and module information |
| 1930 | moduleCount = PipeReuqestData(DEBUG_MODULE_INFO, (void**)&modules); |
| 1931 | PipeReuqestData(DEBUG_MODULE_NAMES, (void**)&moduleNames); |
| 1932 | char *moduleNamesTmp = moduleNames; |
| 1933 | PipeReuqestData(DEBUG_SOURCE_INFO, (void**)&sourceCode); |
| 1934 | infoSize = PipeReuqestData(DEBUG_CODE_INFO, (void**)&codeInfo); |
| 1935 | |
| 1936 | typeCount = PipeReuqestData(DEBUG_TYPE_INFO, (void**)&types); |
| 1937 | funcCount = PipeReuqestData(DEBUG_FUNCTION_INFO, (void**)&functions); |
| 1938 | varCount = PipeReuqestData(DEBUG_VARIABLE_INFO, (void**)&vars); |
| 1939 | localCount = PipeReuqestData(DEBUG_LOCAL_INFO, (void**)&locals); |
| 1940 | PipeReuqestData(DEBUG_TYPE_EXTRA_INFO, (void**)&typeExtra); |
| 1941 | PipeReuqestData(DEBUG_SYMBOL_INFO, (void**)&symbols); |
| 1942 | |
| 1943 | if(!modules || !moduleNames || !sourceCode || !codeInfo || !types || !functions || !vars || !locals || !typeExtra || !symbols) |
| 1944 | return; |
| 1945 | |
| 1946 | char message[1024], *pos = message; |
| 1947 | message[0] = 0; |
| 1948 | |
| 1949 | for(unsigned int i = 0; i < attachedEdits.size(); i++) |
| 1950 | DestroyWindow(attachedEdits[i]); |
| 1951 | attachedEdits.clear(); |
| 1952 | for(unsigned int i = 0; i < moduleCount; i++) |
| 1953 | { |
| 1954 | modules[i].name = moduleNamesTmp; |
| 1955 | moduleNamesTmp += strlen(moduleNamesTmp) + 1; |
| 1956 | pos += safeprintf(pos, 1024 - (pos - message), "Received information about module '%s'\r\n", modules[i].name); |
| 1957 | |
| 1958 | attachedEdits.push_back(CreateWindow("NULLCTEXT", NULL, WS_VISIBLE | WS_CHILD | WS_BORDER, 5, 25, areaWidth, areaHeight, hWnd, NULL, hInst, NULL)); |
| 1959 | TabbedFiles::AddTab(hAttachTabs, modules[i].name, attachedEdits.back()); |
| 1960 | RichTextarea::SetAreaText(attachedEdits.back(), sourceCode + modules[i].sourceOffset); |
| 1961 | UpdateWindow(attachedEdits.back()); |
| 1962 | } |
| 1963 | attachedEdits.push_back(CreateWindow("NULLCTEXT", NULL, WS_VISIBLE | WS_CHILD | WS_BORDER, 5, 25, areaWidth, areaHeight, hWnd, NULL, hInst, NULL)); |
| 1964 | TabbedFiles::AddTab(hAttachTabs, "__last.nc", attachedEdits.back()); |
| 1965 | RichTextarea::SetAreaText(attachedEdits.back(), sourceCode + modules[moduleCount-1].sourceOffset + modules[moduleCount-1].sourceSize); |
| 1966 | UpdateWindow(attachedEdits.back()); |
| 1967 | |
| 1968 | SetWindowText(hCode, message); |
| 1969 | TabbedFiles::SetCurrentTab(hDebugTabs, 0); |
| 1970 | |
| 1971 | TabbedFiles::SetCurrentTab(hAttachTabs, moduleCount); |
| 1972 | ShowWindow(attachedEdits.back(), SW_SHOW); |
| 1973 | |
| 1974 | pipeThread = CreateThread(NULL, 1024*1024, PipeThread, NULL, NULL, 0); |
| 1975 | } |
| 1976 | |
| 1977 | void ContinueAfterBreak() |
| 1978 | { |
no test coverage detected