From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id jLFHNyLTqmWr/AAAWB0awg (envelope-from ) for ; Fri, 19 Jan 2024 14:53:06 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DDfjQ180; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D1DAA1E0C3; Fri, 19 Jan 2024 14:53:06 -0500 (EST) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id BB1031E092 for ; Fri, 19 Jan 2024 14:53:04 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5F03F385E444 for ; Fri, 19 Jan 2024 19:53:04 +0000 (GMT) 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 1D4B23858C2D for ; Fri, 19 Jan 2024 19:52:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1D4B23858C2D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1D4B23858C2D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705693967; cv=none; b=JQjq8hcU46mLo382OIyxiHK9vNN0l/Kq9+lyyoSUTykThvoYSY6PaZSbf8w+TqAMhjYPK3iq86FRp6N3TZBwS9/qkI5rZTr/todYAWR8OpyLZAmlmHaG+ry4Y0jTHcR0hGUZzWkM+HOoVkntKCDYXXwbcTb9+3ZbYto9or4ty7E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705693967; c=relaxed/simple; bh=Hqpt4ku089q165nCZZpQVcl2RrqxEA/kOPWc3jkRtj4=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=QIKAhgBNrgEu0leFULfDOQS9KUz7Emly/65F3Syi3ONdaPkWoQNcLny4yGUcMzV+6VbBLoFEV5de7pbhCfdIquMMJUjnGTf1uXEUGk+oCA9mBfRtuuggmFl43cThHRQ80eu4Ul72hg8m93EuOgETmfzR/3Dtj/5kU90627oPa0k= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705693964; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Hqpt4ku089q165nCZZpQVcl2RrqxEA/kOPWc3jkRtj4=; b=DDfjQ180mwvFdaQZdJEt7HBa03+4jIZT6wOmh3Cus/An0noCpFbrTIktLEIKZwxu9+FFyh SegkoTP86BSUq14N21FIbb8OM9H7Awt/8JRgciKjq4yRJOARx/mFXmQ07/Ew3QGS9vOnxa Ys7jUhyZbX2k08Q4xY4iMnp4VKPNmTw= Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-542-U2KePuWyPUmXTEtcIegaFg-1; Fri, 19 Jan 2024 14:52:43 -0500 X-MC-Unique: U2KePuWyPUmXTEtcIegaFg-1 Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-2905ee6b25eso483494a91.0 for ; Fri, 19 Jan 2024 11:52:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705693962; x=1706298762; h=content-transfer-encoding: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=Hqpt4ku089q165nCZZpQVcl2RrqxEA/kOPWc3jkRtj4=; b=aeXOqSSek5sZaBOgyguEqUQ/JfSiTmjw3PUNYigJQi8ucF2XBG39xHpXSJKcfkjr8u 9x5bs6q245W5UCOy/JeAERsc95V+JYMhICq4ZgRqQLElYUDxNbY2HvFLiWjBz1QeX9xh myRB03zATHaJRjHqLOMyABemkpm6eVb/bQhZckEUdDDuKnQCc8fE9yrIus4aWrXZDm7a zLoAQnKVRpvCx20kLvUMPGcJzBtsGgN7wEVSG5P8DG9nSeT9vw5t7fK6u39gb+lKsnHB ESDNQe4DLe7RA1pqyoKxwI2eeRB2gIo7YpxRdQakQoj5ljbYIgr+xPWAknL1VKPwrSPa B2Qg== X-Gm-Message-State: AOJu0Yy+nl7w2oC8OBApdRwCLP/TJI0hsc493s5Ac0Gq/qcCr5LyuUEB 4oj8xmW6ITqsA7EOUGbAc4nI8fK4d8z09w6cSTQeR4LOgMw0sG6ZUZMNfIdMehwbFR1roXkZ7mN S3chNIR163GaXEMUc1EZqS5PJZtGVfJlI420d3AMtZADKF2NuLh9Y1YRHOEf5YhawxsKsNpxJN5 ITJsr8Boj/mw+2oEoYWLzBeyQi3U3Nht9a X-Received: by 2002:a17:90a:fd91:b0:28e:1ede:4e32 with SMTP id cx17-20020a17090afd9100b0028e1ede4e32mr308983pjb.78.1705693962133; Fri, 19 Jan 2024 11:52:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiK44A7gtN4oaj54SBAu/1FN3YhsUppAbQg61nh18mg/tVDnTH6ZrSljrZzuDMmSckTXUf626ucC7E8wECA3A= X-Received: by 2002:a17:90a:fd91:b0:28e:1ede:4e32 with SMTP id cx17-20020a17090afd9100b0028e1ede4e32mr308976pjb.78.1705693961888; Fri, 19 Jan 2024 11:52:41 -0800 (PST) MIME-Version: 1.0 References: <35826cb5-1ff6-4101-9105-ffb9512e7b44@arm.com> <20240119171352.827651-1-amerey@redhat.com> <6fb49b9c-691a-4a65-9af5-844b31a534af@suse.de> In-Reply-To: <6fb49b9c-691a-4a65-9af5-844b31a534af@suse.de> From: Aaron Merey Date: Fri, 19 Jan 2024 14:52:30 -0500 Message-ID: Subject: Re: [PATCH 1/4 v8] gdb: Buffer output streams during events that might download debuginfo To: Tom de Vries Cc: luis.machado@arm.com, aburgess@redhat.com, thiago.bauermann@linaro.org, gdb-patches@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 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+public-inbox=simark.ca@sourceware.org Hi Tom, On Fri, Jan 19, 2024 at 2:33=E2=80=AFPM Tom de Vries wro= te: > > what you're describing here sounds like exception slicing. > > The easiest way to fix this is by rethrowing using "throw" without argume= nt. > > See this ( https://en.cppreference.com/w/cpp/language/throw ): > ... > When rethrowing exceptions, the second form must be used to avoid object > slicing in the (typical) case where exception objects use inheritance: ..= . Gotcha, thanks for clarifying. I wasn't aware of the second form of throw. Aaron