summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-04-06 22:13:15 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-04-06 22:13:15 +0200
commit34e83eab4497bfbe8da0cbb7bd4f59c0021bf285 (patch)
treea56c12cd42b667c286c746e84d5eb5ae1710a543
parent899d69cc267b3d07ea3eeea91cf10a5a32dac985 (diff)
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.
-rw-r--r--ddb/db_examine.c12
-rw-r--r--doc/mach.texi3
2 files changed, 11 insertions, 4 deletions
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 */
diff --git a/doc/mach.texi b/doc/mach.texi
index dd1e5edd..07cb0ad1 100644
--- a/doc/mach.texi
+++ b/doc/mach.texi
@@ -6793,6 +6793,9 @@ look at by half words(16 bits)
@item l
look at by long words(32 bits)
+@item q
+look at by quad words(64 bits)
+
@item a
print the location being displayed