This is the mail archive of the 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]

[rfc][1/13] Eliminate read_register: write_register in solib-sunos.c


this patch eliminates the use of write_register in solib-sunos.c.
As discussed when I've originally posted the patch, the whole
"if (DECR_PC_AFTER_BREAK)" block is questionable, and the correct
solution might be to completely remove it.

In any case, something needs to be done before the write_register
routine can be eliminated ...



	* 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)
       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

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