diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-02-24 20:50:41 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-02-24 20:50:41 (GMT) |
commit | 9ff8702e5c51c7916e239caee13b974dccff6413 (patch) | |
tree | d754055630699d221e00b2ceb66c358742b0650e /src/project.c | |
parent | a5cd2e6519456f49a0f0d9d76dfac0ff89d8bbb1 (diff) |
Shown a loaded view at its entry point at the beginning.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@479 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/project.c')
-rw-r--r-- | src/project.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/project.c b/src/project.c index 7c98d96..f3a2702 100644 --- a/src/project.c +++ b/src/project.c @@ -324,11 +324,24 @@ const char *g_study_project_get_filename(const GStudyProject *project) void g_study_project_add_loaded_binary(GLoadedBinary *binary, GStudyProject *project) { size_t index; /* Indice du nouveau binaire */ + GBinFormat *format; /* Format associé au binaire */ + GBinSymbol *symbol; /* Point d'entrée trouvé */ + const mrange_t *range; /* Emplacement de ce point */ index = g_study_project_attach_binary(project, binary); g_panel_item_dock(G_PANEL_ITEM(project->binaries[index]->item)); + format = G_BIN_FORMAT(g_loaded_binary_get_format(binary)); + + if (g_binary_format_find_symbol_by_label(format, "entry_point", &symbol)) + { + range = g_binary_symbol_get_range(symbol); + + gtk_view_panel_scroll_to_address(project->binaries[index]->views[BVW_BLOCK], get_mrange_addr(range)); + + } + } |