From patchwork Wed Aug 21 15:05:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 96240 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3D094386F83E for ; Wed, 21 Aug 2024 15:04:37 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id D0EAE385DDDA for ; Wed, 21 Aug 2024 15:04:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D0EAE385DDDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D0EAE385DDDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724252659; cv=none; b=JHatajO4TLXvuDRcB3qWP8F99IiTzg/3EMnKTmgh2OJ08ezLugp3YioOKDs6HZI0BJdSgJNHLHnYH2S/yBsJTQS5HPZv4OAj/beB3mFB4M0pBSRcj2VhXNkK/AoUjOVqfUzl6e8ZA/BdvKPx3sPry9LJqscnM5+eJkTCtqA1g9U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724252659; c=relaxed/simple; bh=j9gv5UMu31C2G6OZ+nAZPx1rxA1UZnmeUCzIlzbygbM=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=HmsvYS3N8BtwvsaYJVjv0obwrzALqf+UfpCQoU8sMTMg8jHB75DSo4hiG3kwtKme8myyImAmeTBPJxj2V0SfCpHB+PV3CmFXVk+uzSdNRk4kV6fUT46YoR3sr7rpCADLxCf3Gh7xSVeuZmwifadOgfT3jtK9WIQUNdbaN+JnIEI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CBB3E21AD4 for ; Wed, 21 Aug 2024 15:04:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724252656; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WL8/tWewm/waeuk6WmW+iw1baPrvcqAWHO/eOmx3HIQ=; b=0BsJ3THFREscEijOLWGsN/k2E8tK2YX/FSWVQ7Kn5gXDAcdN3w9Sv/z6GU720zJPwnCxDo bfWhUh0p8/cKsP2ORE2BgzLpIOv15UMrUk1sQAnNPqriwZ/9HXXyduVL45qFkRaaMPeH1Q Sm0fOWjRUzSXI9JozdWwLB4adCrpIS0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724252656; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WL8/tWewm/waeuk6WmW+iw1baPrvcqAWHO/eOmx3HIQ=; b=yA9Dii/+gT7neSwxSHlwBx43U9g/nYsemzZexxMALQRvpsa4qNfFPrBbD6dXpCnTyd5+by cpzVs9Wr9dc8ejCQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724252656; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WL8/tWewm/waeuk6WmW+iw1baPrvcqAWHO/eOmx3HIQ=; b=0BsJ3THFREscEijOLWGsN/k2E8tK2YX/FSWVQ7Kn5gXDAcdN3w9Sv/z6GU720zJPwnCxDo bfWhUh0p8/cKsP2ORE2BgzLpIOv15UMrUk1sQAnNPqriwZ/9HXXyduVL45qFkRaaMPeH1Q Sm0fOWjRUzSXI9JozdWwLB4adCrpIS0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724252656; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WL8/tWewm/waeuk6WmW+iw1baPrvcqAWHO/eOmx3HIQ=; b=yA9Dii/+gT7neSwxSHlwBx43U9g/nYsemzZexxMALQRvpsa4qNfFPrBbD6dXpCnTyd5+by cpzVs9Wr9dc8ejCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B3CCC13770 for ; Wed, 21 Aug 2024 15:04:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 4Mp5KvABxmbLQQAAD6G6ig (envelope-from ) for ; Wed, 21 Aug 2024 15:04:16 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH] [gdb] Add & in catch in svr4_handle_solib_event Date: Wed, 21 Aug 2024 17:05:07 +0200 Message-Id: <20240821150507.26543-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,imap1.dmz-prg2.suse.org:helo]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org In svr4_handle_solib_event I noticed: ... catch (const gdb_exception_error) ... This seems to be the only place were we do this, elsewhere we have: ... catch (const gdb_exception_error &) ... I suppose the intent of adding '&' is to avoid a copy. I'm not sure if it's necessary given that it's an unnamed const parameter, but I suppose it can't hurt either. Add the '&' here as well. Tested on x86_64-linux. --- gdb/solib-svr4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 28c3bf55f0f9aca8619c6d01be34a02a887c5577 diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index 1a0e5424806..ff5887a221d 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -1948,7 +1948,7 @@ svr4_handle_solib_event (void) { link_map_id_val = pa->prob->evaluate_argument (0, frame); } - catch (const gdb_exception_error) + catch (const gdb_exception_error &) { link_map_id_val = NULL; }