From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17410 invoked by alias); 18 Aug 2014 16:38:49 -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 17395 invoked by uid 89); 18 Aug 2014 16:38:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f181.google.com Received: from mail-vc0-f181.google.com (HELO mail-vc0-f181.google.com) (209.85.220.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 18 Aug 2014 16:38:46 +0000 Received: by mail-vc0-f181.google.com with SMTP id lf12so5994199vcb.40 for ; Mon, 18 Aug 2014 09:38:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=FfK7Q7RyE5dkNgkp0h1LZnUzT8jp4AKYAX8iUYTx7aI=; b=F6PNGwH0Za4/jDZZUatvGh9DTJk5zsbcWwoC9BQJT9OL4PzkFbI1c3ZCYdg8eE6BrO tGW2UJerLQ8Tkgp18oaLNSaiWK8kQCFlk4FLt1kYMLOGqjJhvRIBF6Nvb95rbuRXXu/0 DJic+jzAcuvnurWHXYzcHCpT2tNhnYjfW7aPD7gNMu15Nypoll3j1B3I0QzenFB0VIN+ mQVWVn+0jMWgAgFqvTxlMTQkfq64gWXRBfXyaBOlM8uBDPvy8OfDwpDJnN+ca/dvbeoY B6Ea2t9BFrI0H9unQ5swD0GT/c2OXmXo6Sh1AqDQXfmOF2blPlaJFQaThDCqfPXfx5Yv PTsg== X-Gm-Message-State: ALoCoQkUHEIChzKuW1awFFkoaDh2doSBpH4FEojkjkEH/j1i9ee/BAOFCKfAv5YD+Dk6agUVKcTr MIME-Version: 1.0 X-Received: by 10.52.128.8 with SMTP id nk8mr1523930vdb.48.1408379924117; Mon, 18 Aug 2014 09:38:44 -0700 (PDT) Received: by 10.52.136.203 with HTTP; Mon, 18 Aug 2014 09:38:44 -0700 (PDT) In-Reply-To: <1407923779-22149-5-git-send-email-gbenson@redhat.com> References: <1407923779-22149-1-git-send-email-gbenson@redhat.com> <1407923779-22149-5-git-send-email-gbenson@redhat.com> Date: Mon, 18 Aug 2014 16:38:00 -0000 Message-ID: Subject: Re: [PATCH 4/5 v7] Introduce common-debug.h From: Doug Evans To: Gary Benson Cc: gdb-patches , Pedro Alves Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00307.txt.bz2 On Wed, Aug 13, 2014 at 2:56 AM, Gary Benson wrote: > This introduces common-debug.h. This holds the functions debug_printf > and debug_vprintf, two functions that the common code can use to print > debugging messages. Clients of the common code are expected to > implement debug_vprintf; a debug_vprintf function is written from > scratch for GDB, and gdbserver's existing debug_printf is repurposed > as debug_vprintf. > > common/agent.c is changed to use debug_vprintf rather than > defining the macro DEBUG_AGENT depending on GDBSERVER. > > nat/i386-dregs.c is changed to use the externally-implemented > debug_printf, rather than defining it itself. > > gdb/ > 2014-08-13 Tom Tromey > Gary Benson > > * common/common-debug.h: New file. > * common/common-debug.c: Likewise. > * debug.c: Likewise. > * Makefile.in (SFILES): Add common/common-debug.c. > (HFILES_NO_SRCDIR): Add common/common-debug.h. > (COMMON_OBS): Add common-debug.o and debug.o. > (common-debug.o): New rule. > * common/common-defs.h: Include common-debug.h. > * common/agent.c (debug_agent_printf): New function. > (DEBUG_AGENT): Redefine. > * nat/i386-dregs.c (debug_printf): Undefine. > > gdb/gdbserver/ > 2014-08-13 Tom Tromey > Gary Benson > > * Makefile.in (SFILES): Add common/common-debug.c. > (OBS): Add common-debug.o. > (common-debug.o): New rule. > * debug.h (debug_printf): Don't declare. > * debug.c (debug_printf): Renamed and rewritten as... > (debug_vprintf): New function. LGTM