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] "single step" atomic instruction sequences as a whole.


Daniel Jacobowitz wrote:

> "Yes please".  That's one of the reasons I wanted to get the common
> helper in place.

OK, I'll come up with a patch.

However, there's one thing I overlooked in alpha-tdep.c:

  static CORE_ADDR next_pc;
  CORE_ADDR pc;

  if (insert_breakpoints_p)
    {
      pc = read_pc ();
      next_pc = alpha_next_pc (pc);

      insert_single_step_breakpoint (next_pc);
    }
  else
    {
      remove_single_step_breakpoints ();
      write_pc (next_pc);
    }

I would think the "write_pc (next_pc)" statement in the 
!insert_breakpoints_p case should be unnecessary.  This should
already have been taken care of by infrun, shouldn't it?

Also, I've noticed that none of the existing implementations
makes any use of the "signal" argument.  Should we remove this
as well?

Finally, all single-step implementations currently have to
fall back to global functions like read_pc (or current_regcache)
to find the target registers.  I understand this is something
we should be moving away from, so if we're already changing 
the signature, maybe we should pass in a regcache argument?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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