Hex print variables in raw GDB cli interface

How did I survive 20 years without noticing that GDB can hex print variables simply by adding /x:


p/x var

$1 = {0×4d, 0×46, 0×50, …}

;-)!

Leave a Reply

You must be logged in to post a comment.