This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] "single step" atomic instruction sequences as a whole.
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: drow at false dot org (Daniel Jacobowitz)
- Cc: luisgpm at linux dot vnet dot ibm dot com (Luis Machado), gdb-patches at sourceware dot org
- Date: Thu, 12 Apr 2007 19:16:14 +0200 (CEST)
- Subject: 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