public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Inspecting memory address contents in GDB
@ 2023-04-09 18:09 Jonny Grant
  2023-04-09 19:50 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Jonny Grant @ 2023-04-09 18:09 UTC (permalink / raw)
  To: gdb

Hi
Pasting some output lines from a core dump gdb session below.
I noticed after "x/8c" the line seems stuck in ASCII mode. So when I do "x/8b" it doesn't go back to output in hex, is that expected?

It goes back to hex after I used the command "x /8xb"

~$ gdb --version
GNU gdb (Ubuntu 12.1-3ubuntu2) 12.1

(gdb) x/8b 0x000044d1bd2827c1
0x44d1bd2827c1:	0x0f	0x0b	0xcc	0xcc	0xcc	0xcc	0xcc	0xcc
(gdb) x/8c 0x000044d1bd2827c1
0x44d1bd2827c1:	15 '\017'	11 '\v'	-52 '\314'	-52 '\314'	-52 '\314'	-52 '\314'	-52 '\314'	-52 '\314'
(gdb) x/8b 0x000044d1bd2827c1
0x44d1bd2827c1:	15 '\017'	11 '\v'	-52 '\314'	-52 '\314'	-52 '\314'	-52 '\314'	-52 '\314'	-52 '\314'
(gdb) x /8xb 0x000044d1bd2827c1
0x44d1bd2827c1:	0x0f	0x0b	0xcc	0xcc	0xcc	0xcc	0xcc	0xcc

I know the values turned out to not be ASCII in this case.

Kind regards, Jonny

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-09 22:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-09 18:09 Inspecting memory address contents in GDB Jonny Grant
2023-04-09 19:50 ` Andreas Schwab
2023-04-09 22:03   ` Jonny Grant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).