From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by sourceware.org (Postfix) with ESMTPS id F1051386F427 for ; Wed, 26 Aug 2020 17:20:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F1051386F427 Received: by mail-qk1-x72e.google.com with SMTP id n129so2666231qkd.6 for ; Wed, 26 Aug 2020 10:20:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KldCh5Fq7bUIL5z8F+UduenWUYzYGiZjsp8+mL2I5to=; b=IlGafefwZ5pNdQhWbnsRpcWgQfrfsYZZnttVRO2YpBV6cmyfUgQYhtfM88XqmU+4+9 b2w/4zG+m2IICxp38A72mwdnYEYazthtkP6lxGOPjr85vFLXHy8/C3Wk95Xp+S1PEWmo 6a9hZqRWl6coFzPzo5wwO2xbj5OHXubkHnotgKiJp1U0GZZeYKy+Tv93L03U2hF2m32x irixzoTgtIrglFlErTrjJNiGE+cqi1Kc3QZ77KKaAvBO8uTUr1vqfD3DsnPMqsN4VCHW meutkDTX6v0tDHBhEQtllKuTHoEtDacGfB6DeUWN63/hMVC1WFXDNqjRbEQJhy59iIEB DFYg== X-Gm-Message-State: AOAM5305VdA+vZlHUf7TPbyN++KOP+0VuI5U7DgiFs+dw+T6fGbShsap EXkYZb6ODO0wgA9OyyxED0rzXDG5Boy8UA== X-Google-Smtp-Source: ABdhPJycFIFQ+d2/TCNcwfnG2CWCsHXZzzPvVFO4ATI22TSGjdWO8+fvU3nn3vY1f51S5uAeVEDgCw== X-Received: by 2002:a37:a250:: with SMTP id l77mr4244336qke.54.1598462412410; Wed, 26 Aug 2020 10:20:12 -0700 (PDT) Received: from [192.168.15.10] ([191.251.12.80]) by smtp.gmail.com with ESMTPSA id f3sm2383048qth.56.2020.08.26.10.20.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Aug 2020 10:20:11 -0700 (PDT) Subject: Re: [committed][gdb/testsuite] Add gdb.base/eh_return.exp To: Tom de Vries , gdb-patches@sourceware.org References: <20200816113123.GA29297@delia> From: Luis Machado Message-ID: Date: Wed, 26 Aug 2020 14:20:08 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200816113123.GA29297@delia> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2020 17:20:14 -0000 On 8/16/20 8:31 AM, Tom de Vries wrote: > Hi, > > In PR25350, an internal error was reported: > ... > (gdb) break *eh2+0x7e > Breakpoint 1 at 0x13e2: file small.c, line 38. > (gdb) run > Starting program: a.out > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/usr/lib/libthread_db.so.1". > > Breakpoint 1, 0x00005555555553e2 in eh2 ( > frame.c:558: internal-error: frame_id get_frame_id(frame_info*): \ > Assertion `stashed' failed. > A problem internal to GDB has been detected, > further debugging may prove unreliable. > ... > > The internal error does not reproduce after recent commit 547ce8f00b > "[gdb/backtrace] Fix printing of fortran string args". > > Add the corresponding test-case as regression test, given that the code is > rather atypical. > > Tested on x86_64-linux. This doesn't work so well on aarch64-linux because the breakpoint location from before running the program doesn't exists after running it. Things get relocated. -- (gdb) break *0x000000000000099c^M Breakpoint 1 at 0x99c: file /home/luis.machado/work/tcwg/build/binutils-gdb-master/gdb/testsuite/../../../../repos/binutils-gdb/gdb/testsuite/gdb.base/eh_return.c, line 54.^M (gdb) PASS: gdb.base/eh_return.exp: setting breakpoint at *0x000000000000099c run ^M Starting program: /home/luis.machado/work/tcwg/build/binutils-gdb-master/gdb/testsuite/outputs/gdb.base/eh_return/eh_return ^M Warning:^M Cannot insert breakpoint 1.^M Cannot access memory at address 0x99c^M ^M (gdb) FAIL: gdb.base/eh_return.exp: hit breakpoint -- Shouldn't we insert a breakpoint after the relocation has happened? Or add the breakpoint to a symbolic reference?