From b64d1cf193186b41b3c92a5a8e5ab4d194f94dd5 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Thu, 10 Apr 2014 23:05:28 +0800 Subject: [PATCH] refine the comments for Skipdata sample code --- bindings/python/test_skipdata.py | 10 ++++++---- tests/test_skipdata.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bindings/python/test_skipdata.py b/bindings/python/test_skipdata.py index f8e9f3f4e..3e6c2b1e4 100755 --- a/bindings/python/test_skipdata.py +++ b/bindings/python/test_skipdata.py @@ -51,11 +51,13 @@ def test_class(): md.syntax = syntax md.skipdata = True - # To rename "data" instruction's mnemonic to "db", uncomment the line below - # This example ignores SKIPDATA's callback (first None) & user_data (second None) - # md.skipdata_setup = ("db", None, None) - # To customize the callback, uncomment the line below. + # Default "data" instruction's name is ".byte". To rename it to "db", just uncomment + # the code below. + # md.skipdata_setup = ("db", None, None) + # NOTE: This example ignores SKIPDATA's callback (first None) & user_data (second None) + + # To customize the SKIPDATA callback, uncomment the line below. # md.skipdata_setup = (".db", CS_SKIPDATA_CALLBACK(testcb), None) for insn in md.disasm(code, 0x1000): diff --git a/tests/test_skipdata.c b/tests/test_skipdata.c index 7be507fa7..7730af1a6 100644 --- a/tests/test_skipdata.c +++ b/tests/test_skipdata.c @@ -67,7 +67,7 @@ static void test() if (platforms[i].opt_type) cs_option(handle, platforms[i].opt_type, platforms[i].opt_value); - // turn on SKIPDATA option, but just use default option to skip 1 byte on data + // turn on SKIPDATA option cs_option(handle, CS_OPT_SKIPDATA, CS_OPT_ON); size_t count = cs_disasm_ex(handle, platforms[i].code, platforms[i].size, address, 0, &insn);