|
10 | 10 |
|
11 | 11 | from esp_idf_monitor.base.key_config import MENU_KEY, TOGGLE_OUTPUT_KEY |
12 | 12 |
|
13 | | -from .output_helpers import error_print, note_print |
| 13 | +from .output_helpers import error_print, note_print, yellow_print, green_print, red_print, normal_print |
14 | 14 |
|
15 | 15 | key_description = miniterm.key_description |
16 | 16 |
|
@@ -141,9 +141,18 @@ def output_toggle(self): # type: () -> None |
141 | 141 | def handle_possible_pc_address_in_line(self, line: bytes, insert_new_line: bool = False) -> None: |
142 | 142 | if not self.pc_address_decoder: |
143 | 143 | return |
144 | | - translation = self.pc_address_decoder.decode_address(line) |
145 | | - if translation: |
| 144 | + decoded = self.pc_address_decoder.decode_addresses(line) |
| 145 | + if decoded: |
146 | 146 | if insert_new_line: |
147 | 147 | # insert a new line in case address translation is printed in the middle of a line |
148 | 148 | self.print(b'\n') |
149 | | - self.print(translation, console_printer=note_print) |
| 149 | + for address, entries in decoded.items(): |
| 150 | + self.print(f"{address}: ", console_printer=normal_print) |
| 151 | + for idx, entry in enumerate(entries): |
| 152 | + if idx > 0: |
| 153 | + self.print(' (inlined by) ', console_printer=normal_print) |
| 154 | + self.print(entry['fn'], console_printer=lambda msg: yellow_print(msg, newline='')) |
| 155 | + self.print(' in ', console_printer=normal_print) |
| 156 | + self.print(entry['path'], console_printer=lambda msg: green_print(msg, newline='')) |
| 157 | + self.print(':', console_printer=normal_print) |
| 158 | + self.print(str(entry['line']), console_printer=red_print) |
0 commit comments