This is the mail archive of the
mailing list for the GDB project.
Fix write_pc_pid breakage
- From: Andreas Schwab <schwab at suse dot de>
- To: gdb-patches at sourceware dot org
- Date: Thu, 21 Jun 2007 14:11:06 +0200
- Subject: Fix write_pc_pid breakage
The last change to write_pc_pid broke it on targets that have no pc
register. Committed as obvious.
2007-06-21 Andreas Schwab <email@example.com>
* regcache.c (write_pc_pid): Restore missing else.
--- gdb/regcache.c.~1.159.~ 2007-06-21 12:04:43.000000000 +0200
+++ gdb/regcache.c 2007-06-21 14:01:57.000000000 +0200
@@ -867,7 +867,7 @@ write_pc_pid (CORE_ADDR pc, ptid_t ptid)
if (gdbarch_write_pc_p (gdbarch))
gdbarch_write_pc (gdbarch, regcache, pc);
- if (gdbarch_pc_regnum (current_gdbarch) >= 0)
+ else if (gdbarch_pc_regnum (current_gdbarch) >= 0)
gdbarch_pc_regnum (current_gdbarch), pc);
Andreas Schwab, SuSE Labs, firstname.lastname@example.org
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."