From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107767 invoked by alias); 12 Aug 2019 00:34:32 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 107757 invoked by uid 89); 12 Aug 2019 00:34:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=beginning, H*UA:Roundcube, H*u:Webmail, H*u:Roundcube X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Aug 2019 00:34:30 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id x7C0YMbp027373 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 11 Aug 2019 20:34:27 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca x7C0YMbp027373 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1565570068; bh=N3yjcTcweFrsa/LDcvMH73MLmdBzaabyO6Oqy1fQyq8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vFQbqjTQgEgg/51tqq50qwvCS0CtBP0i1ncaC38EOE3bs8tI8VcEl+8nppq0fdSSg mQu31rLTINFiU4EflhHexytDSLzog4LJd3psfJpSiVtrivFEr+NuJDtaDMVDah5Ij7 Mtf90RR9fMhfe96XPeASI19C0nhqFbGeBOdt1doQ= Received: by simark.ca (Postfix, from userid 112) id 7901E1F33D; Sun, 11 Aug 2019 20:34:22 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 406D81E05A; Sun, 11 Aug 2019 20:34:21 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 12 Aug 2019 00:34:00 -0000 From: Simon Marchi To: William Tambe Cc: gdb@sourceware.org Subject: Re: _initialize_arch_tdep() not getting called In-Reply-To: References: Message-ID: <7a1b76f116c045b07069d7e27d02e50d@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00012.txt.bz2 On 2019-08-10 22:49, William Tambe wrote: > I have narrowed down the issue to the function _initialize_arch_tdep() > not being generated in gdb/init.c by gdb/Makefile.in during the build > process. > > Any idea what could be the issue ? > > On Sat, Aug 10, 2019 at 9:16 AM William Tambe > wrote: >> >> I am running into an issue where my GDB port is not calling >> _initialize_arch_tdep() which is responsible for calling >> register_gdbarch_init(). >> >> The files arch-tdep.c has been properly created and contain the >> function _initialize_arch_tdep(). >> >> During GDB initialization, the function gdbarch_find_by_info() fail >> causing the following error to occur: >> arch-utils.c:693: internal-error: initialize_current_architecture: >> Selection of initial architecture failed >> >> Any idea what I could have missed causing _initialize_arch_tdep() not >> to be called ? Hi William, I can't find _initialize_arch_tdep in the GDB code base, so I presume it is the init function in your private -tdep.c file that you want GDB to call. The only reason I see for your function not ending up in init.c is that doesn't respect the regex that looks for init functions: 1855 @-for f in $(INIT_FILES); do \ 1856 sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' \ 1857 $(srcdir)/$$f 2>/dev/null; \ The function name but start at the beginning of the line and start with "_initialize_". That's the only guess I can make with the provided information. Simon