From patchwork Thu Sep 10 16:04:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 1361672 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=adacore-com.20150623.gappssmtp.com header.i=@adacore-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=o53DZV2K; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 ozlabs.org (Postfix) with ESMTPS id 4BnNy112ZPz9sPB for ; Fri, 11 Sep 2020 02:04:56 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BB2C5385042C; Thu, 10 Sep 2020 16:04:53 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id A85F33857C50 for ; Thu, 10 Sep 2020 16:04:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A85F33857C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=botcazou@adacore.com Received: by mail-wr1-x430.google.com with SMTP id m6so7358055wrn.0 for ; Thu, 10 Sep 2020 09:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=GYwlhoIZF/Rrj5+lCSrnQoR7kWfSfDF3u4nFoX/fvJg=; b=o53DZV2KV5p2anS6t/5vJw7nFXstMlgpw+/3Kb4ZpEw968m64wzCHxHru1spyqBPwl /+kUcjipDX7MdSQE1aBdIVzYAf4tSp1+FZIhPlHF9i2IycYP5hxJKa5Rk5xsOjxHIzJR Nq8BKLjGPz+35DUM+lhwkpPwB/JmIeRnw/xSKwe3FxFaP7oXbr5HaYDQlatxfPeBJ9ZK 7KDWCYVSpThIz/gNMb7GfBBBd4Ps4x6B8lXtkgF1nFgUvdODOVUrJy6bBVdCgvNMJUDe yEdyFFVnCa6uDLs9Octu+piqUyUqzb9pGtxPOJme2ES9h5lxBQQkPcoDscLw0EwnvsgB 7s1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=GYwlhoIZF/Rrj5+lCSrnQoR7kWfSfDF3u4nFoX/fvJg=; b=ECnorUYT7hWlH3/86PIwtf4iQOTSYPE+1VlM18aThIr/xBpG2EHFClKkREt02Tzf8g Cc01hOSB2oOl30AOoLKY68EeJLK/V8Py2qB/2Mmk0QqeCgUbOR4P8JR8zJ9GaTkc4DQA Ci7BlHpxMuAzvBHdY7GOAc++iamXb0a1FxyhNJZV+mdMulccZFHKWPCXO+rag8K/Oncl aciA4h5n8kX3cU5AaxLiktW4Hm7ciJhANJqPXquTv3laeW24HFFTJse24LiQCcvEamV+ KNFLKUoOjjg7Sfh6VsgTyLvcCufdEEQNE/v8fnSvjt6P13pXMaqYIAV2qFmdb+NfQ2j4 QkvA== X-Gm-Message-State: AOAM531RjJx2lNcqLS8JWVeWIs2ShjqDIuceC+wu6/lthY0V2yuLvAUm wEkau6/x1m7SUbb73z/aszNEYdP6GqrrRMG6 X-Google-Smtp-Source: ABdhPJzb1sctmBlSjnTBZNQVTgOBRi9WBM0Lh08a4eKBTCtus/OXZ9/QVxSSizLMqYPN2H5035UZFA== X-Received: by 2002:adf:f44d:: with SMTP id f13mr9815703wrp.224.1599753890494; Thu, 10 Sep 2020 09:04:50 -0700 (PDT) Received: from fomalhaut.localnet ([2a01:e0a:41b:9230:7f82:53f4:769e:54b6]) by smtp.gmail.com with ESMTPSA id s11sm9790501wrt.43.2020.09.10.09.04.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Sep 2020 09:04:49 -0700 (PDT) From: Eric Botcazou X-Google-Original-From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [Ada] Add emergency dump after an ICE Date: Thu, 10 Sep 2020 18:04:47 +0200 Message-ID: <2117384.avN8M3Yhio@fomalhaut> MIME-Version: 1.0 X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" This is only for internal debugging purposes. Tested on x86_64-suse-linux, applied on the mainline. 2020-09-10 Eric Botcazou * gcc-interface/misc.c: Include tree-pass.h. (internal_error_function): Call emergency_dump_function. diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 3999f9cc2be..183daf33fb6 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -35,6 +35,7 @@ #include "stor-layout.h" #include "print-tree.h" #include "toplev.h" +#include "tree-pass.h" #include "langhooks.h" #include "langhooks-def.h" #include "plugin.h" @@ -307,6 +308,9 @@ internal_error_function (diagnostic_context *context, const char *msgid, /* Warn if plugins present. */ warn_if_plugins (); + /* Dump the representation of the function. */ + emergency_dump_function (); + /* Reset the pretty-printer. */ pp_clear_output_area (context->printer);