This is the mail archive of the gdb-patches@sourceware.org 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]

[PATCH] python/py-unwind.c (unwind_infopy_str): Fix use of VEC_iterate.


Hi.

I happened to notice this while reading the code.

2016-11-03  Doug Evans  <dje@google.com>

	* python/py-unwind.c (unwind_infopy_str): Fix use of VEC_iterate.

diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c
index cc685ae..92ce138 100644
--- a/gdb/python/py-unwind.c
+++ b/gdb/python/py-unwind.c
@@ -212,9 +212,7 @@ unwind_infopy_str (PyObject *self)

     get_user_print_options (&opts);
     fprintf_unfiltered (strfile, "\nSaved registers: (");
-    for (i = 0;
-         i < VEC_iterate (saved_reg, unwind_info->saved_regs, i, reg);
-         i++)
+ for (i = 0; VEC_iterate (saved_reg, unwind_info->saved_regs, i, reg); i++)
       {
         struct value *value = value_object_to_value (reg->value);


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