This is the mail archive of the gdb-patches@sources.redhat.com 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]

[commit] Obvious fixups for dwarf2expr.c


A coworker pointed out the thinko in this code.  Probably was my fault.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2004-01-17  Daniel Jacobowitz  <drow@mvista.com>

	Suggested by George Anzinger.
	* dwarf2expr.c (execute_stack_op): Fetch the second item from the
	correct stack offset.  Include unknown opcode numbers in the error
	message.

Index: dwarf2expr.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2expr.c,v
retrieving revision 1.10
diff -u -p -r1.10 dwarf2expr.c
--- dwarf2expr.c	9 Oct 2003 14:11:58 -0000	1.10
+++ dwarf2expr.c	17 Jan 2004 23:08:09 -0000
@@ -562,7 +562,7 @@ execute_stack_op (struct dwarf_expr_cont
 	    second = dwarf_expr_fetch (ctx, 0);
 	    dwarf_expr_pop (ctx);
 
-	    first = dwarf_expr_fetch (ctx, 1);
+	    first = dwarf_expr_fetch (ctx, 0);
 	    dwarf_expr_pop (ctx);
 
 	    val1 = value_from_longest (unsigned_address_type (), first);
@@ -660,7 +660,7 @@ execute_stack_op (struct dwarf_expr_cont
 	  goto no_push;
 
 	default:
-	  error ("Unhandled dwarf expression opcode");
+	  error ("Unhandled dwarf expression opcode 0x%x", op);
 	}
 
       /* Most things push a result value.  */


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