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]

Re: [rfc] [0/8] Get rid of current_gdbarch


I've checked in all of those except:

- the xtensa-tdep.c patch (to give Maxim a chance to comment), and

I've tested xtensa-tdep.* patch. It works fine.


Getting rid of defines looks somewhat less elegant. But, I think it's been done for a reason.

Please, go ahead and check it in.

Thanks much for doing this.

-- Maxim


Ulrich Weigand wrote:
Markus Deuling wrote:

this is the next series of 8 mostly mechnical patches to get rid of of some trivial to replace occurences of current_gdbarch.

I've checked in all of those except:


- the xtensa-tdep.c patch (to give Maxim a chance to comment), and
- the stack.c patch, because of this:

@@ -1854,10 +1856,11 @@ If you continue, the return value that y
   if (return_value != NULL)
     {
       struct type *return_type = value_type (return_value);
-      gdb_assert (gdbarch_return_value (current_gdbarch, return_type,
+      gdb_assert (gdbarch_return_value (get_frame_arch (get_current_frame ()),
+					return_type,
 					NULL, NULL, NULL)
 		  == RETURN_VALUE_REGISTER_CONVENTION);
-      gdbarch_return_value (current_gdbarch, return_type,
+      gdbarch_return_value (get_frame_arch (get_current_frame ()), return_type,
 			    get_current_regcache (), NULL /*read*/,
 			    value_contents (return_value) /*write*/);
     }

At this point, there's no need to involve get_current_frame.  The
routine operates on the current regcache, and should simply consult
its architecture.

Thanks,
Ulrich



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