Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* _initialize_arch_tdep() not getting called
@ 2019-08-10 14:17 William Tambe
  2019-08-11  2:50 ` William Tambe
  0 siblings, 1 reply; 3+ messages in thread
From: William Tambe @ 2019-08-10 14:17 UTC (permalink / raw)
  To: gdb

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 ?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: _initialize_arch_tdep() not getting called
  2019-08-10 14:17 _initialize_arch_tdep() not getting called William Tambe
@ 2019-08-11  2:50 ` William Tambe
  2019-08-12  0:34   ` Simon Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: William Tambe @ 2019-08-11  2:50 UTC (permalink / raw)
  To: gdb

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 ?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: _initialize_arch_tdep() not getting called
  2019-08-11  2:50 ` William Tambe
@ 2019-08-12  0:34   ` Simon Marchi
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2019-08-12  0:34 UTC (permalink / raw)
  To: William Tambe; +Cc: gdb

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-12  0:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-10 14:17 _initialize_arch_tdep() not getting called William Tambe
2019-08-11  2:50 ` William Tambe
2019-08-12  0:34   ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox