From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14900 invoked by alias); 23 Sep 2014 23:05:14 -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 14884 invoked by uid 89); 23 Sep 2014 23:05:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f176.google.com Received: from mail-vc0-f176.google.com (HELO mail-vc0-f176.google.com) (209.85.220.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 23 Sep 2014 23:05:13 +0000 Received: by mail-vc0-f176.google.com with SMTP id la4so4304580vcb.21 for ; Tue, 23 Sep 2014 16:05:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=PVIlG974f2/zALmBF02k3LiM44TQ6UDxoAFI2MN4duM=; b=XzJtzxKtkaHm0W9YsOrU0d0HGkrKhy3hLwuYdUjXFeM/KxGTYMaGQ0i3H3XyYDmZ5v 4olJHe3tkM73N6vUD18LoSNodFxWr4NmgvpOLXuiVo57QBoQ3YE/6soiAvE2HqU/6vKd vFtQamZMnDUPeByKHog0mLQ87ufgMA3FX9tUp0cE4u2AckGNN2Oq300X6SnrmZlNoQlV bjP9ZMvB7FWMIVbEHPpoRxDK58L3IdRNxfQAb49MJIUxVZEtg4zmyjwcfUGSrySMMDu2 LnnuHrpuOuq3z84U7Eyz6rxE/MerL0T0Yd56Ym7GmSkkiiRD5so3/7I/H0PeCy7p3f9x bxoQ== X-Gm-Message-State: ALoCoQltbbq5c3cCU3hwn/9FSWBGtnannxq9rQRsYlNGnipnrCtiE4PkP1FTVW+V/hcwE3loYszr MIME-Version: 1.0 X-Received: by 10.220.87.197 with SMTP id x5mr2518009vcl.70.1411513510737; Tue, 23 Sep 2014 16:05:10 -0700 (PDT) Received: by 10.52.181.65 with HTTP; Tue, 23 Sep 2014 16:05:10 -0700 (PDT) In-Reply-To: <541F2B1E.4030909@redhat.com> References: <5411CFAE.7040805@redhat.com> <20140912115452.GA5626@host2.jankratochvil.net> <5412E3AC.80203@redhat.com> <20140912123320.GA8704@host2.jankratochvil.net> <5412EB1F.40309@redhat.com> <20140917201049.GA22880@host2.jankratochvil.net> <541C3FCF.4000400@redhat.com> <541C409E.6010408@redhat.com> <20140920213033.GA6255@host2.jankratochvil.net> <541F2311.1040404@redhat.com> <541F2B1E.4030909@redhat.com> Date: Tue, 23 Sep 2014 23:05:00 -0000 Message-ID: Subject: Re: time to workaround libc/13097 in fsf gdb? From: Doug Evans To: Pedro Alves Cc: Jan Kratochvil , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00706.txt.bz2 On Sun, Sep 21, 2014 at 12:46 PM, Pedro Alves wrote: >[...] > @@ -1478,6 +1479,44 @@ svr4_current_sos (void) > return svr4_current_sos_direct (info); > } > > +/* Implement the "current_sos" target_so_ops method. */ > + > +static struct so_list * > +svr4_current_sos (void) > +{ > + struct so_list *so_head = svr4_current_sos_1 (); > + struct objfile *objfile; > + struct obj_section *osect; > + CORE_ADDR vsyscall_start, vsyscall_end; > + > + /* Filter out the vDSO module, if present. Its symbol file would > + not be found on disk. The vDSO/vsyscall's OBJFILE is instead > + managed by symfile-mem.c:add_vsyscall_page. */ > + if (gdbarch_vsyscall_range (target_gdbarch (), > + &vsyscall_start, &vsyscall_end)) > + { > + struct so_list **sop; > + > + sop = &so_head; > + while (*sop != NULL) > + { > + struct so_list *so = *sop; > + > + if (vsyscall_start <= so->lm_info->l_ld > + && so->lm_info->l_ld < vsyscall_end) This test is subtle enough that I'd appreciate a full explanation here of what's going on. Thanks. > + { > + *sop = so->next; > + free_so (so); > + break; > + } > + > + sop = &so->next; > + } > + } > + > + return so_head; > +} > + I may have a few more comments, but I think Jan has covered them, so I'm going to wait until the next version for further review.