How to Read Program Architecture from GDB/MI?

Paramjot Oberoi <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAAtmCDCsZ5KPt3wDjuYq56cFoMEm6g9ZA6VORNbhuDo678VPwg@mail.gmail.com>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.