From 34e83eab4497bfbe8da0cbb7bd4f59c0021bf285 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 6 Apr 2020 22:13:15 +0200 Subject: ddb: Add 64bit support to memory examination * ddb/db_examine.c(db_examine): Add q modifier to examine 64bit values. * doc/mach.texi (examine): Document q modifier. --- ddb/db_examine.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'ddb/db_examine.c') diff --git a/ddb/db_examine.c b/ddb/db_examine.c index 6f94b686..6509a538 100644 --- a/ddb/db_examine.c +++ b/ddb/db_examine.c @@ -130,20 +130,24 @@ db_examine(addr, fmt, count, task) db_examine_prev_addr = addr; while (--count >= 0) { fp = fmt; - size = sizeof(int); + size = 4; width = 4*size; while ((c = *fp++) != 0) { switch (c) { case 'b': - size = sizeof(char); + size = 1; width = 4*size; break; case 'h': - size = sizeof(short); + size = 2; width = 4*size; break; case 'l': - size = sizeof(long); + size = 4; + width = 4*size; + break; + case 'q': + size = 8; width = 4*size; break; case 'a': /* address */ -- cgit v1.2.3