@@ -125,7 +125,8 @@ void DebugContext::Start(shared_ptr<WaitQueue<string>>& sink)
125
125
126
126
StackPreparator stackPrep;
127
127
// Put the transition vector to DebugLib_GetExportedFunctions on the top of the stack
128
- // so the debugger can find it
128
+ // so the debugger can find it. This is done with a linear search because we need the
129
+ // index of the resolver.
129
130
uint32_t index = 0 ;
130
131
for (auto iter = fragmentManager.begin (); iter != fragmentManager.end (); iter++)
131
132
{
@@ -167,7 +168,7 @@ void DebugContext::Start(shared_ptr<WaitQueue<string>>& sink)
167
168
168
169
assert (mainSymbol.Universe != SymbolUniverse::LostInTimeAndSpace);
169
170
170
- // Start (but don't run) the main thread. We create it because once a thread is created, the DebugThreadManager
171
+ // Create (but don't run) the main thread. We create it because once a thread is created, the DebugThreadManager
171
172
// will stop its main loop if it reaches 0 threads again.
172
173
const PEF::TransitionVector* vector = allocator->ToPointer <PEF::TransitionVector>(mainSymbol.Address );
173
174
auto & thread = threads.StartThread (stackPrep, StackPreparator::DefaultStackSize, *vector, false );
@@ -389,7 +390,7 @@ uint8_t DebugStub::WriteMemory(const string& commandString, string& output)
389
390
uint32_t address;
390
391
size_t size;
391
392
int charsRead;
392
- if (sscanf (commandString.c_str (), " M%x,%zd :%n" , &address, &size, &charsRead) == 2 )
393
+ if (sscanf (commandString.c_str (), " M%x,%zx :%n" , &address, &size, &charsRead) == 2 )
393
394
{
394
395
uint8_t * memory = context->allocator ->ToPointer <uint8_t >(address);
395
396
auto details = context->allocator ->GetDetails (memory);
@@ -737,7 +738,7 @@ uint8_t DebugStub::QueryRegisterInformation(const string &commandString, string
737
738
output = StringPrintf (" name:%s;bitsize:%u;offset:%lu;encoding:%s;format:%s;set:%s;" , regName, bitSize, offset, encoding, format, set);
738
739
if (regNumber == 1 )
739
740
{
740
- output += " alt-name:sp;generic:fp ;" ;
741
+ output += " alt-name:sp;generic:sp ;" ;
741
742
}
742
743
else if (regNumber == 2 )
743
744
{
0 commit comments