locals.localsName = new NewArrayHolder<char>[locals.size];
locals.localsScope = new LocalsInfo::Scope [locals.size];
- for (ULONG32 i = 0; i < locals.size; i++)
+ for (int i = 0; i < locals.size; i++)
{
size_t sizeRequired = WideCharToMultiByte(CP_UTF8, 0, methodDebugInfo.locals[i].name, -1, NULL, 0, NULL, NULL);
locals.localsName[i] = new char[sizeRequired];
s.source = map[j].source;
s.lineNumber = 0;
- for (ULONG32 i = 0; i < methodDebugInfo.size; i++)
+ for (int i = 0; i < methodDebugInfo.size; i++)
{
const SequencePointInfo& sp = methodDebugInfo.points[i];
- if (methodDebugInfo.points[i].ilOffset == map[j].ilOffset)
+ if ((ULONG)(methodDebugInfo.points[i].ilOffset) == map[j].ilOffset)
{
s.fileIndex = 0;
int len = WideCharToMultiByte(CP_UTF8, 0, sp.fileName, -1, s.fileName, sizeof(s.fileName), NULL, NULL);
bool inBlock = false;
- for (int i = 0; i < nlines; ++i)
+ for (unsigned i = 0; i < nlines; ++i)
{
TADDR nativeOffset = lines[i].nativeOffset + pCode;
TADDR startOffset;
TADDR endOffset;
- if (!GetBlockInNativeCode(ilOffset, ilLen, &startOffset, &endOffset))
- return;
-
- if (ptr != nullptr)
+ if (GetBlockInNativeCode(ilOffset, ilLen, &startOffset, &endOffset))
{
- DebugInfoTryCatchSub subEntry;
+ if (ptr != nullptr)
+ {
+ DebugInfoTryCatchSub subEntry;
- subEntry.m_sub_abbrev = abbrev;
- subEntry.m_sub_low_pc = md->GetNativeCode() + startOffset;
- subEntry.m_sub_high_pc = endOffset - startOffset;
+ subEntry.m_sub_abbrev = abbrev;
+ subEntry.m_sub_low_pc = md->GetNativeCode() + startOffset;
+ subEntry.m_sub_high_pc = endOffset - startOffset;
+
+ memcpy(ptr + offset, &subEntry, sizeof(DebugInfoTryCatchSub));
+ }
- memcpy(ptr + offset, &subEntry, sizeof(DebugInfoTryCatchSub));
+ offset += sizeof(DebugInfoTryCatchSub);
}
- offset += sizeof(DebugInfoTryCatchSub);
}
void FunctionMember::DumpTryCatchDebugInfo(char* ptr, int& offset)
{
DebugInfoInheritance buf;
buf.m_abbrev = 18;
- if (RefTypeInfo *m_p = dynamic_cast<RefTypeInfo*>(m_parent))
+ if (RefTypeInfo *m_p = (RefTypeInfo*)(m_parent))
buf.m_type = m_p->m_value_type->m_type_offset;
else
buf.m_type = m_parent->m_type_offset;
unsigned totalSize = 0;
// Compute buffer size
- for (unsigned i = 0; i < m_dirs_count; ++i)
+ for (int i = 0; i < m_dirs_count; ++i)
totalSize += strlen(m_dirs[i]) + 1;
totalSize += 1;
char cnv_buf[16];
- for (unsigned i = 0; i < m_files_count; ++i)
+ for (int i = 0; i < m_files_count; ++i)
{
int len = Leb128Encode(static_cast<uint32_t>(m_files[i].dir), cnv_buf, sizeof(cnv_buf));
totalSize += strlen(m_files[i].name) + 1 + len + 2;
char *ptr = buf.MemPtr;
- for (unsigned i = 0; i < m_dirs_count; ++i)
+ for (int i = 0; i < m_dirs_count; ++i)
{
strcpy(ptr, m_dirs[i]);
ptr += strlen(m_dirs[i]) + 1;
// final zero byte for directory table
*ptr++ = 0;
- for (unsigned i = 0; i < m_files_count; ++i)
+ for (int i = 0; i < m_files_count; ++i)
{
strcpy(ptr, m_files[i].name);
ptr += strlen(m_files[i].name) + 1;
{
// Fix EPILOGUE line mapping
int prevLine = 0;
- for (int i = 0; i < nlines; ++i)
+ for (unsigned i = 0; i < nlines; ++i)
{
if (lines[i].lineNumber == HiddenLine)
continue;
prevLine = lines[i].lineNumber;
}
// Skip HiddenLines
- for (int i = 0; i < nlines; ++i)
+ for (unsigned i = 0; i < nlines; ++i)
{
if (lines[i].lineNumber == HiddenLine)
{
lines[i].lineNumber = 0;
- if (i + 1 < nlines && lines[i + 1].ilOffset == ICorDebugInfo::NO_MAPPING)
+ if ((unsigned)(i + 1) < nlines && lines[i + 1].ilOffset == ICorDebugInfo::NO_MAPPING)
lines[i + 1].lineNumber = 0;
}
}
int prevLine = 1, prevFile = 0;
- for (int i = 0; i < nlines; ++i)
+ for (unsigned i = 0; i < nlines; ++i)
{
/* different source file */
if (lines[i].fileIndex != prevFile)
int lastAddr = nlines > 0 ? lines[nlines - 1].nativeOffset : 0;
// Advance PC to the end of function
- if (lastAddr < codeSize) {
+ if ((TADDR)lastAddr < codeSize) {
int len = Leb128Encode(static_cast<uint32_t>(codeSize - lastAddr), cnv_buf, sizeof(cnv_buf));
IssueParamCommand(ptr, DW_LNS_advance_pc, cnv_buf, len);
}