This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Give every interpreter a command_loop_proc.
- From: Stan Shebs <stanshebs at earthlink dot net>
- To: gdb-patches at sourceware dot org
- Date: Thu, 05 Sep 2013 10:14:22 -0700
- Subject: Re: [PATCH] Give every interpreter a command_loop_proc.
- Authentication-results: sourceware.org; auth=none
- References: <5228B883 dot 2010602 at broadcom dot com>
On 9/5/13 9:59 AM, Andrew Burgess wrote:
> This patch simplifies gdb/interps.c:current_interp_command_loop
> by giving every interpreter a command_loop_proc.
>
> Of the 4 interpreters I'm aware of mi and gdbtk already install
> a command loop proc, while cli and tui don't instead using
> fall-through code in current_interp_command_loop.
>
> I've given cli and tui a command loop proc, and removed the
> fall-through code.
>
> This change does rely on "current_interpreter" never being NULL,
> I believe this is true, and no tests failed here (x86-64 linux),
> but if anyone know different please let me know.
>
> OK to apply?
I like it! This is OK with one caveat:
> * gdb/cli/cli-interp.c (_initialize_cli_interp): Add a
> command_loop_proc to interp_procs.
No redundant "gdb/", please.
Stan
stan@codesourcery.com