gdb: LoongArch: Implement the return_value gdbarch method

When execute the following command on LoongArch:

  make check-gdb TESTS="gdb.base/async.exp"

there exist the following failed testcases:

  FAIL: gdb.base/async.exp: finish& (timeout)
  FAIL: gdb.base/async.exp: jump& (timeout)
  FAIL: gdb.base/async.exp: until& (timeout)
  FAIL: gdb.base/async.exp: set exec-done-display off (GDB internal error)

we can see the following messages in gdb/testsuite/gdb.log:

  finish&
  Run till exit from #0  foo () at /home/loongson/gdb.git/gdb/testsuite/gdb.base/async.c:9
  (gdb) /home/loongson/gdb.git/gdb/gdbarch.c:2646: internal-error: gdbarch_return_value: Assertion `gdbarch->return_value != NULL' failed.
  A problem internal to GDB has been detected,
  further debugging may prove unreliable.

In order to fix the above failed testcases, implement the return_value
gdbarch method on LoongArch.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
1 file changed