IPA: Add alloc_jump_pad_buffer target hook.
[deliverable/binutils-gdb.git] / gdb / gdbserver / linux-i386-ipa.c
index 7159eeed3967076d052aee1db9a53fd1cf23049a..45e5a0d5f84a83acebe558e11e56d0021fdd208e 100644 (file)
@@ -269,6 +269,21 @@ get_ipa_tdesc (int idx)
     }
 }
 
+/* Allocate buffer for the jump pads.  On i386, we can reach an arbitrary
+   address with a jump instruction, so just allocate normally.  */
+
+void *
+alloc_jump_pad_buffer (size_t size)
+{
+  void *res = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
+                   MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+
+  if (res == MAP_FAILED)
+    return NULL;
+
+  return res;
+}
+
 void
 initialize_low_tracepoint (void)
 {
This page took 0.026847 seconds and 4 git commands to generate.