From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24878 invoked by alias); 7 Oct 2019 22:40:52 -0000 Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org Received: (qmail 24870 invoked by uid 89); 7 Oct 2019 22:40:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*c:alternative X-HELO: mail-ot1-f65.google.com Received: from mail-ot1-f65.google.com (HELO mail-ot1-f65.google.com) (209.85.210.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Oct 2019 22:40:50 +0000 Received: by mail-ot1-f65.google.com with SMTP id e11so12463518otl.5 for ; Mon, 07 Oct 2019 15:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rIiPaGCCaiyedKyCDlOt8XaWOyqtuxZOUlwxNfFlnQ4=; b=p3jy6TPbKS+YQOOmekehlNVKqtMiqqVNhuUr2Wq8BbKeIUsirDaaMX2raysMnIPehB UB/WEgFOW089YMMNEIfOCAqYSZp9zMERhBSD0DtwmJ2w1RtRY0XjMJupVh3vA2yl77u7 ks8IZ824eR1Lcr1qFzhnAjeI1kSXlm4NZEv6DAOn/W5m6dH3S7lo77YWhaFj6BrhrzJU X9JOvRdmZaFWxB76YU4UL3uZ125qZPsHFc044CXi8zyrYx3vGTca016L0uSoO6Gjbm14 ZFzbrbUCAeDTFIOLP/v/MV4QSQcSBvYj40x6Zvy5AWq4O7fOBb2GB2pCQnRVOsxOPM/n HXkw== MIME-Version: 1.0 References: <20191007210928.239798-1-cbiesinger@google.com> In-Reply-To: <20191007210928.239798-1-cbiesinger@google.com> From: Mike Wellington Date: Mon, 07 Oct 2019 22:40:00 -0000 Message-ID: Subject: Re: [PATCH] Add declarations to gdbtk.h To: Christian Biesinger Cc: insight@sourceware.org, Christian Biesinger Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-q4/txt/msg00001.txt.bz2 So what's the problem? On Mon, Oct 7, 2019, 15:09 Christian Biesinger via insight < insight@sourceware.org> wrote: > From: Christian Biesinger > > Currently, gdb/main.c has to declare these two variables in the > .c file. This patch adds the declarations to the header so that > gdb can just use them. > > gdbtk/ChangeLog: > > 2019-10-07 Christian Biesinger > > * generic/gdbtk.h (gdbtk_test): Declare. > (external_editor_command): Declare. > (file): Prefix Tcl_Interp with "struct" > so that this compiles when Tcl headers aren't included. > * generic/gdbtk-interp.h: Likewise. > --- > gdbtk/generic/gdbtk-interp.h | 2 +- > gdbtk/generic/gdbtk.h | 11 +++++++++-- > 2 files changed, 10 insertions(+), 3 deletions(-) > > diff --git a/gdbtk/generic/gdbtk-interp.h b/gdbtk/generic/gdbtk-interp.h > index 3126b91..9abad2e 100644 > --- a/gdbtk/generic/gdbtk-interp.h > +++ b/gdbtk/generic/gdbtk-interp.h > @@ -53,7 +53,7 @@ public: > ui_file *_stdtargin; > ui_out *uiout; > > - Tcl_Interp *tcl; > + struct Tcl_Interp *tcl; > }; > > extern gdbtk_interp *gdbtk_get_interp (void); > diff --git a/gdbtk/generic/gdbtk.h b/gdbtk/generic/gdbtk.h > index 7bb1f79..89ab8bf 100644 > --- a/gdbtk/generic/gdbtk.h > +++ b/gdbtk/generic/gdbtk.h > @@ -77,6 +77,12 @@ extern int running_now; > > extern long gdbtk_pid; > > +/* > + * This variable controls the interaction with an external editor. > + */ > + > +extern char *external_editor_command; > + > /* These two control how the GUI behaves when tracing or loading > They are defined in gdbtk-cmds.c */ > > @@ -91,7 +97,7 @@ extern int load_in_progress; > > typedef struct gdbtk_result > { > - Tcl_Obj *obj_ptr; /* This will eventually be copied over to > the > + struct Tcl_Obj *obj_ptr; /* This will eventually be copied > over to the > Tcl result */ > int flags; /* Flag vector to control how the result is > used. */ > @@ -151,7 +157,7 @@ extern int gdbtk_force_detach; > * > */ > > -extern int Gdbtk_Init (Tcl_Interp * interp); > +extern int Gdbtk_Init (struct Tcl_Interp * interp); > extern void gdbtk_stop_timer (void); > extern void gdbtk_start_timer (void); > extern long gdbtk_getpid(void); > @@ -159,6 +165,7 @@ extern void gdbtk_ignorable_warning (const char *, > const char *); > extern int x_event (int); > extern int gdbtk_two_elem_cmd (char *, const char *); > extern int target_is_native (struct target_ops *t); > +extern int gdbtk_test (char *); > extern struct ui_file *gdbtk_fileopen (void); > extern bool gdbtk_disable_write; > extern ptid_t gdbtk_get_ptid (void); > -- > 2.23.0.581.g78d2f28ef7-goog > >