From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id C66A83857010 for ; Mon, 17 Apr 2023 10:55:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C66A83857010 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681728930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PSWY+qWbuq+rvFfC0bc7UB79m/QSzFUkpSu8Wms8t2A=; b=UI8R3JQDBGfYIwdj8qRSO05zG67bkIR7IsNL4KIzOCgNcVh3p3nCJ6ylZZcRvlHnigIB5o e3gGIGO2jlsgAVSjUlX5F3xuiMntz04j9tP7LrsHWPr0zVqoxe3n3jiIxUicgvwfrdqyGC ve8rTKw4v3l6R5T5xDR7ifCrvYIGfiM= Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-168-kxM0z5bjNR2Xd42woqosOw-1; Mon, 17 Apr 2023 06:55:29 -0400 X-MC-Unique: kxM0z5bjNR2Xd42woqosOw-1 Received: by mail-pl1-f200.google.com with SMTP id h8-20020a170902f54800b001a1f5f00f3fso12771986plf.2 for ; Mon, 17 Apr 2023 03:55:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681728928; x=1684320928; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PSWY+qWbuq+rvFfC0bc7UB79m/QSzFUkpSu8Wms8t2A=; b=IvOD4R3fI9DEeZGQaDFoWM3uFx5Ve/tLs6jJhNhv3eqCsQWf5BLSE4V0SfZ2E63aLC Pr3uhnbh0OXUh2QhVQNaWIXerFEbk/2xxpJJMQwG4UzXiV6lae9l4KmDPKerrlvtMaln 4E/32g130k3Cmw2mgLuECOxgp3nfwl5dodNBkRyN6LwCHhe/XN5CHt8l/tRoUL6m4mE3 pzQ5vc7x1jU9EkrxF+rH7SGW8l9G55Ek/3dIkwg95iX0ZwIskdzn3hMS3SlHTjU5jnh1 gFOanBzT4kMWETp59mjBbCIKsmRDaQ5z7e5ILGe6FPBWvQowpzgFWdcdNH/+CFYSN4ec GF1A== X-Gm-Message-State: AAQBX9cmbxInKtc5LLDEZ9hKxaYj0lvKZCXR8U1bHUKY2AyeQDmhok0J qY5eN7Y+PeFhKx9OVQvytabBdxf2tGKp1fsyBWAJ7ozV/hjpx6hnMm6Pc6I6AyXPAF8N0jedQ46 b9SkIYW+Hr3GG6sSbEnvpZ0sGELxtOmDhcz/Ylw== X-Received: by 2002:a17:90a:2a8e:b0:247:2bf1:c0e3 with SMTP id j14-20020a17090a2a8e00b002472bf1c0e3mr12464793pjd.37.1681728927896; Mon, 17 Apr 2023 03:55:27 -0700 (PDT) X-Google-Smtp-Source: AKy350YUqCxVrl70GWXMjLLGZ+jkLBUDBHEfISWXB2+RNAFc2sngD0D5fUj0SfZ8jchnmeeRFWIydHcZbQHepj7KdVU= X-Received: by 2002:a17:90a:2a8e:b0:247:2bf1:c0e3 with SMTP id j14-20020a17090a2a8e00b002472bf1c0e3mr12464776pjd.37.1681728927540; Mon, 17 Apr 2023 03:55:27 -0700 (PDT) MIME-Version: 1.0 References: <20230416184833.391586-1-tom@tromey.com> In-Reply-To: <20230416184833.391586-1-tom@tromey.com> From: Alexandra Petlanova Hajkova Date: Mon, 17 Apr 2023 12:55:16 +0200 Message-ID: Subject: Re: [PATCH] Remove error_stream To: Tom Tromey Cc: gdb-patches@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="00000000000055bbb405f98607f0" X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000055bbb405f98607f0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Apr 16, 2023 at 8:49=E2=80=AFPM Tom Tromey wrote: > error_stream is trivial and only used in a couple of spots in > breakpoint.c. This patch removes it in favor of just writing it out > at the spots where it was used. > --- > gdb/breakpoint.c | 4 ++-- > gdb/utils.c | 6 ------ > gdb/utils.h | 2 -- > 3 files changed, 2 insertions(+), 10 deletions(-) > > diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c > index 46287da5f87..baf49e4461f 100644 > --- a/gdb/breakpoint.c > +++ b/gdb/breakpoint.c > @@ -3137,7 +3137,7 @@ update_inserted_breakpoint_locations (void) > if (error_flag) > { > target_terminal::ours_for_output (); > - error_stream (tmp_error_stream); > + error (("%s"), tmp_error_stream.c_str ()); > > I was considering using it in my "defer warnings when loading separate debug file" but it wasn't suitable, it seems it doesn't have many use cases indeed. --00000000000055bbb405f98607f0--