foss-for-synopsys-dwc-arc-processors / binutils-gdb

A mirror of the upstream binutils-gdb repository for ARC specific work
GNU General Public License v2.0
13 stars 10 forks source link

GDB target function call doesn't support structure returns values #73

Open shahab-vahedi opened 1 year ago

shahab-vahedi commented 1 year ago

This is similar to GDB gets invalid return value when calling function that returns "double complex".

The issue is that GDB doesn't support invocation of functions that return structure. According to ABI, in this case caller should allocate space for the structure and pass its address in R0 register, shifting the rest of arguments in registers. Currently GDB simply doesn't handle this case.

I don't have a test case, but I see this in GDB code.

kolesov