diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-03-19 13:02:54 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-03-19 13:02:54 (GMT) |
commit | 94fd405bb0c2e6dfa43324b04a336ffb611c58ce (patch) | |
tree | f3170587b4006fa358665a6bbfa301731503d3b3 /plugins/pychrysa/format | |
parent | 499f00977cd7f50ce0c4cf24dd59b1e920e5b180 (diff) |
Provided initial features for debugging using GDB.
Diffstat (limited to 'plugins/pychrysa/format')
-rw-r--r-- | plugins/pychrysa/format/Makefile.am | 1 | ||||
-rw-r--r-- | plugins/pychrysa/format/elf/elf.c | 2 | ||||
-rw-r--r-- | plugins/pychrysa/format/symbol.c | 9 |
3 files changed, 9 insertions, 3 deletions
diff --git a/plugins/pychrysa/format/Makefile.am b/plugins/pychrysa/format/Makefile.am index 5733e39..bef87ca 100644 --- a/plugins/pychrysa/format/Makefile.am +++ b/plugins/pychrysa/format/Makefile.am @@ -11,7 +11,6 @@ libpychrysaformat_la_LIBADD = \ dex/libpychrysaformatdex.la \ elf/libpychrysaformatelf.la - libpychrysaformat_la_LDFLAGS = diff --git a/plugins/pychrysa/format/elf/elf.c b/plugins/pychrysa/format/elf/elf.c index f8c067f..102c60d 100644 --- a/plugins/pychrysa/format/elf/elf.c +++ b/plugins/pychrysa/format/elf/elf.c @@ -198,7 +198,7 @@ bool register_python_elf_format(PyObject *module) dict = PyModule_GetDict(module); if (!register_class_for_pygobject(dict, G_TYPE_ELF_FORMAT, - py_elf_format_type, get_python_executable_format_type())) + py_elf_format_type, get_python_executable_format_type())) return false; return true; diff --git a/plugins/pychrysa/format/symbol.c b/plugins/pychrysa/format/symbol.c index 44707d1..101b694 100644 --- a/plugins/pychrysa/format/symbol.c +++ b/plugins/pychrysa/format/symbol.c @@ -384,7 +384,14 @@ static PyObject *py_binary_symbol_get_label(PyObject *self, void *closure) symbol = G_BIN_SYMBOL(pygobject_get(self)); label = g_binary_symbol_get_label(symbol); - result = PyUnicode_FromString(label); + if (label != NULL) + result = PyUnicode_FromString(label); + + else + { + result = Py_None; + Py_INCREF(result); + } return result; |