From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20360 invoked by alias); 10 Jun 2015 12:04:26 -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 20351 invoked by uid 89); 10 Jun 2015 12:04:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Jun 2015 12:04:16 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Z2ejs-0005zk-Ct from Taimoor_Mirza@mentor.com ; Wed, 10 Jun 2015 05:04:12 -0700 Received: from [137.202.157.84] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 10 Jun 2015 13:04:11 +0100 Message-ID: <557827B7.7090902@codesourcery.com> Date: Wed, 10 Jun 2015 12:04:00 -0000 From: Taimoor User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Pedro Alves , Yao Qi CC: "gdb-patches@sourceware.org" Subject: Re: Improving GDB's mechanism to check if function is GC'ed References: <556DB1BB.50601@codesourcery.com> <86eglkeyfw.fsf@gmail.com> <55780EB4.1070003@redhat.com> In-Reply-To: <55780EB4.1070003@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00175.txt.bz2 On 06/10/2015 03:17 PM, Pedro Alves wrote: > Hmm, does it really need to, though? We expose mechanisms like > add-symbol-file, xml library list with qXfer:libraries:read (the default > solib provider), xml target descriptions, "info os", etc., exactly so > that GDB doesn't have to learn about the myriad of random RTOS's out there. > > That said, I don't really understand the patch. How can you have > real code at address 0, but then_not_ have address 0 covered > by a section? This code is a relocatable object that is dynamically loaded by dynamic loader that is part of loaded image. So you load your main kernel image but you can load/unload relocatable objects to add further enhancements to your main kernel image. This allows RTOS application developers to add new features or provide bug fixes in their applications without rebuilding and reflashing everything. We currently use add-symbol-file for these relocatable objects. Previous GC'ing mechanism of GDB was working fine for us as it was using flag has_section_at_zero to determine whether address zero in debug info means the corresponding code has been GC'ed. But this mechanism was changed in https://sourceware.org/ml/gdb-patches/2014-08/msg00468.html and now functions at address 0x0 in dwarf of relocatable object are marked GC'ed by GDB. Thanks, Taimoor