Reusing GCC code in GDB
Alan Hayward <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
I’m looking at a GDB issue where GDB is not consistent with GCC*, and requires (more or less) the rewrite of a self-contained section of code in the GDB aarch64 backend. Given GCC already has the correct behaviour, I’m considering copying the block of GCC code (all from gcc/config/aarch64/aarch64.c) into GDB (gdb/aarch64-tdep.c) and replacing the GCC structures with the equivalent GDB ones. Unless the gdb code requires it, I’m NOT planning on changing the function names, code comments or code flow logic. Given that GDB and GCC are both FSF projects, I was hoping that this would be ok. However, I wanted to check first before I went ahead. Thanks, Alan. *pr gdb/22943. The issue is passing structures in FP registers for function arguments (HVAs and HFAs). GDB doesn’t take into account nested structures. I’m looking at using the gcc function aarch64_vfp_is_call_or_return_candidate() and the sub functions it uses.