[PATCH] D42582: [lldb][PPC64] Fixed step-in stopping in the wrong line

Leandro Lupori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 08:24:09 PST 2018


luporl added a comment.

In https://reviews.llvm.org/D42582#1018105, @jingham wrote:

> GetBytesToSkip strikes me as an odd function.  It takes a thread but implicitly acts on the PC of frame 0 of that thread.  That makes it feel overly specific and requires a process when you don't really need one to do the calculation.   Plus you already have the pc & symbol but you end up re-looking them up.   You could do all the calculations you do in GetBytesToSkip if you passed in the symbol and the pc as an Address.  That would allow you to get the file address for the PC, and you can compare that directly to the symbol's address.
>
> You can get an Address from a load address (which curr_addr is) by calling target->GetSectionLoadList()->ResolveLoadAddress(curr_addr, ReturnedAddress).  Then you can use the file address from the ReturnedAddress to compare against the FileAddress of the symbol.
>
> The way you are using these is fine, BTW.  I'm just quibbling about the interface of GetBytesToSkip.


Ok, I agree that this will really make a better and easier to understand interface.
I'll make the changes, test it and then upload the new diff.


https://reviews.llvm.org/D42582





More information about the llvm-commits mailing list