]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/plr/server/src/fault_handlers/lock_observer.h
update
[l4.git] / l4 / pkg / plr / server / src / fault_handlers / lock_observer.h
index 964f9d397339b58361af8ff7b8b7edf44b7530b6..87c230e91c996470b67ce5415c2b4b56fbaafb0c 100644 (file)
@@ -139,7 +139,9 @@ namespace Romain
                void activate(Romain::App_instance *inst, Romain::App_model* am)
                {
 #if INTERNAL_DETERMINISM
-                       if (function_id == pt_lock_id or function_id == pt_unlock_id) {
+                       if (((function_id == pt_lock_id) or
+                            (function_id == pt_unlock_id)) and 
+                               (orig_address != ~0UL)) {
                                /* Assumption: __pthread_(un)lock are called seldomly, so
                                 * we simply use the bp functionality here */
                                bp = new Breakpoint(orig_address);
@@ -165,8 +167,10 @@ namespace Romain
                                << NOCOLOR << " ===============";
 
                        lock_info* lockinfo = reinterpret_cast<lock_info*>(am->lockinfo_local());
-                       if (wrapper_address == ~0)
+                       if (wrapper_address == ~0) {
+                               DEBUG() << BLUE << "   no known address" << NOCOLOR;
                                return;
+                       }
 
                        unsigned char *instructionBuffer = lockinfo->trampolines + function_id * 32;
                        memset(instructionBuffer, 0xff, 32);