#2428: broken compile again
----------------------------------------+---------------------------
        Reporter:  ant...@…             |        Type:  bug
          Status:  new                  |    Priority:  normal
       Milestone:  unspecified          |   Component:  Build system
         Version:  git/qt-trunk         |    Keywords:
Operating System:  Windows Vista 64bit  |  Blocked By:
        Blocking:                       |
----------------------------------------+---------------------------
 dudes, it don't compile again.
 the project file needs to change glee.cpp to glee.c and there is no
 LPTCSTR did you dudes mean LPCTSTR?  that works
 {{{
 static
 BOOL ImagehlpGetLineFromAddr(HANDLE hProcess, DWORD dwAddress,  LPTSTR
 lpFileName, DWORD nSize, LPDWORD lpLineNumber)
 {
         IMAGEHLP_LINE Line;
         DWORD dwDisplacement = 0;  // Displacement of the input address,
 relative to the start of the symbol

         // Do the source and line lookup.
         memset(&Line, 0, sizeof(IMAGEHLP_LINE));
         Line.SizeOfStruct = sizeof(IMAGEHLP_LINE);

         assert(bSymInitialized);

 #if 1
         {
                 // The problem is that the symbol engine only finds those
 source
                 //  line addresses (after the first lookup) that fall
 exactly on
                 //  a zero displacement.  I will walk backwards 100 bytes
 to
                 //  find the line and return the proper displacement.
                 DWORD dwTempDisp = 0 ;
                 while (dwTempDisp < 100 && !j_SymGetLineFromAddr(hProcess,
 dwAddress - dwTempDisp, &dwDisplacement, &Line))
                         ++dwTempDisp;

                 if(dwTempDisp >= 100)
                         return FALSE;

                 // It was found and the source line information is correct
 so
                 //  change the displacement if it was looked up multiple
 times.
                 if (dwTempDisp < 100 && dwTempDisp != 0 )
                         dwDisplacement = dwTempDisp;
         }
 #else
         if(!j_SymGetLineFromAddr(hProcess, dwAddress, &dwDisplacement,
 &Line))
                 return FALSE;
 #endif

         assert(lpFileName && lpLineNumber);

         lstrcpyn(lpFileName, (LPCTSTR)Line.FileName, nSize);
         *lpLineNumber = Line.LineNumber;

         return TRUE;
 }
 }}}

-- 
Ticket URL: <http://developer.wz2100.net/ticket/2428>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to