From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86601 invoked by alias); 12 Aug 2015 19:05:50 -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 86592 invoked by uid 89); 12 Aug 2015 19:05:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 12 Aug 2015 19:05:46 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 616BE8C1C8; Wed, 12 Aug 2015 19:05:45 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7CJ5hwr015818; Wed, 12 Aug 2015 15:05:44 -0400 Message-ID: <55CB9907.9080506@redhat.com> Date: Wed, 12 Aug 2015 19:05:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sourceware.org Subject: Re: [PATCH v4 00/18] All-stop on top of non-stop References: <1432250354-2721-1-git-send-email-palves@redhat.com> <55C4E3BD.8040801@redhat.com> <20150812183208.GA24901@adacore.com> In-Reply-To: <20150812183208.GA24901@adacore.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-08/txt/msg00315.txt.bz2 On 08/12/2015 07:32 PM, Joel Brobecker wrote: > This uncovered what I think is a latent bug in the "how-did-we-never- > see-this-before" category. Wow! Indeed. Many thanks for tracking this down and fixing it. A couple minor comments below, but this looks good to me. > Does this patch look OK to you? > * gdb.base/dso2dso-impl.c, gdb.base/dso2dso-impl.h, > gdb.base/dso2dso-pck.c, gdb.base/dso2dso-pck.h, gdb.base/dso2dso.c, > gdb.base/dso2dso.exp: New files. > Nit: the "pck" and "impl"s here confuse me -- I guess they meant something in the original test? Do they still have any meaning here? I'd suggest renaming to dso2dso-dso1.c, dso2dso-dso2.c, and then sub() -> sub1(), impl__initialize() -> sub2(). That way, it should be clearer that a function in dso1 calls a function in dso2. > diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c > index 5e63b5e..5b4a8f4 100644 > --- a/gdb/amd64-tdep.c > +++ b/gdb/amd64-tdep.c > @@ -1662,7 +1662,7 @@ amd64_displaced_step_fixup (struct gdbarch *gdbarch, > > regcache_cooked_read_unsigned (regs, AMD64_RSP_REGNUM, &rsp); > retaddr = read_memory_unsigned_integer (rsp, retaddr_len, byte_order); > - retaddr = (retaddr - insn_offset) & 0xffffffffUL; > + retaddr = (retaddr - insn_offset) & 0xffffffffffffffffUL; I think this should use the ULL suffix now. > + > +if { [gdb_compile_shlib $srcfile_libimpl $binfile_libimpl \ > + [list debug additional_flags=-fPIC]] != "" } { > + untested "Could not compile $binfile_libimpl." > + return -1 > +} > + > +if { [gdb_compile_shlib $srcfile_libpck $binfile_libpck \ > + [list debug additional_flags=-fPIC]] != "" } { > + untested "Could not compile $binfile_libpck." > + return -1 > +} > + > +if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable \ > + [list debug shlib=$binfile_libimpl shlib=$binfile_libpck]] != "" } { > + return -1 > +} > + > +clean_restart $binfile > + I think a gdb_load_shlibs $binfile_libimpl $binfile_libpck is missing here. > +if { ![runto_main] } { > + return -1 > +} > + > +set bp_location [gdb_get_line_number "impl__initialize" $srcfile_libpck] > +gdb_breakpoint ${srcfile_libpck}:${bp_location} > + > +gdb_continue_to_breakpoint "at call to impl__initialize" \ > + ".*impl__initialize ().*" > + > +gdb_test "next" \ > + ".*return 5;.*" \ > + "next over call to impl__initialize" > -- 2.1.4 Thanks, Pedro Alves