From 16aff9a6772b8c51d550e2c0a2f1e60bd24739a1 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Thu, 17 Mar 2005 17:44:14 +0000 Subject: 2005-03-17 Paul Brook * amd64-tdep.c (amd64_dwarf_reg_to_regnum): Fix broken logic. * s390-tdep.c (s390_dwarf_reg_to_regnum): Ditto. --- gdb/ChangeLog | 5 +++++ gdb/amd64-tdep.c | 2 +- gdb/s390-tdep.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b6f733c..b1e9a7c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2005-03-17 Paul Brook + + * amd64-tdep.c (amd64_dwarf_reg_to_regnum): Fix broken logic. + * s390-tdep.c (s390_dwarf_reg_to_regnum): Ditto. + 2005-03-16 Mark Mitchell * event-top.c (handle_sigquit): Do not define for systems without diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 01584cc..e6fabc6 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -200,7 +200,7 @@ amd64_dwarf_reg_to_regnum (int reg) { int regnum = -1; - if (reg >= 0 || reg < amd64_dwarf_regmap_len) + if (reg >= 0 && reg < amd64_dwarf_regmap_len) regnum = amd64_dwarf_regmap[reg]; if (regnum == -1) diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 55c4904..d2fe352 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -197,7 +197,7 @@ s390_dwarf_reg_to_regnum (int reg) { int regnum = -1; - if (reg >= 0 || reg < ARRAY_SIZE (s390_dwarf_regmap)) + if (reg >= 0 && reg < ARRAY_SIZE (s390_dwarf_regmap)) regnum = s390_dwarf_regmap[reg]; if (regnum == -1) -- cgit v1.1