File tree Expand file tree Collapse file tree
processor/command/info_subcmd Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 Integer ,
4141 Keyword ,
4242 LineNumber ,
43- Number ,
43+ Offset ,
4444 Symbol ,
4545 format_token ,
4646)
@@ -313,7 +313,7 @@ def print_instruction(
313313 msg_nocr (" " )
314314
315315 # Column: Instruction offset from start of code sequence
316- msg_nocr (format_token (Number , repr (offset ).rjust (4 ), style = style ))
316+ msg_nocr (format_token (Offset , repr (offset ).rjust (4 ), style = style ))
317317 msg_nocr (" " )
318318
319319 # Column: Instruction bytes
Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
2- # Copyright (C) 2017, 2020, 2024 Rocky Bernstein <rocky@gnu.org>
2+ # Copyright (C) 2017, 2020, 2024, 2026 Rocky Bernstein <rocky@gnu.org>
33#
44# This program is free software: you can redistribute it and/or modify
55# it under the terms of the GNU General Public License as published by
1919from xdis import findlinestarts
2020
2121from trepan .lib .disassemble import disassemble_bytes
22+ from trepan .lib .format import format_offset
2223from trepan .misc import wrapped_lines
2324
2425# Our local modules
@@ -51,10 +52,11 @@ def run(self, args):
5152 mainfile = self .core .filename (None )
5253 if self .core .is_running ():
5354 curframe = self .proc .curframe
55+ style = self .settings ["style" ]
5456 if curframe :
5557 line_no = inspect .getlineno (curframe )
5658 offset = curframe .f_lasti
57- self .msg (f"PC offset is { offset } ." )
59+ self .msg (f"PC offset is { format_offset ( offset , style ) } ." )
5860 offset = max (offset , 0 )
5961 code = curframe .f_code
6062 co_code = code .co_code
You can’t perform that action at this time.
0 commit comments