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: gdb-patches at sourceware dot cygnus dot com
- Subject: Re: Getting hold of a bfd in _initialize_<target>_tdep
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Date: Thu, 9 Nov 2000 19:36:10 +0100
- CC: orjan dot friberg at axis dot com
> Date: Thu, 09 Nov 2000 11:20:24 +0100
> From: Orjan Friberg <orjanf@axis.com>
> 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.
Let me just add that it actually *is* traits of the file format
(really: the bfd_target) that cris_get_disassembler uses:
whether or not to add register-prefix to registers depending on
symbol_leading_char.
I was obviously wrong thinking that the function disassemble
declared in include/dis-asm.h was used also by gdb (so a bfd was
handy). But somehow it just seemed natural, that for all common
cases there is a bfd somewhere close by, to use by gdb target
initialization functions. (Or that there was something that
should be fixed to do that. ;-)
brgds, H-P