+
+ if dumpShm:
+ print "Shared memory:"
+ ascii = ""
+ for i in range(0, len(shm)):
+ if i % 16 == 0 and i != 0:
+ stdout.write(" " + ascii + "\n")
+ ascii = ""
+ if i % 16 == 0:
+ stdout.write("0x%04X: " % i)
+ c = ord(shm[i])
+ stdout.write("%02X" % c)
+ if (i % 2 != 0):
+ stdout.write(" ")
+ ascii += toAscii(c)
+ stdout.write(" " + ascii + "\n")