From 679b65cd221efa7df42b6a369c7b1ebe9d8b5c3e Mon Sep 17 00:00:00 2001 From: Chris January Date: Thu, 31 Jan 2013 11:46:57 +0000 Subject: [PATCH] dwarf: Fix the order of the operands to the relational operators dwarf_eval_expr are reversed compared with the DWARF spec. --- src/dwarf/Gexpr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dwarf/Gexpr.c b/src/dwarf/Gexpr.c index b4f2bc96..502021cf 100644 --- a/src/dwarf/Gexpr.c +++ b/src/dwarf/Gexpr.c @@ -574,42 +574,42 @@ do { \ Debug (15, "OP_le\n"); tmp1 = pop (); tmp2 = pop (); - push (sword (as, tmp1) <= sword (as, tmp2)); + push (sword (as, tmp2) <= sword (as, tmp1)); break; case DW_OP_ge: Debug (15, "OP_ge\n"); tmp1 = pop (); tmp2 = pop (); - push (sword (as, tmp1) >= sword (as, tmp2)); + push (sword (as, tmp2) >= sword (as, tmp1)); break; case DW_OP_eq: Debug (15, "OP_eq\n"); tmp1 = pop (); tmp2 = pop (); - push (sword (as, tmp1) == sword (as, tmp2)); + push (sword (as, tmp2) == sword (as, tmp1)); break; case DW_OP_lt: Debug (15, "OP_lt\n"); tmp1 = pop (); tmp2 = pop (); - push (sword (as, tmp1) < sword (as, tmp2)); + push (sword (as, tmp2) < sword (as, tmp1)); break; case DW_OP_gt: Debug (15, "OP_gt\n"); tmp1 = pop (); tmp2 = pop (); - push (sword (as, tmp1) > sword (as, tmp2)); + push (sword (as, tmp2) > sword (as, tmp1)); break; case DW_OP_ne: Debug (15, "OP_ne\n"); tmp1 = pop (); tmp2 = pop (); - push (sword (as, tmp1) != sword (as, tmp2)); + push (sword (as, tmp2) != sword (as, tmp1)); break; case DW_OP_skip: