From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15591 invoked by alias); 21 Apr 2018 14:59:56 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 15579 invoked by uid 89); 21 Apr 2018 14:59:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=rajendrasygmailcom, rajendra.sy@gmail.com, H*r:112 X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 21 Apr 2018 14:59:54 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w3LExlf4010835 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 21 Apr 2018 10:59:52 -0400 Received: by simark.ca (Postfix, from userid 112) id 7F7FA1EF60; Sat, 21 Apr 2018 10:59:47 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 8E9FA1E17E; Sat, 21 Apr 2018 10:59:45 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 21 Apr 2018 14:59:00 -0000 From: Simon Marchi To: Rajendra SY Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] [PR gdb/23095] Fixed test case to compile & run on FreeBSD In-Reply-To: References: Message-ID: <0eae05d2f22d863db5b7b5b890a76a4a@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.4 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Sat, 21 Apr 2018 14:59:47 +0000 X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00415.txt.bz2 On 2018-04-20 23:10, Rajendra SY wrote: > Problems: > 1. linking -dl lib on FreeBSD platform > 2. backtrace from ld-elf shows r_debug_state() instead of > _dl_debug_state() > > Cause: > 1. There is no dl library on FreeBSD platform test has to ignore > linking "-ldl" > 2. The stop due to a shared library event shows backtrace frame #0 > function as r_debug_state() > > Test passed: > PASS: gdb.base/break-probes.exp: set stop-on-solib-events 1 > > gdb/ChangeLog: > 2018-04-20 Rajendra SY > > PR gdb/23095 > * gdb/testsuite/gdb.base/break-probes.exp: Hi Rajendra, Instead of conditionally adding -ldl in the test, it would be better to pass the "shlib_load" options to prepare_for_testing. It will add the right flag depending on the platform. It is handled here, from what I see it already considers freebsd: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/testsuite/lib/gdb.exp;h=4d48f5e3ad39967bba3ecf8cad5da5ea87f355c8;hb=HEAD#l3593 Can you try that? The other part of the change (r_debug_state) is probably fine to keep there, because it's very specific to this test. Simon