Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Problems debugging with Visual C++
Re: Problems debugging with Visual C++ [message #43661 is a reply to message #43660] |
Thu, 18 September 2014 12:55 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
Interesting. May I ask for more logs?
uint64 Pdb::GetCpuRegister(const Context& ctx, int sym)
{
int q = GetRegisterList().Find(sym);
RLOG("== GetCpuRegister =========");
RDUMP(sym);
RDUMP(q);
if(q < 0)
return 0;
const CpuRegister& r = GetRegisterList()[q];
RDUMP(r.name);
RDUMP(r.kind);
RDUMP(r.sym);
#ifdef CPU_64
uint64 val = win64 ? GetRegister64(ctx, sym) : GetRegister32(ctx, sym);
#else
uint64 val = GetRegister32(ctx, sym);
#endif
RDUMP(Format64Hex(val));
switch(r.kind) {
case REG_L:
return LOBYTE(val);
case REG_H:
return HIBYTE(val);
case REG_X:
return LOWORD(val);
case REG_E:
return LODWORD(val);
}
return val;
}
BOOL CALLBACK Pdb::EnumLocals(PSYMBOL_INFO pSym, ULONG SymbolSize, PVOID UserContext)
{
LocalsCtx& c = *(LocalsCtx *)UserContext;
if(pSym->Tag == SymTagFunction)
return TRUE;
RLOG("=== EnumLocals ========");
RDUMP(UserContext);
RDUMP(c.context);
RDUMP(pSym->Register);
Val& v = (pSym->Flags & IMAGEHLP_SYMBOL_INFO_PARAMETER ? c.param : c.local).GetAdd(pSym->Name);
v.address = (adr_t)pSym->Address;
if(pSym->Flags & IMAGEHLP_SYMBOL_INFO_REGISTER)
v.address = pSym->Register;
else
if(pSym->Flags & IMAGEHLP_SYMBOL_INFO_REGRELATIVE) {
if(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);
}
else
if(pSym->Flags & IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE)
v.address += c.frame;
c.pdb->TypeVal(v, pSym->TypeIndex, (adr_t)pSym->ModBase);
LLOG("LOCAL " << pSym->Name << ": " << Format64Hex(v.address));
return TRUE;
}
Thanks a lot, I feel we are really very close now.
Mirek
[Updated on: Thu, 18 September 2014 12:56] Report message to a moderator
|
|
|
|
|
Problems debugging with Visual C++
|
|
|
Re: Problems debugging with Visual C++
By: mirek on Tue, 16 September 2014 14:12
|
|
|
Re: Problems debugging with Visual C++
|
|
|
Re: Problems debugging with Visual C++
|
|
|
Re: Problems debugging with Visual C++
By: mirek on Wed, 17 September 2014 15:36
|
|
|
Re: Problems debugging with Visual C++
By: mirek on Wed, 17 September 2014 15:41
|
|
|
Re: Problems debugging with Visual C++
|
|
|
Re: Problems debugging with Visual C++
By: mirek on Wed, 17 September 2014 19:53
|
|
|
Re: Problems debugging with Visual C++
By: mirek on Wed, 17 September 2014 19:56
|
|
|
Re: Problems debugging with Visual C++
|
|
|
Re: Problems debugging with Visual C++
By: mirek on Thu, 18 September 2014 10:51
|
|
|
Re: Problems debugging with Visual C++
By: mirek on Thu, 18 September 2014 11:02
|
|
|
Re: Problems debugging with Visual C++
|
|
|
Re: Problems debugging with Visual C++
By: mirek on Thu, 18 September 2014 12:55
|
|
|
Re: Problems debugging with Visual C++
By: mirek on Thu, 18 September 2014 13:06
|
|
|
Re: Problems debugging with Visual C++
|
|
|
Re: Problems debugging with Visual C++
|
|
|
Re: Problems debugging with Visual C++
By: mirek on Thu, 18 September 2014 13:53
|
|
|
Re: Problems debugging with Visual C++
|
|
|
Re: Problems debugging with Visual C++
By: mirek on Thu, 18 September 2014 23:20
|
|
|
Re: Problems debugging with Visual C++
By: cbpporter on Fri, 19 September 2014 11:38
|
Goto Forum:
Current Time: Sun May 05 10:49:51 CEST 2024
Total time taken to generate the page: 0.01846 seconds
|