[Lldb-commits] [PATCH] Initial Assembly profiler for mips64

Vince Harron vharron at google.com
Wed Feb 18 20:52:00 PST 2015


> I should start with at least simple x86 unwinder test cases that work
correctly on Mac as a step 0.

That would be incredibly helpful.  I've asked ARM/Linaro, Imagination and
Intel for help on LLDB.  Your examples in one architecture could be
templates for examples in other architectures.

If you don't have time for that, just putting together a doc of things for
them to check would be incredibly valuable.
On Feb 18, 2015 8:46 PM, "Jason Molenda" <jmolenda at apple.com> wrote:

> For what it's worth, an example of a test file for this code would be a
> driver program written in C for simplicity which calls under1() written in
> assembly, which in turn calls under2().  lldb would stop in under2(), go up
> the stack to under1() and try to print a register that was preserved.
>
> Some utterly invalid syntax for a test file would look like:
>
> int main()
>  {
>
>   under1();
>
> }
>
> .asm("
> under1:
>
>   mov r16, 1
>   call under2
>
> under2:
>
>   sd r16(sp)       # I have no idea if that is right -- save contents of
> r16 on the local stack frame
>   mov r16, 5
>   call puts          ## whatever, stop at a breakpoint here
>
> ");
>
> If lldb could select frame 1 and see that r16 has the value 1, that's a
> simple test case.
>
> But this test could only be run on a mips64 system.
>
> I want to add test cases like this for x86 but it might take some fiddling
> to get assembly that would work on all the Unix x86 systems at least
> (nevermind Windows! ;) and I've never gotten around to it.  I should start
> with at least simple x86 unwinder test cases that work correctly on Mac as
> a step 0.
>
>
> REPOSITORY
>   rL LLVM
>
> http://reviews.llvm.org/D7696
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150218/4ff3eb04/attachment.html>


More information about the lldb-commits mailing list