From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127541 invoked by alias); 7 Feb 2017 08:05:18 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 127527 invoked by uid 89); 7 Feb 2017 08:05:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=sk:MD_FALL, sk:md_fall X-HELO: mail-yw0-f194.google.com Received: from mail-yw0-f194.google.com (HELO mail-yw0-f194.google.com) (209.85.161.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Feb 2017 08:05:07 +0000 Received: by mail-yw0-f194.google.com with SMTP id u68so8875678ywg.0 for ; Tue, 07 Feb 2017 00:05:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xiLK2kwXc0vDGaubLOyKA9DRXlvK9lS2N2yKFb+DVew=; b=Kipi5/76/1RpgFvZLyhqjAjLv0A2Au707KZDeTqYkeP++M80SzBogoxJrOLsdklZBT JE/8yXNoPcv9tUaicr0aulCYtKIf9NOYo5rv+9TZ9xJ2kNcKCHwg38OUrvWqWpNLwBA4 szMEcrLcaFtdhINYk2RgfZws2hiDMfGp2bhDYkKcQ/Ww8mmoB2pQrHyWdbH04nkf8vxG zeHynhTlZZJ9dY4PCuxLGLzOKExy6jhHKaXyoztiTT7TyRmdPlCscG1MmwC3VyeubO9Z yn5nxm4ltuXyg1FjikUG+D2NzowZIhjnC8sD00ajDqVlEx7tH1CvPw6JqEBX3YHGBAU4 cEiA== X-Gm-Message-State: AIkVDXKblqts7Jt/nGbYgLpU3am/z2MUBjvidAmqF4ycdDXeqmFJm8CF8goKWZJAHwsMRjO6Lb7Z5jhsaDVE3w== X-Received: by 10.129.153.19 with SMTP id q19mr10726287ywg.186.1486454706004; Tue, 07 Feb 2017 00:05:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.164.199 with HTTP; Tue, 7 Feb 2017 00:05:05 -0800 (PST) In-Reply-To: <21a21388-b1d9-816c-377e-d4e084cc399e@redhat.com> References: <21a21388-b1d9-816c-377e-d4e084cc399e@redhat.com> From: Nitish Kumar Mishra Date: Tue, 07 Feb 2017 08:05:00 -0000 Message-ID: Subject: Re: Issue with Latest GDB on AIX with GCC-6.12 To: Pedro Alves Cc: David Edelsohn , "gdb@sourceware.org" , Yao Qi Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00001.txt.bz2 Hi All ! As Pedro suggested to have some print statements in "catches" blocks to identify the frame that can't be unwound, I did try that. Most of the functions didn't have the try-catch except, gdb_rl_callback_handler () gdb_rl_callback_read_char_wrapper () gdb_rl_callback_read_char_wrapper_noexcept (), where I put the print statements but during execution none of these print statements get executed. In the function: static void gdb_rl_callback_handler (char *rl) noexcept { struct gdb_exception gdb_rl_expt = exception_none; struct ui *ui = current_ui; TRY { ui->input_handler (rl); } CATCH (ex, RETURN_MASK_ALL) { gdb_rl_expt = ex; } END_CATCH I tried calling command_line_handler () without function pointer (as it seems that it is a known issue with AIX and function pointers), but again it didn't help. Thanks, Nitish On Tue, Jan 31, 2017 at 6:38 PM, Pedro Alves wrote: > On 01/29/2017 01:11 AM, David Edelsohn wrote: > >> Note that std::terminate() is called specifically because there was an >> unwind failure and no handler was found in eh_throw.cc in libsupc++ >> (part of libstdc++). > > Right, that's what makes it look like either an runtime unwinder, > or unwind info bug. > >> Is this code trying to propagate an exception through a signal >> handler, in which case GCC MD_FALLBACK_FRAME_STATE_FOR needs to be >> tweaked to find more AIX kernel signal handler signatures. > > Nope, it's just normal C++ frames all the way from the throw to > the "catch" that should catch the exception. > > (GDB stopped throwing from signal handlers before we flipped > the C++ switch, with: > [PATCH 00/30] Stop throwing exceptions from signal handlers > https://sourceware.org/ml/gdb-patches/2016-03/msg00351.html > ) > > I'd suggest progressively hacking in "catches" to frames > closer to the throw in question helps identify the frame that > can't be unwound. Like, sprinkling in a few: > > try > { > ... > } > catch (...) > { > printf ("%s:%d: got here\n", __FILE__, __LINE__) > throw; > } > > Thanks, > Pedro Alves >