diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/analysis/binary.c | 17 | ||||
-rw-r--r-- | src/analysis/project.c | 2 |
3 files changed, 20 insertions, 5 deletions
@@ -1,5 +1,11 @@ 15-10-01 Cyrille Bagard <nocbos@gmail.com> + * src/analysis/binary.c: + * src/analysis/project.c: + Fix mistakes when loading or saving binary contents. + +15-10-01 Cyrille Bagard <nocbos@gmail.com> + * src/format/elf/symbols.c: Fix the support of ELF internal arrays. diff --git a/src/analysis/binary.c b/src/analysis/binary.c index a1eb09f..f74f613 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -425,7 +425,11 @@ GLoadedBinary *g_loaded_binary_new_from_xml(xmlXPathContextPtr context, const ch return NULL; } - xobject = get_node_xpath_object(context, "/ChrysalideProject/Contents/Content"); + asprintf(&access, "%s/DebugInfo", content_path); + + xobject = get_node_xpath_object(context, access); + + free(access); for (i = 0; i < XPATH_OBJ_NODES_COUNT(xobject); i++) { @@ -1252,15 +1256,18 @@ bool g_loaded_binary_attach_debug_info(GLoadedBinary *binary, GBinContent *conte const char *desc; /* Description humaine associée*/ GDbgFormat *debug; /* Format de débogage trouvé */ - result = false; - status = find_matching_format(content, binary->format, &target); if (status == FMS_MATCHED) { + result = false; + desc = get_binary_format_name(target); - if (desc != NULL) + if (desc == NULL) + log_simple_message(LMT_INFO, _("Unknown binary debug format")); + + else { log_variadic_message(LMT_INFO, _("Detected debug format: %s"), desc); @@ -1280,6 +1287,8 @@ bool g_loaded_binary_attach_debug_info(GLoadedBinary *binary, GBinContent *conte free(target); } + else + result = true; return result; diff --git a/src/analysis/project.c b/src/analysis/project.c index 616d854..902b5a8 100644 --- a/src/analysis/project.c +++ b/src/analysis/project.c @@ -387,7 +387,7 @@ bool g_study_project_save(GStudyProject *project, const char *filename) for (i = 0; i < project->contents_count && result; i++) { - if (!project->contents[i].state == PCS_INTERNAL) continue; + if (project->contents[i].state == PCS_INTERNAL) continue; access_len = strlen("/ChrysalideProject/Contents/Content[position()=") + SIZE_T_MAXLEN + strlen("]") + 1; |