summaryrefslogtreecommitdiff
path: root/plugins/readdex
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-03-15 00:01:58 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-03-15 00:01:58 (GMT)
commitb94be85e00d7770af4de93bbba91b421cfb6faea (patch)
treeea16d5248b293b3a458ad16625c6919315a4aa4a /plugins/readdex
parentfab9d7cd46922abea7d94f36dcd4630cdf3f4719 (diff)
Marked lines which are able to start a group of lines as width managers.
Diffstat (limited to 'plugins/readdex')
-rw-r--r--plugins/readdex/class.c9
-rw-r--r--plugins/readdex/code.c8
-rw-r--r--plugins/readdex/header.c2
-rw-r--r--plugins/readdex/ids.c16
4 files changed, 34 insertions, 1 deletions
diff --git a/plugins/readdex/class.c b/plugins/readdex/class.c
index 3f0608a..ccfdf9d 100644
--- a/plugins/readdex/class.c
+++ b/plugins/readdex/class.c
@@ -105,6 +105,9 @@ bool annotate_dex_class_defs(const GDexFormat *format)
free(text);
+ if (i == 0)
+ g_binary_symbol_define_as_block_start(symbol, true);
+
/* access_flags */
copy_vmpa(&start, &pos);
@@ -261,6 +264,8 @@ static bool annotate_dex_class_data(const GDexFormat *format, const GDexClass *c
free(text);
+ g_binary_symbol_define_as_block_start(symbol, true);
+
/* instance_fields_size */
copy_vmpa(&start, &pos);
@@ -365,6 +370,8 @@ static bool annotate_dex_encoded_field(const GDexFormat *format, vmpa2t *pos)
free(text);
+ g_binary_symbol_define_as_block_start(symbol, true);
+
/* access_flags */
copy_vmpa(&start, pos);
@@ -427,6 +434,8 @@ static bool annotate_dex_encoded_method(const GDexFormat *format, const encoded_
free(text);
+ g_binary_symbol_define_as_block_start(symbol, true);
+
/* access_flags */
copy_vmpa(&start, pos);
diff --git a/plugins/readdex/code.c b/plugins/readdex/code.c
index 971117e..24813ea 100644
--- a/plugins/readdex/code.c
+++ b/plugins/readdex/code.c
@@ -99,6 +99,8 @@ bool annotate_dex_code_item(const GDexFormat *format, uleb128_t offset)
free(text);
+ g_binary_symbol_define_as_block_start(symbol, true);
+
/* ins_size */
copy_vmpa(&start, &pos);
@@ -253,6 +255,8 @@ static bool annotate_dex_try_item(const GDexFormat *format, vmpa2t *pos, const v
free(text);
+ g_binary_symbol_define_as_block_start(symbol, true);
+
/* insn_count */
copy_vmpa(&start, pos);
@@ -336,6 +340,8 @@ static bool annotate_dex_encoded_catch_handler_list(const GDexFormat *format, vm
free(text);
+ g_binary_symbol_define_as_block_start(symbol, true);
+
/* instance_fields_size */
g_imm_operand_as_uleb128(G_IMM_OPERAND(operand), &size);
@@ -396,6 +402,8 @@ static bool annotate_dex_encoded_catch_handler(const GDexFormat *format, vmpa2t
free(text);
+ g_binary_symbol_define_as_block_start(symbol, true);
+
g_imm_operand_as_leb128(G_IMM_OPERAND(operand), &size);
has_catch_all = (size <= 0);
diff --git a/plugins/readdex/header.c b/plugins/readdex/header.c
index 183ca82..999baa4 100644
--- a/plugins/readdex/header.c
+++ b/plugins/readdex/header.c
@@ -82,6 +82,8 @@ bool annotate_dex_header(GDexFormat *format)
ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("DEX magic number"));
+ g_binary_symbol_define_as_block_start(symbol, true);
+
/* checksum */
copy_vmpa(&start, &pos);
diff --git a/plugins/readdex/ids.c b/plugins/readdex/ids.c
index 54d0bd7..c9f1cb5 100644
--- a/plugins/readdex/ids.c
+++ b/plugins/readdex/ids.c
@@ -89,6 +89,9 @@ bool annotate_dex_string_ids(const GDexFormat *format)
free(text);
+ if (i == 0)
+ g_binary_symbol_define_as_block_start(symbol, true);
+
/* Description de la chaƮne : taille */
operand = g_arch_instruction_get_operand(instr, 0);
@@ -178,6 +181,9 @@ bool annotate_dex_type_ids(const GDexFormat *format)
free(text);
+ if (i == 0)
+ g_binary_symbol_define_as_block_start(symbol, true);
+
}
g_object_unref(G_OBJECT(content));
@@ -236,6 +242,9 @@ bool annotate_dex_proto_ids(const GDexFormat *format)
free(text);
+ if (i == 0)
+ g_binary_symbol_define_as_block_start(symbol, true);
+
/* return_type_idx */
copy_vmpa(&start, &pos);
@@ -320,6 +329,9 @@ bool annotate_dex_field_ids(const GDexFormat *format)
free(text);
+ if (i == 0)
+ g_binary_symbol_define_as_block_start(symbol, true);
+
/* type_idx */
copy_vmpa(&start, &pos);
@@ -404,6 +416,9 @@ bool annotate_dex_method_ids(const GDexFormat *format)
free(text);
+ if (i == 0)
+ g_binary_symbol_define_as_block_start(symbol, true);
+
/* proto_idx */
copy_vmpa(&start, &pos);
@@ -437,4 +452,3 @@ bool annotate_dex_method_ids(const GDexFormat *format)
return true;
}
-