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 v4 11/24] record-btrace: supply register target methods


On Mon, 16 Sep 2013 11:18:02 +0200, Metzger, Markus T wrote:
> OK.  I added an error message for the to_store_registers method.

OK:

(gdb) p $rax=1
This record target does not allow writing registers.


> > > +
> > > +  if (may_write_registers == 0)
> > > +    error (_("Writing to registers is not allowed (regno %d)"),
> > > + regno);
> > 
> > Here should be rather:
> >   gdb_assert (may_write_registers == 0);
> > 
> > as target_store_registers() would not pass the call here otherwise.
> 
> I took this from target_store_registers in target.c.

But that is a different case.  The case 'may_write_registers == 0' is always
already caught by target_store_registers().  record_btrace_store_registers()
gets called only by target_store_registers() which already verified the
variable is not zero.


Thanks,
Jan


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