This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v7 1/4] gdb: Add OpenRISC or1k and or1knd target support


On Fri, Jun 09, 2017 at 10:08:39PM +0900, Stafford Horne wrote:
> On Fri, Jun 09, 2017 at 11:10:37AM +0100, Yao Qi wrote:
> > Stafford Horne <shorne@gmail.com> writes:
> > 
> > > +  set_gdbarch_print_insn (gdbarch, print_insn_or1k);
> > > +
> > 
> > Don't need to set gdbarch_print_insn, so remove this line.  GDB will use
> > the default one, which selects the right disassembler in opcodes.
> 
> I removed it, but all tests start failing after that.  I will look into it
> a bit more.

I tried to look into this, but it looks liek we do need
set_gdbarch_print_insn ().   If not starting gdb hits this error in
gdbarch.c verify_gdbarch().

...
  if (gdbarch->print_insn == 0)
    log.puts ("\n\tprint_insn");
...

  if (!log.empty ())
    internal_error (__FILE__, __LINE__,
		    _("verify_gdbarch: the following are invalid ...%s"),
		    log.c_str ());
...

Is the automatic selecting of `print_insn` something new?  My patch is
based on yesterdays master branch of http://sourceware.org/git/binutils-gdb.git.

-Stafford


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]