Message ID | 20230928174630.4004388-2-tromey@adacore.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3490453vqu; Thu, 28 Sep 2023 10:48:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEuTNoldqY19EtrmwaX7qb730JQT4i8af/HlgSkcPZP0iKENQ4lZFYTUg+9rFOCqfm1UqWf X-Received: by 2002:a17:906:32d0:b0:9b2:7148:dd59 with SMTP id k16-20020a17090632d000b009b27148dd59mr1429427ejk.37.1695923312687; Thu, 28 Sep 2023 10:48:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695923312; cv=none; d=google.com; s=arc-20160816; b=bY0eobDxT3TdRsJQUcZbx4rNNc/6LF5LjbWKM5riBg1+KgGAPDJ3X4pK7IVUUhBOrA LO+RWJ62iRblQSuhqzoIuLwg+N9O9JoxeZBIxjkm8VxuqMJlAVdIGl5Gp16litXORbRo XdzS1t33BPuhlo4nSwytY5NsWRh4hbLfacFk79+phJtQxOtRkScBMVF/2Gc5F8wOMgcJ nmrlf30mpyd+vzMTF8UAjlsHlNfiabQiROTcKqTq2BL5ijbaVAC/mWL+PsZSzGZr+jJ3 KHdLCaERyEj2HSzpUDKdO6ieT0nQY35hDkDYwU7ZQXUvkj1WWafM5PqKI8qbxdIObCBw l/HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dmarc-filter:delivered-to; bh=Wkx5TAFMXgHmrNT4Ym/GBEV6jN5nNGT4eiyT0cvi1pA=; fh=Ogh3zaPUNpdNYHofIVNHsbX+D3lwaT1T8Jhe/MolwAA=; b=VJkebzcoLe4iuHjspts9/Lp7kTVlupK7VhQKSSh1tqaVaa0nsXY4/BoLR5Kn0rCode TQv/F+yEw6qQdoNWSYHo76unu8712SSPokYI/FtAFHmr55xdQ/qf8+m5WgJJ9r9KZp65 eITWJkG6r/JY0zROYa07ffymHk/+JZEewjWW51TrDr13nCzXtbJUY2AxEd9puvDSjq4W 4+INE/VDy4RlyyZjgxTQnS/4V4tA5aLs9pJGwRMA9ZDOqB9bzwOPwH0ZusEiSlweSsHL oF2oBPYgGugGl6x0OPegSqELuEI9nvd6T08EkAxOmqv5LUWrvpqk4y9KEbNGG51h9DPp CS5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b="VF/YIHJV"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id h11-20020a170906590b00b009ae4f7c9743si15975593ejq.980.2023.09.28.10.48.32 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 10:48:32 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b="VF/YIHJV"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A81633882AC7 for <ouuuleilei@gmail.com>; Thu, 28 Sep 2023 17:47:13 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id 5C6373858402 for <gcc-patches@gcc.gnu.org>; Thu, 28 Sep 2023 17:46:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5C6373858402 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-350fbd09d8bso42986655ab.0 for <gcc-patches@gcc.gnu.org>; Thu, 28 Sep 2023 10:46:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1695923201; x=1696528001; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Wkx5TAFMXgHmrNT4Ym/GBEV6jN5nNGT4eiyT0cvi1pA=; b=VF/YIHJVdHW+9L/66GBsLlMio3uxzSHrN+QDAJ4+xeTlAzJ6UffMa2IBYcz2y2+8YM HT7+193UmDCwPitZgDosz9t9r0H4RBw+d4rrVtb4LV5XZSPqgYg0ypJ2vHyP7MjD8TJF cunvENbXYdSWc8pWh5nAVDJTh5rTXpG0v3r6PGBgsGDi7u8I1TYmAk9wlkys0VUpaP34 tjcLbsMc8z8l16rE8FLAL6zKnIquaCM6C+M09XN6fcCECvYonURSi1HqVmdomovxh3gE syMsVLElJ3MCRPYohODh2Egs18dfn8gNOQdm4ltvb8talTDENE97pyYHT44a5W9OVbzc kZRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695923201; x=1696528001; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wkx5TAFMXgHmrNT4Ym/GBEV6jN5nNGT4eiyT0cvi1pA=; b=pO/3izlYQHQS40fI0M42Qil9MnifmV16kC6UVbJSh+kEJ6O16GG+zNj4Lr21vFm4Gr iDorN5iatUo6Vd1S6CpNzUkZoQUn5/QD4pMdpP+cZbpdkDtk/CsK1jKA8CujjGsXNt+g SYp2RhpOLU5YLaoBEM+2doJB+O+wK27pwNRMW/qSUqP9nrRIIC4H5pSWTK9p1Rmy+Z3Z 97v+D2JQNkNKUGUUEIKfvmWKhSAJLACT2qmddMnzJTVf8tVmkWRL4Z1EREciuVdeKMq6 /T8pfNGIlRGMx3DAacDWS8zVUei3c+IAcHQQty9HbHkpdOUocJqVnl/3vu9CBJc/DOL2 n/nw== X-Gm-Message-State: AOJu0YxBrw+8jUvro3CnrTfXvnub+VXJ+xkrn0NO6OSJ+/IZ0j8w9BMl VrDK6EJvaQdxQDdPCa08ze3Fw5pMB18XHg6raZ94jw== X-Received: by 2002:a05:6e02:1112:b0:351:80c:bc29 with SMTP id u18-20020a056e02111200b00351080cbc29mr1740324ilk.17.1695923201626; Thu, 28 Sep 2023 10:46:41 -0700 (PDT) Received: from localhost.localdomain (71-211-130-31.hlrn.qwest.net. [71.211.130.31]) by smtp.gmail.com with ESMTPSA id p6-20020a92d486000000b0034fc8c1c24fsm3450963ilg.54.2023.09.28.10.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 10:46:41 -0700 (PDT) From: Tom Tromey <tromey@adacore.com> To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, Tom Tromey <tromey@adacore.com> Subject: [PATCH 1/7] libstdc++: Show full Python stack on error Date: Thu, 28 Sep 2023 11:46:24 -0600 Message-Id: <20230928174630.4004388-2-tromey@adacore.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230928174630.4004388-1-tromey@adacore.com> References: <20230928174630.4004388-1-tromey@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778304483758705321 X-GMAIL-MSGID: 1778304483758705321 |
Series |
libstdc++: Use gdb.ValuePrinter in pretty-printers
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Tom Tromey
Sept. 28, 2023, 5:46 p.m. UTC
This changes the libstdc++ test suite to arrange for gdb to show the full Python stack if any sort of Python exception occurs. This makes debugging the printers a little simpler. libstdc++-v3/ChangeLog: * testsuite/lib/gdb-test.exp (gdb-test): Enable Python stack traces from gdb. --- libstdc++-v3/testsuite/lib/gdb-test.exp | 2 ++ 1 file changed, 2 insertions(+)
Comments
On Thu, 28 Sept 2023, 18:48 Tom Tromey via Libstdc++, <libstdc++@gcc.gnu.org> wrote: > This changes the libstdc++ test suite to arrange for gdb to show the > full Python stack if any sort of Python exception occurs. This makes > debugging the printers a little simpler. > Oh I wish I'd known about this sooner. OK for trunk, thanks. > libstdc++-v3/ChangeLog: > > * testsuite/lib/gdb-test.exp (gdb-test): Enable Python > stack traces from gdb. > --- > libstdc++-v3/testsuite/lib/gdb-test.exp | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libstdc++-v3/testsuite/lib/gdb-test.exp > b/libstdc++-v3/testsuite/lib/gdb-test.exp > index d8e572ef7b3..af7d970d388 100644 > --- a/libstdc++-v3/testsuite/lib/gdb-test.exp > +++ b/libstdc++-v3/testsuite/lib/gdb-test.exp > @@ -141,6 +141,8 @@ proc gdb-test { marker {selector {}} {load_xmethods 0} > } { > puts $fd "set auto-load no" > # Now that we've disabled auto-load, it's safe to set the target file > puts $fd "file ./$output_file" > + # See the full backtrace of any failures. > + puts $fd "set python print-stack full" > # Load & register *our* copy of the pretty-printers > puts $fd "source $printer_code" > puts $fd "python register_libstdcxx_printers(None)" > -- > 2.40.1 > >
diff --git a/libstdc++-v3/testsuite/lib/gdb-test.exp b/libstdc++-v3/testsuite/lib/gdb-test.exp index d8e572ef7b3..af7d970d388 100644 --- a/libstdc++-v3/testsuite/lib/gdb-test.exp +++ b/libstdc++-v3/testsuite/lib/gdb-test.exp @@ -141,6 +141,8 @@ proc gdb-test { marker {selector {}} {load_xmethods 0} } { puts $fd "set auto-load no" # Now that we've disabled auto-load, it's safe to set the target file puts $fd "file ./$output_file" + # See the full backtrace of any failures. + puts $fd "set python print-stack full" # Load & register *our* copy of the pretty-printers puts $fd "source $printer_code" puts $fd "python register_libstdcxx_printers(None)"