Re: [PATCH v4] infcall: Add support for integer literals as reference function paramters

Tom Tromey
2026-01-30T21:00:19Z

>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> - Allocate to stack instead of heap

I'm curious why this change was made.
Often I think gdb just coerces to memory via malloc.

Also other calls in this area seem to check
thread_stack_temporaries_enabled_p. Not sure if that's needed?
Maybe it's expected to be set and this can just be asserted?

This is not really an area I know much about.

Keith> + if (new_value->lval () != lval_memory
Keith> + && language_pass_by_reference (new_value->type ())
Keith> + .trivially_copyable)

This subexpression should be parenthesized and the '.' lined up with the
'l'.

Tom