Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Problems debugging with Visual C++
Re: Problems debugging with Visual C++ [message #43657 is a reply to message #43650] Thu, 18 September 2014 08:48 Go to previous messageGo to previous message
frankdeprins is currently offline  frankdeprins
Messages: 99
Registered: September 2008
Location: Antwerp - Belgium
Member
Hello Mirek,

The extra logging lines added the next content to theide.log:
pSym->Flags & IMAGEHLP_SYMBOL_INFO_REGRELATIVE = 16
pSym->Register == CV_ALLREG_VFRAME = false
pSym->Register = 22

These log lines occurred several times, of course, but always with exactly the same values.
After that, I changed if(pSym->Register == CV_ALLREG_VFRAME) to: if(true)
But even then, the result was that I only got i and i64 and both watches were still 0.
I guess commenting out the register test will not change it, as we already know the else block is executed because of the presence of the new logging lines put in it.
Anyway, this is the final state of the code as I ran it:
BOOL CALLBACK Pdb::EnumLocals(PSYMBOL_INFO pSym, ULONG SymbolSize, PVOID UserContext)
{
   LocalsCtx& c = *(LocalsCtx *)UserContext;

   if(pSym->Tag == SymTagFunction)
      return TRUE;

   Val& v = (pSym->Flags & IMAGEHLP_SYMBOL_INFO_PARAMETER ? c.param : c.local).GetAdd(pSym->Name);
   v.address = (adr_t)pSym->Address;
RLOG("-------------------------");
RDUMP(Format64Hex(v.address));
   if(pSym->Flags & IMAGEHLP_SYMBOL_INFO_REGISTER)
      v.address = pSym->Register;
   else {
      RDUMP(pSym->Flags & IMAGEHLP_SYMBOL_INFO_REGRELATIVE);
      RDUMP(pSym->Register == CV_ALLREG_VFRAME);
      RDUMP(pSym->Register);
      if(pSym->Flags & IMAGEHLP_SYMBOL_INFO_REGRELATIVE) {
         if(true/*pSym->Register == CV_ALLREG_VFRAME*/) {
         #ifdef CPU_64
            if(c.pdb->win64)
               v.address += c.pdb->GetCpuRegister(*c.context, CV_AMD64_RBP);
            else
         #endif
               v.address += (adr_t)c.pdb->GetCpuRegister(*c.context, CV_REG_EBP);
         }
         else
            v.address += (adr_t)c.pdb->GetCpuRegister(*c.context, pSym->Register);
         RDUMP(v.address);
      }
   }
   if(pSym->Flags & IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE) {
                RDUMP(Format64Hex(c.frame));
      v.address += c.frame;
        }
   c.pdb->TypeVal(v, pSym->TypeIndex, (adr_t)pSym->ModBase);
   RLOG("LOCAL " << pSym->Name << ": " << Format64Hex(v.address));
   return TRUE;
}

Attached, you find the log file.

Frank
  • Attachment: theide.log
    (Size: 1.96KB, Downloaded 252 times)

[Updated on: Thu, 18 September 2014 08:48]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Debugger support for enum values would be nice
Next Topic: Need help compiling UPP tarball on Linux Mint 17 Qiana
Goto Forum:
  


Current Time: Sun May 05 11:26:27 CEST 2024

Total time taken to generate the page: 0.02819 seconds