This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [AARCH64]: Pointer mangling support for Aarch64


Hi,

The mangling patch is already up streamed. So I will include this
addition as a separate patch.

I looked at x86 and powerpc ports. So for Aarch64
longjmp/longjmp_target probe expects
   *  first argument 8@address of jmpbuf in x0.
   *  second argument -4@return val in x1.
   *  third argument 8@ address of target in LR/X30.

The patch below does that.

(--snip--)
--- a/ports/sysdeps/aarch64/__longjmp.S
+++ b/ports/sysdeps/aarch64/__longjmp.S
@@ -18,6 +18,7 @@

 #include <sysdep.h>
 #include <jmpbuf-offsets.h>
+#include <stap-probe.h>

 /* __longjmp(jmpbuf, val) */

@@ -56,6 +57,7 @@ ENTRY (__longjmp)
 #else
        ldp     x29, x30, [x0, #JB_X29<<3]
 #endif
+       LIBC_PROBE (longjmp, 3, 8@x0, -4@x1, 8@x30)
        ldp      d8,  d9, [x0, #JB_D8<<3]
        ldp     d10, d11, [x0, #JB_D10<<3]
        ldp     d12, d13, [x0, #JB_D12<<3]
@@ -97,6 +99,7 @@ ENTRY (__longjmp)
 #else
        ldr     x5, [x0, #JB_SP<<3]
 #endif
+       LIBC_PROBE (longjmp_target, 3, 8@x0, -4@x1, 8@x30)
        mov     sp, x5
        cmp     x1, #0
        mov     x0, #1
(--snip--)

Please let me know if this is fine,  I will start doing the testing.

regards,
Venkat.

On 6 January 2014 23:40, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> ">" == Venkataramanan Kumar <venkataramanan.kumar@linaro.org> writes:
>
>>> This patch adds pointer mangling support for Aarch64.
>
> IIRC the Aarch64 longjmp code doesn't have the sdt.h probes in place.
> If you add pointer mangling without also adding the sdt.h probes, then
> gdb's longjmp support will break.  You should be able to see this easily
> in the gdb test suite.
>
> Adding the probes is quite easy to do, so I encourage you to add that
> to the patch.
>
> thanks,
> Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]