From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id BF4D53858419 for ; Wed, 9 Feb 2022 02:31:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BF4D53858419 Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-592-AsjW3Xo6OKqT_o5uQ-1Vig-1; Tue, 08 Feb 2022 21:31:25 -0500 X-MC-Unique: AsjW3Xo6OKqT_o5uQ-1Vig-1 Received: by mail-qt1-f199.google.com with SMTP id e14-20020ac84b4e000000b002cfbbdf8206so697257qts.10 for ; Tue, 08 Feb 2022 18:31:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U5kDDgqzkNMSShST8evDEjpowlePcqFZGPLEsEfz56Q=; b=ktOp6jWfL31FgbqdarRzxV4gBPMYrfS2fomMY2MT7yFO3ZyophOcplp4fUETOpnQ5+ hzWhd+Z+lGyP290ekeXjZHalXua26YdvXx1E21x/9P5TFO6NiMOatqNLsjOaAXBHOR+D KV6NHP7sUV+AKirv/8b/hloaT1NmNyg76J+xaQSCv6yeFN9vQhQ78W1j29LI8zn1+6dk upe6FVlfmBHy2jpm+IFccdGInCGE32MqzSjYEGfzjnxk7Vyoa88KtH+DwTSJz1fj1tLy 3wTsiXEzVPCtzEUrjLC0K/ltZHYlaIA1KGrXE0SP56mujtYiMsCD6CWsOjrJappOpKep 1JSA== X-Gm-Message-State: AOAM531RFXHGAn/AwpVD5llrPrCBg/nm8DRUWQwLhjr7d6zHvqH6JJAm mmUnvTCtjRgQqVmkNICbBdIp5vwNq4Fsg6VWbLgQJ3Uvzy0jQ6w3KDjALqbq8d5uUngPPC2Ocdt GEWzgx67EY7Z5W0mfnXUPE0xjfepgpfRu3woA X-Received: by 2002:a05:620a:4014:: with SMTP id h20mr77267qko.275.1644373885042; Tue, 08 Feb 2022 18:31:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7QMe+uj2zpxnCh5OcknLrpUlZm6AwnA4wFvbnq21s1/jAn+lIw9YlS3bcJ0B5dx+3TWWj7xVnLxgxxkodwME= X-Received: by 2002:a05:620a:4014:: with SMTP id h20mr77264qko.275.1644373884851; Tue, 08 Feb 2022 18:31:24 -0800 (PST) MIME-Version: 1.0 References: <20211117032441.719270-1-amerey@redhat.com> <877dd6euil.fsf@tromey.com> In-Reply-To: From: Aaron Merey Date: Tue, 8 Feb 2022 21:31:14 -0500 Message-ID: Subject: Re: [PATCH 2/3] gdb: Add soname to build-id mapping for corefiles To: gdb-patches@sourceware.org Cc: Tom Tromey , Simon Marchi , lsix@lancelotsix.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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: Wed, 09 Feb 2022 02:31:28 -0000 Ping ** 2 Thanks, Aaron On Tue, Jan 25, 2022 at 8:40 PM Aaron Merey wrote: > > Ping > > Thanks, > Aaron > > On Wed, Nov 17, 2021 at 4:16 PM Aaron Merey wrote: > > > > Hi Tom, > > > > On Wed, Nov 17, 2021 at 9:29 AM Tom Tromey wrote: > > > If re-opening and then calling bfd_check_format sets the flags > > > correctly, then I suppose the question is just why the call in > > > build_file_mappings isn't doing that: > > > > > > if (bfd == nullptr || !bfd_check_format (bfd, bfd_object)) > > > > > > Possibly the answer is that corelow passes "binary" as the target, but > > > your code does: > > > > > > Aaron> + gdb_bfd_ref_ptr abfd = gdb_bfd_open (bfd->filename, gnutarget); > > > > > > But then I wonder why "binary" is appropriate in corelow. > > > > Yes it would be much better if "bfd" was simply initialised with the proper > > fields. Corelow treats bfds in a target-agnostic manner but this shouldn't > > preclude having accurate information in "bfd". > > > > We could force "bfd" to have a format of bfd_unknown and let > > bfd_check_format figure out the correct format and fields. This is > > basically what I do in gdb_bfd_read_elf_soname. But really there > > should be a way to just initialise "bfd" with completely accurate > > contents at the time of creation. If this doesn't exist maybe now > > is the time to add it. > > > > Aaron