Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: William Tambe <tambewilliam@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: _initialize_arch_tdep() not getting called
Date: Mon, 12 Aug 2019 00:34:00 -0000	[thread overview]
Message-ID: <7a1b76f116c045b07069d7e27d02e50d@polymtl.ca> (raw)
In-Reply-To: <CAF8i9mNeujb06=WUxXJ0nU2us7ka0tBzt3-BXpO6yUhtibO50w@mail.gmail.com>

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 <tambewilliam@gmail.com> 
> 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


      reply	other threads:[~2019-08-12  0:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-10 14:17 William Tambe
2019-08-11  2:50 ` William Tambe
2019-08-12  0:34   ` Simon Marchi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7a1b76f116c045b07069d7e27d02e50d@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb@sourceware.org \
    --cc=tambewilliam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox