Re: [PATCH PR gdb/22736] [aarch64] gdb crashes on a conditional breakpoint with cast return type

Weimin Pan
2018-05-29T21:37:43Z

On 5/29/2018 1:40 PM, Simon Marchi wrote:
> On 2018-05-29 01:11 PM, Wei-min Pan wrote:
>> Since call_function_by_hand_dummy () already calls gdbarch_return_in_first_hidden_param_p() and sets
>> hidden_first_param_p accordingly. Instead of passing the deault_return_type and having the target make
>> the same call again , I think we should just pass hidden_first_param_p to gdbarch_push_dummy_call()?
> I can't really tell, I am a bit confused by gdbarch_return_in_first_hidden_param_p vs
> using_struct_return, and the fact that the AArch64 code also checks
> language_pass_by_reference on the function's return value type. You are suggesting
> replacing the call to language_pass_by_reference in aarch64_push_dummy_call by
> the result of gdbarch_return_in_first_hidden_param_p coming from call_function_by_hand_dummy?
> Is it really equivalent?
>
> Simon

The traceback below shows that gdbarch_return_in_first_hidden_param_p()
does
call language_pass_by_reference():

#0Â  gnuv3_pass_by_reference (type=0xbe0760) at gnu-v3-abi.c:1255
#1Â  0x000000000052cdc0 in cp_pass_by_reference (type=<optimized out>)
Â Â Â  at cp-abi.c:229
#2Â  0x00000000005d7428 in language_pass_by_reference (type=<optimized out>)
Â Â Â  at language.c:662
#3Â  0x00000000005a35c4 in gdbarch_return_in_first_hidden_param_p (
Â Â Â  gdbarch=gdbarch@entry=0xbd6100, type=0xbe0760) at gdbarch.c:2740
#4Â  0x00000000005bbe7c in call_function_by_hand_dummy (function=0xc319e0,
Â Â Â  default_return_type=default_return_type@entry=0xbe0760, nargs=0,
Â Â Â  args=0xffffffffe118, dummy_dtor=dummy_dtor@entry=0x0,
Â Â Â  dummy_dtor_data=dummy_dtor_data@entry=0x0) at infcall.c:894
Â .....

Since I just learned this morning that Alan has been working on this PR,
maybe it's
best for meÂ  to withdraw the patch that I submitted. Sorry about that.

Weimin