Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfc] Eliminate write_register from solib-sunos.c
@ 2007-05-12  0:31 Ulrich Weigand
  2007-05-13 23:55 ` Daniel Jacobowitz
  0 siblings, 1 reply; 13+ messages in thread
From: Ulrich Weigand @ 2007-05-12  0:31 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-06-15 22:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-12  0:31 [rfc] Eliminate write_register from solib-sunos.c Ulrich Weigand
2007-05-13 23:55 ` Daniel Jacobowitz
2007-05-14 15:01   ` Ulrich Weigand
2007-05-14 15:15     ` Mark Kettenis
2007-05-14 20:53       ` Ulrich Weigand
2007-06-04 18:53       ` Ulrich Weigand
2007-06-15 16:46         ` Mark Kettenis
2007-06-15 16:58           ` Ulrich Weigand
2007-06-15 21:22             ` Mark Kettenis
2007-06-15 21:28             ` Daniel Jacobowitz
2007-06-15 22:13               ` Ulrich Weigand
2007-05-14 15:21     ` Daniel Jacobowitz
2007-05-14 20:28       ` Ulrich Weigand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox