From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id zXGYL083/V/wMwAAWB0awg (envelope-from ) for ; Tue, 12 Jan 2021 00:44:47 -0500 Received: by simark.ca (Postfix, from userid 112) id AC9D01EF7E; Tue, 12 Jan 2021 00:44:47 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D20061EE1B for ; Tue, 12 Jan 2021 00:44:46 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 596DA385EC56; Tue, 12 Jan 2021 05:44:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 596DA385EC56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610430286; bh=CxPBXl+7ELqVT6CeHIVr1okssOP22q6CeCdD8Jgw6+k=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=shS26cfCN/JhWo05TVHop16uwsaaUxmN/0Vri/BOeLKHhIDZkN0Ejgq4xwHiAhcc3 TEjsNM123C2ihNV6TlBlcKVB8pnuoTY1t54A540aJqSnT/905MT9PbTH1XF9Ivpj03 psi9o/QjT39WeE7M2sEX/NcaKwX4ww7fg6LswmkY= Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 59405385EC56 for ; Tue, 12 Jan 2021 05:44:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 59405385EC56 X-ASG-Debug-ID: 1610430282-0c856e67e23e0c70001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id cuRiI2fH8WaoBt6z (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Jan 2021 00:44:42 -0500 (EST) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.localdomain (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) by smtp.ebox.ca (Postfix) with ESMTP id 38748441B21; Tue, 12 Jan 2021 00:44:42 -0500 (EST) X-Barracuda-RBL-IP: 192.222.157.6 X-Barracuda-Effective-Source-IP: 192-222-157-6.qc.cable.ebox.net[192.222.157.6] X-Barracuda-Apparent-Source-IP: 192.222.157.6 To: gdb-patches@sourceware.org Subject: [PATCH 1/2] gdb: move baud_rate and serial_parity declarations to serial.h Date: Tue, 12 Jan 2021 00:44:40 -0500 X-ASG-Orig-Subj: [PATCH 1/2] gdb: move baud_rate and serial_parity declarations to serial.h Message-Id: <20210112054441.1188693-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1610430282 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 2817 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.87183 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" They are currently in target.h, it would make more sense to have them in serial.h, since they are defined in serial.c. gdb/ChangeLog: * target.h (baud_rate, serial_parity): Move declarations... * serial.h: ... here. * main.c: Include serial.h. * serial.c (baud_rate, serial_parity): Update doc. Change-Id: Idc983c154c80ccc29b07ce68df3483cefe03fb71 --- gdb/main.c | 1 + gdb/serial.c | 7 ++----- gdb/serial.h | 8 ++++++++ gdb/target.h | 6 ------ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gdb/main.c b/gdb/main.c index 9e52c4153656..1e1fbf2f3512 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -54,6 +54,7 @@ #endif #include "gdbsupport/alt-stack.h" #include "observable.h" +#include "serial.h" /* The selected interpreter. This will be used as a set command variable, so it should always be malloc'ed - since diff --git a/gdb/serial.c b/gdb/serial.c index 4b75178021b3..1854721d7ed6 100644 --- a/gdb/serial.c +++ b/gdb/serial.c @@ -623,10 +623,7 @@ serial_pipe (struct serial *scbs[2]) static struct cmd_list_element *serial_set_cmdlist; static struct cmd_list_element *serial_show_cmdlist; -/* Baud rate specified for talking to serial target systems. Default - is left as -1, so targets can choose their own defaults. */ -/* FIXME: This means that "show serial baud" and gr_files_info can - print -1 or (unsigned int)-1. This is a Bad User Interface. */ +/* See serial.h. */ int baud_rate = -1; @@ -638,7 +635,7 @@ serial_baud_show_cmd (struct ui_file *file, int from_tty, value); } -/* Parity for serial port. */ +/* See serial.h. */ int serial_parity = GDBPARITY_NONE; diff --git a/gdb/serial.h b/gdb/serial.h index d9f5d4ba5ef9..9a800491afff 100644 --- a/gdb/serial.h +++ b/gdb/serial.h @@ -36,6 +36,14 @@ typedef void *serial_ttystate; struct serial; struct serial_ops; +/* Speed in bits per second, or -1 which means don't mess with the speed. */ + +extern int baud_rate; + +/* Parity for serial port */ + +extern int serial_parity; + /* Create a new serial for OPS. The new serial is not opened. */ /* Try to open NAME. Returns a new `struct serial *' on success, NULL diff --git a/gdb/target.h b/gdb/target.h index e1a1d7a9226b..40bf416cd677 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -2477,12 +2477,6 @@ extern gdb::optional target_get_osdata (const char *type); information (higher values, more information). */ extern int remote_debug; -/* Speed in bits per second, or -1 which means don't mess with the speed. */ -extern int baud_rate; - -/* Parity for serial port */ -extern int serial_parity; - /* Timeout limit for response from target. */ extern int remote_timeout; -- 2.29.2