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] [08/09] Get rid of current_gdbarch (infcall)


Markus Deuling wrote:

> 	* infcall.c (call_function_by_hand): Use get_frame_arch to get at the
> 	current architecture by frame_info.

This part is fine.

However, I'm not convinced this:

> 	(find_function_addr): Add gdbarch parameter. Replace current_gdbarch by
> 	gdbarch.
> 	* infcall.h (find_function_addr): Add gdbarch parameter.

is the right way to go.  Consider the call to find_function_addr in value_ind:
there is no clear way how that function would know which architecture to use.

I'm hoping that at some point in the future, a "struct value" for a function
would contain enough information to identify the architecture the function
is defined for, determined at the time the value is generated.

If we can make that happen, there will be no need to pass an additional
gdbarch parameter to find_function_addr.  Thus, I'd prefer to defer this
interface change until we have resolved that question.


Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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