diff options
author | Jan Vrany <jan.vrany@fit.cvut.cz> | 2018-08-22 10:42:38 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2018-08-22 11:54:37 +0100 |
commit | 6d52907e226ade45d5f5196eaed8386affda5156 (patch) | |
tree | 4fe505ed9013606979200dea5f8df9730c563956 /gdb/stack.c | |
parent | 6f4286c4f7193606fd6200e46b152ff0934f9cc2 (diff) | |
download | binutils-6d52907e226ade45d5f5196eaed8386affda5156.zip binutils-6d52907e226ade45d5f5196eaed8386affda5156.tar.gz binutils-6d52907e226ade45d5f5196eaed8386affda5156.tar.bz2 |
MI: Print frame architecture when printing frames on an MI channel
When printing frames on an MI channel also print the frame
architecture like in:
(gdb)
-stack-list-frames 3 3
^done,stack=
[frame={level="3",addr="0x000107a4",func="foo",
file="recursive2.c",fullname="/home/foo/bar/recursive2.c",
line="14",arch="i386:x86_64"}]
(gdb)
This is useful for MI clients that need to know the architecture in
order to perform further analysis, for example to use their own
disassembler to analyze machine code.
gdb/Changelog:
2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
* stack.c (print_frame): Print frame architecture when printing on
an MI output.
* NEWS: Mention new "arch" attribute in frame output.
gdb/testsuite/Changelog
2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
* lib/mi-support.exp (mi_expect_stop): Update regexp to
accommodate new "arch" field in frame output.
* gdb.mi/mi-return.exp: Likewise.
* gdb.mi/mi-stack.exp: Likewise.
* gdb.mi/mi-syn-frame.exp: Likewise.
* gdb.mi/user-selected-context-sync.exp: Likewise.
gdb/doc/Changelog
2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
* gdb.texinfo (The -stack-list-frames Command): Update description
to mention "arch".
Update MI examples throughout the document to contain "arch" in
frame output.
Diffstat (limited to 'gdb/stack.c')
-rw-r--r-- | gdb/stack.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/stack.c b/gdb/stack.c index 3da46dd..366687e 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -1249,6 +1249,9 @@ print_frame (struct frame_info *frame, int print_level, uiout->field_string ("from", lib); } } + if (uiout->is_mi_like_p ()) + uiout->field_string ("arch", + (gdbarch_bfd_arch_info (gdbarch))->printable_name); } uiout->text ("\n"); |