From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 18F593858C20 for ; Fri, 11 Mar 2022 02:28:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 18F593858C20 Received: by mail-wm1-x32e.google.com with SMTP id r187-20020a1c2bc4000000b003810e6b192aso4574650wmr.1 for ; Thu, 10 Mar 2022 18:28:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=X+TWF7k+jzviiy03SWDN8DS+rMLuFSAZwWgPDIdajYo=; b=jCSmxU/4NRK+qVnFD0WDOXBikOvqSU10UBLFIhTkdQRH2/h+Tyx382bteMzwO1xbjQ RhbvB3e5A0SYtG6U+SthnmUNi/Xkso7p4IXGgNYQ49vttYKdOIFaAj1DJRGmx5BbkXXZ UAcB6gVgd3wbSTOA7+X38xxoyPdnom4kKzM4W1sCcukWIKy3Ybqqix4KaQYXY3poGdwt BY0aO6VzzZg72GBG/nkcrEu5gNm+s5USf1hFYa/xWQwDE6fxCaiMSNuCA9e0FaKpYRhD /GZ2xydEvhq5UUWtjvm8zhd+1sg3vhyhUHbuICW2tD+UWEq53QdG9YgtDy/H1PsDbXAA ExhQ== X-Gm-Message-State: AOAM533vkOFn31MwGcCvuzVDf1DBSEq+ZBcD7xmfcLIkiaMLzS3V5ObS PCMJu8fW6Mj3yCGkziP/miJf X-Google-Smtp-Source: ABdhPJwRX8LdQkHbEnjbBWkRVc04wyY+zpN2K/8Ws/FIgn28xPL7tAYkBeWjOlagWmwD/aB6Zc06Hg== X-Received: by 2002:a05:600c:4f0e:b0:389:eb27:581f with SMTP id l14-20020a05600c4f0e00b00389eb27581fmr1171465wmq.132.1646965720780; Thu, 10 Mar 2022 18:28:40 -0800 (PST) Received: from takamaka.home ([2a01:cb22:1d5:1100:fc64:da65:1879:8c67]) by smtp.gmail.com with ESMTPSA id 11-20020a05600c26cb00b0037ff53511f2sm8585260wmv.31.2022.03.10.18.28.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Mar 2022 18:28:40 -0800 (PST) Received: by takamaka.home (Postfix, from userid 1000) id 833B2A4AD3; Fri, 11 Mar 2022 06:28:37 +0400 (+04) Date: Fri, 11 Mar 2022 06:28:37 +0400 From: Joel Brobecker To: Carl Love Cc: Joel Brobecker , gdb-patches@sourceware.org, Rogerio Alves Subject: Re: [PATCH] Powerpc fix for gdb.base/ending-run.exp Message-ID: References: <479011be1a832692f38293ebf6f9cc0fd18315fa.camel@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Fri, 11 Mar 2022 02:28:43 -0000 Hi Carl, > > > Starting program: /home/carll/hello_world > > > [Thread debugging using libthread_db enabled] > > > Using host libthread_db library "/lib/powerpc64le-linux- > > > gnu/libthread_db.so.1". > > > > > > Breakpoint 1, 0x0000000100000818 in main () > > > (gdb) n > > > Single stepping until exit from function main, > > > which has no line number information. > > > Hello, world! > > > 0x00007ffff7d01524 in ?? () from /lib/powerpc64le-linux- > > > gnu/libc.so.6 > > > > Do you know what code we're inside of, by any chance? > > In particular, can you confirm that it is normal that we don't > > even have a minimal symbol for this code? [...] > Anyway, it does appear that once you step off of the test program you > end up in function __libc_start_call_main. Good to know. Perhaps you could mention that in a comment inside the block handling this scenario. > > ... I would set program_exited instead of program_exited_normally. > > In fact, I think there was a confusion about this, since > > program_exited_normally gets unconditionally set just a few > > lines below. > > I made the change you mentioned above and removed the additional > power gdb_test_multiple clause below. The test also passes with these > changes. OK, good. > The error occurs on Ubuntu on Power 10. Per a suggestion, I tested the > patch on a Red Hat distro. The test passes fine there. Ubuntu puts > the debug info symbols in separate packages from the development > packages. I have been thru the list of available packages and tried > installing all the relavent packages to no avail. > > The guess is with the proper symbols available on Ubuntu, the test will > pass without my patch. Just don't know what the missing package is. I don't think this is a problem. For me, the testcase should be able to be adapt to the distro it is running on, and if it is running on a distro that doesn't allow the testcase to run properly, then it should handle it gracefully (ideally). > Per above, the second change does appear to be unecessary. What to do > about the first change? I haven't been able to sort out why I can't > compile gdb to match the distro behaviour. Maybe this patch really > isn't needed but it would be really nice to understand how to reproduce > the distro behaviour. If you have any thoughts as to how to configure > my build of gdb to achieve this that would be interesting. Let's go with the modified version of the first change. If you send it in for approval, and Cc: me on the email, I will try to review it quickly. -- Joel