This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] Eliminate write_register from solib-sunos.c
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Date: Sat, 12 May 2007 02:31:13 +0200 (CEST)
- Subject: [rfc] Eliminate write_register from solib-sunos.c
Hello,
solib-sunos.c has a place where it adjusts the PC by DECR_PC_AFTER_BREAK.
Unlike all other places to do so, it uses write_register (PC_REGNUM ...).
As I'm trying to eliminate write_register, I'd like to get rid of this.
The following patch replaces the write_register call by write_pc.
Is this OK?
Bye,
Ulrich
ChangeLog:
* solib-sunos.c (sunos_solib_create_inferior_hook): Use write_pc
instead of write_register (PC_REGNUM, ...).
diff -urNp gdb-orig/gdb/solib-sunos.c gdb-head/gdb/solib-sunos.c
--- gdb-orig/gdb/solib-sunos.c 2007-01-11 20:57:59.000000000 +0100
+++ gdb-head/gdb/solib-sunos.c 2007-05-04 22:17:49.169681035 +0200
@@ -780,7 +780,7 @@ sunos_solib_create_inferior_hook (void)
if (DECR_PC_AFTER_BREAK)
{
stop_pc -= DECR_PC_AFTER_BREAK;
- write_register (PC_REGNUM, stop_pc);
+ write_pc (stop_pc);
}
if (!disable_break ())
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com