Add debug interfaces which can mask differences from os.
Signed-off-by: Shaoxin Cheng <chengshaoxin@gmail.com>