From: "Andrew Burgess" <aburgess@broadcom.com>
To: gdb-patches@sourceware.org
Cc: "Pedro Alves" <palves@redhat.com>
Subject: Re: PING: [PATCH] Remove deprecated_command_loop_hook
Date: Thu, 29 Aug 2013 16:27:00 -0000 [thread overview]
Message-ID: <521F7656.3010305@broadcom.com> (raw)
In-Reply-To: <521F5C08.8030904@redhat.com>
On 29/08/2013 3:34 PM, Pedro Alves wrote:
> On 08/29/2013 11:47 AM, Andrew Burgess wrote:
>> Ping!
>>
>> I know the gdbtk patch has not yet been merged, but the patch I posted
>> for them is not huge, nor should it prove controversial, it's in the
>> same style as this patch for core gdb.
>
> I guess people were just waiting to hear if/when the gdbtk patch
> had been merged. But really we don't need to wait for that. Split
> out the MI part from the part that actually gets rid of
> deprecated_command_loop_hook, and resend the MI bits. Once both MI
> and the gdbtk patches are in, resend the deprecated_command_loop_hook
> bit saying
> "hey, there are no users left, let's just garbage collect this.".
>
>>
>> + /* The version of the mi we're running. */
>> + int version;
>> +
>
> I may be missing something, as I don't see a need for this ...
Agreed.
Updated patch below only removes the use of
deprecated_command_loop_hook from the MI code.
OK?
Thanks,
Andrew
2013-08-29 Andrew Burgess <aburgess@broadcom.com>
* mi/mi-interp.c (mi_command_loop): Change signature to match
interp_command_loop_ftype.
(mi1_command_loop): Remove.
(mi2_command_loop): Remove.
(mi3_command_loop): Remove.
(mi_interpreter_resume): Remove setting of
deprecated_command_loop_hook.
(_initialize_mi_interp): Set mi_command_loop as the command loop
callback.
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index e370a57..038132f 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -43,7 +43,7 @@
static void mi_execute_command_wrapper (const char *cmd);
static void mi_execute_command_input_handler (char *cmd);
-static void mi_command_loop (int mi_version);
+static void mi_command_loop (void *data);
/* These are hooks that we put in place while doing interpreter_exec
so we can report interesting things that happened "behind the MI's
@@ -52,10 +52,6 @@ static void mi_command_loop (int mi_version);
static int mi_interp_query_hook (const char *ctlstr, va_list ap)
ATTRIBUTE_PRINTF (1, 0);
-static void mi3_command_loop (void);
-static void mi2_command_loop (void);
-static void mi1_command_loop (void);
-
static void mi_insert_notify_hooks (void);
static void mi_remove_notify_hooks (void);
static void mi_on_normal_stop (struct bpstats *bs, int print_frame);
@@ -193,16 +189,6 @@ mi_interpreter_resume (void *data)
deprecated_show_load_progress = mi_load_progress;
- /* If we're _the_ interpreter, take control. */
- if (current_interp_named_p (INTERP_MI1))
- deprecated_command_loop_hook = mi1_command_loop;
- else if (current_interp_named_p (INTERP_MI2))
- deprecated_command_loop_hook = mi2_command_loop;
- else if (current_interp_named_p (INTERP_MI3))
- deprecated_command_loop_hook = mi3_command_loop;
- else
- deprecated_command_loop_hook = mi2_command_loop;
-
return 1;
}
@@ -322,25 +308,7 @@ mi_execute_command_input_handler (char *cmd)
}
static void
-mi1_command_loop (void)
-{
- mi_command_loop (1);
-}
-
-static void
-mi2_command_loop (void)
-{
- mi_command_loop (2);
-}
-
-static void
-mi3_command_loop (void)
-{
- mi_command_loop (3);
-}
-
-static void
-mi_command_loop (int mi_version)
+mi_command_loop (void *data)
{
/* Turn off 8 bit strings in quoted output. Any character with the
high bit set is printed using C's octal format. */
@@ -996,7 +964,8 @@ _initialize_mi_interp (void)
mi_interpreter_exec, /* exec_proc */
mi_interpreter_prompt_p, /* prompt_proc_p */
mi_ui_out, /* ui_out_proc */
- mi_set_logging /* set_logging_proc */
+ mi_set_logging, /* set_logging_proc */
+ mi_command_loop /* command_loop_proc */
};
/* The various interpreter levels. */
next prev parent reply other threads:[~2013-08-29 16:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-21 18:09 Andrew Burgess
2013-08-21 18:56 ` Stan Shebs
2013-08-22 0:18 ` Andrew Burgess
2013-08-29 10:48 ` PING: " Andrew Burgess
2013-08-29 14:34 ` Pedro Alves
2013-08-29 16:27 ` Andrew Burgess [this message]
2013-08-29 16:42 ` remove the use of deprecated_command_loop_hook from the MI code. (was: Re: Remove deprecated_command_loop_hook) Pedro Alves
2013-08-29 17:17 ` remove the use of deprecated_command_loop_hook from the MI code Andrew Burgess
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=521F7656.3010305@broadcom.com \
--to=aburgess@broadcom.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox