mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1642516 - In the Lul stack walker, don't subtract 1 byte from the return address, for consistency with other stackwalkers. r=gerald
This makes all our stackwalkers in Firefox consistent with respect to return addresses: For non-leaf frames in stacks, the code address now always points to the instruction *after* the call instruction, i.e. to the instruction that will be executed once the function returns. For symbolication purposes, 1 byte will need to be subtracted in order to obtain correct line number + inline stack information for the call instruction. This subtraction will be the responsibility of the Firefox profiler front-end, not of the stackwalkers. Depends on D121930 Differential Revision: https://phabricator.services.mozilla.com/D121931
This commit is contained in:
parent
3077dbd403
commit
06efd253f5
@ -1422,10 +1422,7 @@ void LUL::Unwind(/*OUT*/ uintptr_t* aFramePCs,
|
||||
}
|
||||
}
|
||||
|
||||
// For the innermost frame, the IA value is what we need. For all
|
||||
// other frames, it's actually the return address, so back up one
|
||||
// byte so as to get it into the calling instruction.
|
||||
aFramePCs[*aFramesUsed] = ia.Value() - (*aFramesUsed == 0 ? 0 : 1);
|
||||
aFramePCs[*aFramesUsed] = ia.Value();
|
||||
aFrameSPs[*aFramesUsed] = sp.Valid() ? sp.Value() : 0;
|
||||
(*aFramesUsed)++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user