Re: [RFA 05/13] Make a few calls in *-tdep.c for effect

Simon Marchi
2018-07-12T21:58:54Z

On 2018-07-12 04:52 PM, Tom Tromey wrote:
> In a few cases, there were calls in *-tdep.c that I did not want to
> remove because I was not certain that it was safe -- perhaps the side
> effect of the function (generally throwing an error) was desired.

I am fairly confident that the find_function_addr calls are not necessary.
If you look at call_function_by_hand_dummy, it calls find_function_addr
with the same function argument before calling push_dummy_call:

CORE_ADDR funaddr = find_function_addr (function, &values_type, &ftype);

So if the function has to throw, it will be in this invocation. The fact
that no widely tested architecture does that also leads me to think it's
unnecessary.

I don't think the get_adi_info_proc call is useful either. All it does
is return the sparc64_adi_info belonging to inferior_ptid. If it already
exists, the call does nothing. If it does not already exist, it will be
created. The call adi_available just before will have created it, if it
didn't already.

Simon