This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
Re: mi/2551: Missing MI command to do the same as "jump <line>" or "jump <address>"
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 11 Nov 2008 09:18:01 -0000
- Subject: Re: mi/2551: Missing MI command to do the same as "jump <line>" or "jump <address>"
- Reply-to: Nick Roberts <nickrob at snap dot net dot nz>
The following reply was made to PR mi/2551; it has been noted by GNATS.
From: Nick Roberts <nickrob@snap.net.nz>
To: dodji@redhat.com
Cc: gdb-gnats@sources.redhat.com
Subject: Re: mi/2551: Missing MI command to do the same as "jump <line>" or "jump <address>"
Date: Tue, 11 Nov 2008 22:09:12 +1300
> MI should provide the client with a way to jump to a location, just like the commande line interface does with the "jump" command.
>
> Please note that in that case, the new MI command needs to output an out-of-band record similar to the one that exists for the -exec-next command. Something along the lines of:
> *stopped, reason="a-reason", line="8", file,="something.c"
>
> That is needed to give the client a chance to update its state.
That seems reasonable. Does the patch below do what you want?
--
Nick http://www.inet.net.nz/~nickrob
--- mi-cmds.c 20 Aug 2008 01:05:02 +1200 1.35
+++ mi-cmds.c 11 Nov 2008 22:03:36 +1300
@@ -61,6 +61,7 @@ struct mi_cmd mi_cmds[] =
{ "exec-continue", { NULL, 0 }, mi_cmd_exec_continue},
{ "exec-finish", { NULL, 0 }, mi_cmd_exec_finish},
{ "exec-interrupt", { NULL, 0 }, mi_cmd_exec_interrupt},
+ { "exec-jump", { "jump", 1 }, NULL},
{ "exec-next", { NULL, 0 }, mi_cmd_exec_next},
{ "exec-next-instruction", { NULL, 0 }, mi_cmd_exec_next_instruction},
{ "exec-return", { NULL, 0 }, mi_cmd_exec_return},