From 468d5c3b452120eaf7074ffcecc117d3d5adb421 Mon Sep 17 00:00:00 2001 From: gwr Date: Fri, 13 May 1994 04:46:47 +0000 Subject: [PATCH] Print offset from symbol in same format as input parser understands (so they can be cut and pasted in an xterm). --- sys/arch/m68k/m68k/db_disasm.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/sys/arch/m68k/m68k/db_disasm.c b/sys/arch/m68k/m68k/db_disasm.c index d23255c85dbc..283ad14ca40c 100644 --- a/sys/arch/m68k/m68k/db_disasm.c +++ b/sys/arch/m68k/m68k/db_disasm.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: db_disasm.c,v 1.5 1994/05/09 16:17:08 gwr Exp $ + * $Id: db_disasm.c,v 1.6 1994/05/13 04:46:47 gwr Exp $ */ /* * Notes: @@ -3064,14 +3064,13 @@ printu_wb(dbuf, val, sz, base) { static char buf[sizeof(long) * NBBY / 3 + 2]; char *p, ch; - - if (base == 16) - addchar('$'); - else if (base == 8) + + if (base != 10) { addchar('0'); - else if (base != 10) { - base = 16; - addchar('$'); + if (base != 8) { + base = 16; + addchar('x'); + } } p = buf; @@ -3106,14 +3105,13 @@ iprintu_wb(dbuf, val, sz, base) { static char buf[sizeof(long) * NBBY / 3 + 2]; char *p, ch; - - if (base == 16) - iaddchar('$'); - else if (base == 8) + + if (base != 10) { iaddchar('0'); - else if (base != 10) { - base = 16; - iaddchar('$'); + if (base != 8) { + base = 16; + iaddchar('x'); + } } p = buf;