[RFC] Don't propagate our current terminal state to the inferior

Message ID 20150107145602.GA419@adacore.com
State New, archived
Headers

Commit Message

Joel Brobecker Jan. 7, 2015, 2:56 p.m. UTC
  > gdb/ChangeLog:
> 
> 	* terminal.h (set_initial_gdb_ttystate): Declare.
> 	* inflow.c (initial_gdb_ttystate): New static variable.
> 	(set_initial_gdb_ttystate): New setter.
> 	(child_terminal_init_with_pgrp): Copy initial_gdb_ttystate
> 	instead of our current terminal state.
> 	* top.c (gdb_init): Call set_initial_gdb_ttystate.

Small nit that I noticed just as I glanced at the patch...

> +/* Set the initial tty state that is to be inherited by new inferiors.  */
> +void
> +set_initial_gdb_ttystate (void)
> +{

We ask that an empty line between the function's documentation
and its implementation be inserted.

I have pushed the attached patch as obvious...

gdb/ChangeLog:

        * inflow.c (set_initial_gdb_ttystate): Add empty line after
        comment documenting function.
  

Comments

Joel Brobecker Jan. 7, 2015, 2:57 p.m. UTC | #1
> We ask that an empty line between the function's documentation
> and its implementation be inserted.

And I meant to actually paste the reference:
https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Document_Every_Subprogram
  
Patrick Palka Jan. 7, 2015, 3:18 p.m. UTC | #2
On Wed, Jan 7, 2015 at 9:57 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>> We ask that an empty line between the function's documentation
>> and its implementation be inserted.
>
> And I meant to actually paste the reference:
> https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Document_Every_Subprogram

Good to know.  Thanks Joel.

>
> --
> Joel
  

Patch

From ea42d6f8d1e24403e533e5dfea18e94c47ac534b Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Wed, 7 Jan 2015 18:49:49 +0400
Subject: [PATCH] Empty line after comment documenting
 set_initial_gdb_ttystate.

gdb/ChangeLog:

        * inflow.c (set_initial_gdb_ttystate): Add empty line after
        comment documenting function.
---
 gdb/ChangeLog | 5 +++++
 gdb/inflow.c  | 1 +
 2 files changed, 6 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6477dc1..e9b0377 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@ 
+2015-01-07  Joel Brobecker  <brobecker@adacore.com>
+
+	* inflow.c (set_initial_gdb_ttystate): Add empty line after
+	comment documenting function.
+
 2015-01-07  Patrick Palka  <patrick@parcs.ath.cx>
 
 	* terminal.h (set_initial_gdb_ttystate): Declare.
diff --git a/gdb/inflow.c b/gdb/inflow.c
index 3c121a3..4c81a68 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -161,6 +161,7 @@  show_interactive_mode (struct ui_file *file, int from_tty,
 }
 
 /* Set the initial tty state that is to be inherited by new inferiors.  */
+
 void
 set_initial_gdb_ttystate (void)
 {
-- 
1.9.1