From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0996FC2D0E4 for ; Fri, 27 Nov 2020 07:32:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5758B21D93 for ; Fri, 27 Nov 2020 07:32:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KJDtnVpg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5758B21D93 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiYFV-0005eA-95 for qemu-devel@archiver.kernel.org; Fri, 27 Nov 2020 02:32:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiY3S-0003V9-0f for qemu-devel@nongnu.org; Fri, 27 Nov 2020 02:20:30 -0500 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]:40846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kiY3P-0008IN-59 for qemu-devel@nongnu.org; Fri, 27 Nov 2020 02:20:29 -0500 Received: by mail-ej1-x634.google.com with SMTP id oq3so6158995ejb.7 for ; Thu, 26 Nov 2020 23:20:26 -0800 (PST) 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=La0GBYqtFx9q6o+rbG28P0euk+2woNikPLGzum0b1ps=; b=KJDtnVpgqlE9tGjY82OUmd6fCIJUFAJvqXSszSOlz9w7w98M+wwsKTQGtCxLNZhPqv BH77X9TY93XIIcOLFnTN6o8OpUiEQd8BUSwXGjXzUWIFSsUFdMLqDWQtsLNoVB4jkZFz XSAgHL3UgHFJvFcF5Brsnfx4LgjfjtLbrVAfv53jcKIa58NnSJgvOZ2ohaS21HlVixuz 6Qnj71nVWBfy95WDBAALolWEOTsU5XC8QoN3vJPooKK+biWJb68obnzyj/sVLEdoKE/O Pbi0Ooaj+qWgSFnGrRfETzbufN3WR4nuL0hDTq6A7Lndh0ei31TZ+/vBoFQsojWgzLAP iTBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=La0GBYqtFx9q6o+rbG28P0euk+2woNikPLGzum0b1ps=; b=Ge3p8QzlUTJNDudnO0r5yjiI/TNamR6g102iQqN1Lpay1++7692GJMfSl9sFUXA89d 2zZBlFL5OEDYIKqyut6oM2bBXI2ncVnd6bHKEzCjG5L4l1syqPZewr3FtLYiXv9IzsGt 3YlIjPVcgTbHkElSH5Tf1ymjNzALAg3owI0MP5zfqGGjibYTVNhMIPkrZlOo7f+ixuQ8 7Levy+q0lVTYT2t7arCtjxtgAwqlNh2jktHL+iU+0M5U/A7q7S/d1XDE77ws1SwyLPxR QdZZBi3d5U/lOvq2icXPBdi14y2LCnexFa0IjOcG/WODC/QByQev9MxcJmBZSHI9wLHj LdpA== X-Gm-Message-State: AOAM533WFIc0UESpdOOwerU9Xns9wl6yXGFtIdsfBdI9BngVJn2lq6t7 LwD2rOM3J6esOwaBgiParQAM1kg++5OwgB2wJEI= X-Google-Smtp-Source: ABdhPJzYPGqQGcgjn2Boyr8S38q6n6Mwu1bYkDsGOw2aM97lDFmhMAE9pKJjRC8JRctDiZmJAJxWO5Op/ZVzwioHsGU= X-Received: by 2002:a17:906:8587:: with SMTP id v7mr160078ejx.381.1606461625081; Thu, 26 Nov 2020 23:20:25 -0800 (PST) MIME-Version: 1.0 References: <20201126112915.525285-1-marcandre.lureau@redhat.com> <20201126112915.525285-10-marcandre.lureau@redhat.com> <20201127071514.su5s4jmbtp2u6jrv@sirius.home.kraxel.org> In-Reply-To: <20201127071514.su5s4jmbtp2u6jrv@sirius.home.kraxel.org> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Fri, 27 Nov 2020 11:20:13 +0400 Message-ID: Subject: Re: [PATCH v2 09/13] audio: remove GNUC & MSVC check To: Gerd Hoffmann Content-Type: multipart/alternative; boundary="00000000000082237c05b5117e3a" Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=marcandre.lureau@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , QEMU Developers Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --00000000000082237c05b5117e3a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Nov 27, 2020 at 11:15 AM Gerd Hoffmann wrote: > Hi, > > > > #if defined AUDIO_BREAKPOINT_ON_BUG > > > # if defined HOST_I386 > > > + __asm__ ("int3"); > > > # else > > > abort (); > > > # endif > > > -- > > > 2.29.0 > > > > I would prefer to just drop this attempt to emit an inline > > breakpoint insn (which won't work on non-x86 hosts and seems > > to me to have no benefit over just calling abort(), which will > > also drop you into the debugger) and simply make it abort() if > > AUDIO_BREAKPOINT_ON_BUG is defined. Gerd, do you have an > > opinion ? > > kraxel@sirius ~/projects/qemu# git grep AUDIO_BREAKPOINT_ON_BUG > audio/audio.c:#if defined AUDIO_BREAKPOINT_ON_BUG > > Seems this is unused, so just remove it? > > I think the original intention was to build with CFLAGS set manually for debugging this limited case. (Iirc, we have other such #ifdef lurking around) --=20 Marc-Andr=C3=A9 Lureau --00000000000082237c05b5117e3a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Nov 27, 2020 at 11:15 AM Gerd= Hoffmann <kraxel@redhat.com>= ; wrote:
=C2=A0 = Hi,

> >=C2=A0 #if defined AUDIO_BREAKPOINT_ON_BUG
> >=C2=A0 #=C2=A0 if defined HOST_I386
> > +=C2=A0 =C2=A0 =C2=A0 __asm__ ("int3");
> >=C2=A0 #=C2=A0 else
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 abort ();
> >=C2=A0 #=C2=A0 endif
> > --
> > 2.29.0
>
> I would prefer to just drop this attempt to emit an inline
> breakpoint insn (which won't work on non-x86 hosts and seems
> to me to have no benefit over just calling abort(), which will
> also drop you into the debugger) and simply make it abort() if
> AUDIO_BREAKPOINT_ON_BUG is defined. Gerd, do you have an
> opinion ?

=C2=A0 =C2=A0kraxel@sirius ~/projects/qemu# git grep AUDIO_BREAKPOINT_ON_BU= G
=C2=A0 =C2=A0audio/audio.c:#if defined AUDIO_BREAKPOINT_ON_BUG

Seems this is unused, so just remove it?


I think the original intention was to build with CFLAGS set manually = for debugging this limited case. (Iirc, we have other such #ifdef lurking a= round)
=C2=A0
--
Marc-Andr=C3=A9 Lureau
--00000000000082237c05b5117e3a--