summaryrefslogtreecommitdiff
path: root/src/analysis/disass/fetch.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-09-01 22:20:28 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-09-01 22:20:28 (GMT)
commit04ca0756d59629113bd3f602565850a2910ac84e (patch)
tree26c70bc546e4ac55967530beb583dc851b2f82c9 /src/analysis/disass/fetch.c
parenta738b482b70d263252ec4dc18919c71503490297 (diff)
Loaded some ELF symbols from DYNSYM and SYMTAB sections.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@397 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/disass/fetch.c')
-rw-r--r--src/analysis/disass/fetch.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/analysis/disass/fetch.c b/src/analysis/disass/fetch.c
index 20128aa..55ea1d4 100644
--- a/src/analysis/disass/fetch.c
+++ b/src/analysis/disass/fetch.c
@@ -135,22 +135,26 @@ GArchInstruction *disassemble_binary_content(const GLoadedBinary *binary, GtkExt
+ vmpa2t *last; /* Dernière bordure rencontrée */
+
+
+
GBinSymbol **symbols; /* Symboles à représenter */
size_t sym_count; /* Qté de symboles présents */
size_t i; /* Boucle de parcours */
- GArchInstruction *instr; /* Instruction à insérer */
-
-
- vmpa2t *last; /* Dernière bordure rencontrée */
const vmpa2t *border; /* Nouvelle bordure rencontrée */
off_t length; /* Taille d'une partie traitée */
+ GArchInstruction *instr; /* Instruction à insérer */
+
+
+
GArchInstruction *joint; /* Jointure entre deux lots */
@@ -179,19 +183,26 @@ GArchInstruction *disassemble_binary_content(const GLoadedBinary *binary, GtkExt
+ border = g_binary_symbol_get_location(symbols[i], &length);
switch (g_binary_symbol_get_target_type(symbols[i]))
{
case STP_DATA:
instr = g_binary_symbol_get_instruction(symbols[i]);
g_object_ref(G_OBJECT(instr));
- border = g_arch_instruction_get_location2(instr, &length);
-
- // Utiliser : ???
- // const vmpa2t *g_binary_symbol_get_address2(const GBinSymbol *symbol)
+ break;
+ case STP_ROUTINE:
+ instr = load_raw_binary(binary, border,
+ get_phy_addr(border) + length,
+ statusbar, id);
break;
+ default:
+ printf("BADDD !\n");
+ exit(0);
+ break;
+
}
/* Traiter la diff */