hey japheth
I have figured out the switches for different debuggers
here are:
/* codeview debug info option flags */
enum cvoption_flags {
CVO_STATICTLS = 1, /* handle static tls */
CVO_MSVC8 = 2, /* MSVC8 debugger */
CVO_MSVC10 = 4, /* MSVC10 debugger */
CVO_MSVC12 = 8, /* MSVC12 debugger */
};
so I use It like this:
option codeview:2 ;//create MSVC8 debug info
option codeview:8 ;//create MSVC12 debug info
I hvae tested it and it works fine
I still have to figure out WinDbg6.1, WinDbg6.2 and MSVC10 then I will post the code here
here is dbgcv.c code for this:
} else {
len = sizeof( struct cv_symrec_bprel32 );
cv->ps = checkflush( cv->symbols, cv->ps, 1 + lcl->sym.name_size + len );
cv->ps_br32->sr.size = sizeof( struct cv_symrec_bprel32 ) - sizeof(uint_16) + 1 + lcl->sym.name_size;
cv->ps_br32->sr.type = S_BPREL32;
if ( ModuleInfo.cv_opt & CVO_MSVC12 ){
cv->ps_br32->offset = lcl->sym.offset - sym_ReservedStack->value - proc->e.procinfo->xmmsize; // MODIFIED JOHNSA
if (proc->e.procinfo->xmmsize)cv->ps_br32->offset;
if (lcl->sym.isparam)
{
cv->ps_br32->offset +=0x10; //MODIFIED by johnsa
if (proc->e.procinfo->xmmsize)cv->ps_br32->offset += (proc->e.procinfo->xmmsize);
}
}
else if ( ModuleInfo.cv_opt & CVO_MSVC8 ){
if (lcl->sym.isparam)
{
cv->ps_br32->offset = lcl->sym.offset + sym_ReservedStack->value + proc->e.procinfo->localsize + 8;// - 0x10; //MODIFIED by johnsa
if (proc->e.procinfo->xmmsize)cv->ps_br32->offset += proc->e.procinfo->xmmsize + 8;
}
else{
cv->ps_br32->offset = lcl->sym.offset + sym_ReservedStack->value + 16; // MODIFIED JOHNSA
if (proc->e.procinfo->xmmsize)cv->ps_br32->offset += proc->e.procinfo->xmmsize - 16;
}
}
else {
cv->ps_br32->offset = lcl->sym.offset;
}
cv->ps_br32->type = lcl->sym.ext_idx1;
DebugMsg(( "cv_write_symbol(%X): proc=%s, S_BPREL32, var=%s [memt=%X typeref=%X]\n",
GetPos(cv->symbols,cv->ps), proc->sym.name, lcl->sym.name, lcl->sym.mem_type, cv->ps_br32->type ));
}