if (likely(sups->tfi != tfi)) continue;
/* skip probes with an address beyond this map event; should not
happen unless a shlib/exec got mmapped in weirdly piecemeal */
- if (likely((vm_flags & VM_EXEC) && ((sups->address >= length) || (sups->sdt_sem_offset >= length)))) continue;
+ if (likely((vm_flags & VM_EXEC) && sups->address >= length)) continue;
/* Found a uprobe_spec for this stap_uprobe_tf. Need to lock the
stap_uprobes[] array to allocate a free spot, but then we can
_stp_dbug(__FUNCTION__,__LINE__, "+semaphore %#x @ %#lx spec %d idx %d task %d\n", sdt_semaphore, sup->sdt_sem_address, sup->spec_index, i, tsk->tgid);
}
#endif
- rc = put_user (sdt_semaphore, (unsigned short __user*) sup->sdt_sem_address);
+ rc = put_user (sdt_semaphore, (unsigned short __user*) sup->sdt_sem_address);
/* XXX: need to analyze possibility of race condition */
}
}
main ()
{
#ifdef LOOP
+ #include <signal.h>
+ signal (SIGINT, &int_handler);
+ signal (SIGALRM, &alrm_handler);
alarm (30);
while (!loop_check())
{
}
- #include <signal.h>
- signal (SIGINT, &int_handler);
- signal (SIGALRM, &alrm_handler);
#endif
bar(2);
baz(3,(char*)\"abc\");
# 5. Test attaching to a running process with markers in a shared object
if { $pbtype_mssg != "kprobe" } {
+set loop_flags "additional_flags=-I$srcdir/../includes/sys"
+set loop_flags "$loop_flags additional_flags=-I$sdtdir"
+set loop_flags "$loop_flags additional_flags=-g"
+set loop_flags "$loop_flags additional_flags=-I. $pbtype_flag"
+set loop_flags "$loop_flags additional_flags=-DLOOP"
set loop_flags "$loop_flags additional_flags=-DONLY_MAIN"
set loop_flags "$loop_flags additional_flags=-Wl,-rpath,[pwd]"
set loop_flags "$loop_flags additional_flags=-L[pwd] additional_flags=-lsdt-$pbtype_mssg"