Re: [PATCH 1/4] New gdb arch hook: return_with_first_hidden_param_p

Joel Brobecker
2012-05-15T21:30:53Z

> Just a quick thought without having a lot of context on this issue --
> what about the case where there isn't even any debug information
> available for the function to be called? Does this rule out the DWARF
> route, or isn't that something to be prepared for?

I am not actually entirely sure! This never really entered my mind.
But a quick look at the sources seems to suggest that call the
function with the arguments as provided...

Note that the Ada expression parser does some function resolution
based on parameter types, and could possibly narrow the matches
down to nothing. This part only deals with functions for which
we have debugging information, obviously, but does not preclude
calling a function without debug info. And looking at eval.c,
I think that we have the same sort of thing happening for C++
as well. Although, I suspect it's not so much about validation,
but rather figuring out the right way of calling methods.

Whether the debugger decides to check the debug info or not seems
to be left to the -tdep code; in the "push_dummy_call" gdbarch
routine, for instance. But even that doesn't validate the parameters,
I wouldn't think. A quick look at the amd64 version, for instance,
shows that the "function" parameter is not used.

--
Joel