This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Getting hold of a bfd in _initialize_<target>_tdep
- To: Orjan Friberg <orjan dot friberg at axis dot com>
- Subject: Re: Getting hold of a bfd in _initialize_<target>_tdep
- From: Michael Snyder <msnyder at redhat dot com>
- Date: Thu, 09 Nov 2000 10:25:07 -0800
- CC: gdb-patches at sourceware dot cygnus dot com
- References: <3A0A7A68.D285F405@axis.com>
Orjan Friberg wrote:
>
> When defining the tm_print_insn parameter in _initialize_cris_tdep (port
> to be submitted), I need a bfd (not just bfd_arch_info) to supply to a
> function (cris_get_disassembler) which gives me the correct
> disassembler. However, I can't seem to get hold of one. Also, no one
> seems to be using the disassembler (bfd *) function in dis-asm.h, which
> makes me suspicious as to its applicability. The rs6000 target does make
> use of the info.abfd in its gdbarch_init () function, though I can't
> verify that it's actually != 0 inside function.
>
> Should I base the choice of disassembler on something else than the
> actual bfd, or is there a proper way to get hold of it?
With appologies to the gods of software engineering,
you could use the global variable "exec_bfd".