From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20553 invoked by alias); 22 Nov 2011 14:55:26 -0000 Received: (qmail 20536 invoked by uid 22791); 22 Nov 2011 14:55:23 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Nov 2011 14:55:09 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RSrka-00031S-9M from pedro_alves@mentor.com ; Tue, 22 Nov 2011 06:55:08 -0800 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 22 Nov 2011 14:55:06 +0000 From: Pedro Alves To: Tom Tromey Subject: Re: [3/3] RFC: fix PR mi/8444 Date: Tue, 22 Nov 2011 14:55:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-12-generic; KDE/4.7.2; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <201111162131.09204.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201111221455.05151.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2011-11/txt/msg00579.txt.bz2 On Thursday 17 November 2011 16:41:13, Tom Tromey wrote: > >>>>> "Pedro" == Pedro Alves writes: > > Pedro> TARGET_WAITKIND_LOADED targets print this elsewhere, as > Pedro> they don't use a shared library event breakpoint. See > Pedro> infrun.c:normal_stop. Can you give that the same treatment? > > What do you think of the appended? > > I don't think I have access to a TARGET_WAITKIND_LOADED target, so I > can't test this. > > I added a 'kind' argument to bpstat_print, to centralize the printing. > I wasn't sure if this is a good idea or not; I think the centralization > idea is fine, but I wasn't sure if this addition is violating some > abstraction boundary. Yeah, looks fine. This should probably be a catchpoint anyway. > --- /dev/null > +++ b/gdb/testsuite/gdb.mi/mi-solib.exp > @@ -0,0 +1,55 @@ > +load_lib mi-support.exp > +set MIFLAGS "-i=mi2" The test uses shared libs -- it should be skipped if skip_shlib_tests. > + > +gdb_exit > +if [mi_gdb_start] { > + continue > +} > + > +set libname "solib-lib" > +set srcfile_lib ${srcdir}/${subdir}/${libname}.c > +set binfile_lib ${objdir}/${subdir}/${libname}.so > +set lib_flags [list debug ldflags=-Wl,-Bsymbolic] Is -Bsymbolic necessary? > + > +set testfile "solib-main" > +set srcfile ${srcdir}/${subdir}/${testfile}.c > +set binfile ${objdir}/${subdir}/${testfile} > +set bin_flags [list debug shlib=${binfile_lib}] > + > +if [get_compiler_info ${binfile}] { > + return -1 > +} > + > +if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != "" > + || [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } { > + untested "Could not compile $binfile_lib or $binfile." > + return -1 > +} > + > +mi_delete_breakpoints > +mi_gdb_reinitialize_dir $srcdir/$subdir > +mi_gdb_reinitialize_dir $srcdir/$subdir > +mi_gdb_load ${binfile} gdb_load_shlibs missing. > --- /dev/null > +++ b/gdb/testsuite/gdb.mi/solib-lib.c > +#include Unnecessary header. > --- /dev/null > +++ b/gdb/testsuite/gdb.mi/solib-main.c > +*/ > +#include Ditto. > > +proc mi_run_cmd {args} { > + return [eval mi_run_cmd_full 1 $args] > +} > + > +proc mi_run_with_cli {args} { > + return [eval mi_run_cmd_full 0 $args] > +} Describing comments would be nice. Otherwise looks good to me. -- Pedro Alves