This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
How to Read Program Architecture from GDB/MI?
- From: Paramjot Oberoi <paramjot at gmail dot com>
- To: gdb at sourceware dot org
- Date: Mon, 25 Jul 2016 01:30:59 -0400
- Subject: How to Read Program Architecture from GDB/MI?
- Authentication-results: sourceware.org; auth=none
Hi all,
I am attempting to get the CPU architecture of the currently debugged
program via a GDB/MI command. I'm not sure what's I'm doing wrong:
Console interpreter looks good:
(gdb) show architecture
The target architecture is set automatically (currently i386)
MI interpreter succeeds without any data:
(gdb) interpreter-exec mi "-gdb-show architecture"
^done
If I set the arch to auto, then query with MI I get "auto" back...:
(gdb) set arch auto
The target architecture is set automatically (currently i386)
(gdb) interpreter-exec mi "-gdb-show architecture"
^done,value="auto"
Any advice on how I can query the architecture in GDB/MI mode? Thanks
in advance, I appreciate it.