|
|
@@ -46,6 +46,7 @@
|
|
|
struct annotation_options annotation__default_options = {
|
|
|
.use_offset = true,
|
|
|
.jump_arrows = true,
|
|
|
+ .offset_level = ANNOTATION__OFFSET_JUMP_TARGETS,
|
|
|
};
|
|
|
|
|
|
const char *disassembler_style;
|
|
|
@@ -2512,7 +2513,8 @@ static void __annotation_line__write(struct annotation_line *al, struct annotati
|
|
|
if (!notes->options->use_offset) {
|
|
|
printed = scnprintf(bf, sizeof(bf), "%" PRIx64 ": ", addr);
|
|
|
} else {
|
|
|
- if (al->jump_sources) {
|
|
|
+ if (al->jump_sources &&
|
|
|
+ notes->options->offset_level >= ANNOTATION__OFFSET_JUMP_TARGETS) {
|
|
|
if (notes->options->show_nr_jumps) {
|
|
|
int prev;
|
|
|
printed = scnprintf(bf, sizeof(bf), "%*d ",
|
|
|
@@ -2523,9 +2525,14 @@ static void __annotation_line__write(struct annotation_line *al, struct annotati
|
|
|
obj__printf(obj, bf);
|
|
|
obj__set_color(obj, prev);
|
|
|
}
|
|
|
-
|
|
|
+print_addr:
|
|
|
printed = scnprintf(bf, sizeof(bf), "%*" PRIx64 ": ",
|
|
|
notes->widths.target, addr);
|
|
|
+ } else if (ins__is_call(&disasm_line(al)->ins) &&
|
|
|
+ notes->options->offset_level >= ANNOTATION__OFFSET_CALL) {
|
|
|
+ goto print_addr;
|
|
|
+ } else if (notes->options->offset_level == ANNOTATION__MAX_OFFSET_LEVEL) {
|
|
|
+ goto print_addr;
|
|
|
} else {
|
|
|
printed = scnprintf(bf, sizeof(bf), "%-*s ",
|
|
|
notes->widths.addr, " ");
|