summaryrefslogtreecommitdiff
path: root/src/format
diff options
context:
space:
mode:
Diffstat (limited to 'src/format')
-rw-r--r--src/format/symbol.c4
-rw-r--r--src/format/symbol.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/format/symbol.c b/src/format/symbol.c
index 8ab76b6..37dc45e 100644
--- a/src/format/symbol.c
+++ b/src/format/symbol.c
@@ -222,6 +222,7 @@ SymbolType g_binary_symbol_get_target_type(const GBinSymbol *symbol)
const char *g_binary_symbol_to_string(const GBinSymbol *symbol)
{
+ return "AAAA";
const char *result; /* Désignation à retourner */
switch (symbol->type)
@@ -328,6 +329,7 @@ void g_binary_symbol_fix_range(GBinSymbol *symbol, const vmpa2t *full)
switch (symbol->type)
{
case STP_DATA:
+ case STP_RO_STRING:
instr = g_binary_symbol_get_instruction(symbol);
@@ -385,6 +387,7 @@ const mrange_t *g_binary_symbol_get_range(const GBinSymbol *symbol)
switch (symbol->type)
{
case STP_DATA:
+ case STP_RO_STRING:
result = g_arch_instruction_get_range(symbol->extra.instr);
break;
@@ -460,6 +463,7 @@ void g_binary_symbol_attach_routine(GBinSymbol *symbol, GBinRoutine *routine)
void g_binary_symbol_attach_instruction(GBinSymbol *symbol, GArchInstruction *instr)
{
+ if (symbol->type != STP_RO_STRING)
symbol->type = STP_DATA;
symbol->extra.instr = instr;
diff --git a/src/format/symbol.h b/src/format/symbol.h
index c3e53cc..fafc55f 100644
--- a/src/format/symbol.h
+++ b/src/format/symbol.h
@@ -42,7 +42,8 @@ typedef enum _SymbolType
STP_OBJECT, /* Objet quelconque */
STP_FUNCTION, /* Simple morceau de code */
STP_ENTRY_POINT, /* Morceau de code en entrée */
- STP_STRING /* Chaîne de caractères */
+ STP_STRING, /* Chaîne de caractères */
+ STP_RO_STRING /* Chaîne de caractères */
} SymbolType;
@@ -142,7 +143,7 @@ GDbComment *g_binary_symbol_get_comment(const GBinSymbol *);
#define ADD_STR_AS_SYM(_fmt, _sym, _ins) \
do \
{ \
- _sym = g_binary_symbol_new(STP_DATA, NULL, 0); \
+ _sym = g_binary_symbol_new(STP_RO_STRING, NULL, 0); \
g_binary_symbol_attach_instruction(_sym, _ins); \
g_binary_format_add_symbol(G_BIN_FORMAT(_fmt), _sym); \
} \