From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114183 invoked by alias); 6 Sep 2018 21:13:48 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 114087 invoked by uid 89); 6 Sep 2018 21:13:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=namely X-HELO: gateway20.websitewelcome.com Received: from gateway20.websitewelcome.com (HELO gateway20.websitewelcome.com) (192.185.47.18) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 06 Sep 2018 21:13:46 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway20.websitewelcome.com (Postfix) with ESMTP id C909B400DC12F for ; Thu, 6 Sep 2018 16:13:21 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id y1aRfTNfbRPojy1aXfrrcO; Thu, 06 Sep 2018 16:13:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version :Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=97328qia5oEuAx63NZz3fR0EDGVNIgdvbMxCOIGKHMI=; b=XQ1I+//el4LdmRY5LVwwXUhQQO bw1+QsCPlik+6SXRhusfdVekFFsFG1w1QaBF6zsAgEOZEyNS4i9K/Rskm+wiPq+l9yn/ivHwweZBG GKcIj5JlzvjQBRN+bJjcojQd+; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:34550 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fy1aR-0013U4-E3 for gdb-patches@sourceware.org; Thu, 06 Sep 2018 16:13:11 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Subject: [RFC 0/8] add terminal styling to gdb Date: Thu, 06 Sep 2018 21:13:00 -0000 Message-Id: <20180906211303.11029-1-tom@tromey.com> X-SW-Source: 2018-09/txt/msg00108.txt.bz2 This series is not ready to review, but I wanted some feedback on the general approach before committing to writing documentation, test cases, and comments. I've wanted gdb to use colors on the terminal for a while now. I've actually tried implementing this a few different ways at different times, the most successful approach so far being a colorizing frame filter. This series takes a more direct approach, namely integrating the code into gdb. The basic approach is to have gdb know how to emit ANSI terminal escape codes to control the color and style (currently just the intensity). Then, cli-out is changed to style certain fields as it emits them. However, because some places do not use ui-out, some ad hoc changes are also done. This series styles function names, file names, and variable names. It also styles the gdb welcome message for fun. I think my earlier patch to make the TUI understand ANSI terminal escapes will make this patch work there. (I have not tried this yet.) Other things could be styled as well. A few ideas I had: * Style addresses specially * Style strings specially * Add styling to "print" and "ptype" (like, field names could be styled the way they are in other spots in this series) * Go the other way and instead of styling the names of variables, style their values * Style gdb-provided identifiers specially so they can be found more easily; here I mean something like the thread number or breakpoint number, which you have to read to type back to gdb sometimes * Inferior-provided identifiers (PID or thread name) could be styled differently too * ... your idea here, let me know Tom