OC Systems

Home | Contact | Advanced Search 


I'm trying to stub a function called by my program, but APC can't seem to find it.

 The Ada code looks like:

    function Plock (N : in Types.Integer_T)
      return Types.Integer_T;
    pragma Import (C, Plock, "plock");

I get a warning message from apc stating:

  Function "....plock[1] not found in the
  modules(s) provided to apc.

Also, I get an error message from apc stating:

  Could not resolve function name: "....plock[1]".

This means that the function is in some other module. Plock is a system call to lock (or unlock) a process, text or data, into memory. In this case, Plock is in the shared library libc.so, so just be careful to state that in your probe, like this:

probe thread
  probe "plock()" in "libc.so"
    on_entry ap_StubRoutine;
    on_exit $0 = 0; // Or whatever return you want

Aprobe Technology Overview

Schedule a web demo

Contact us