This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/4] Use flexible target descriptors for aarch64


Alan Hayward <Alan.Hayward@arm.com> writes:

> In the existing code, osabi is never set for aarch64 - the osabi line is missing
> from the .xml files. Some other architectures set to “GNU/Linux”. I assumed
> there was a reason aarch64 didn’t do this. I didn’t want to change
> this behaviour,

Agreed, it should be a separated patch to address this, if needed.  See
PR 19895 "gdbserver target description on aarch64/arm doesn't specify osabi"

> so instead in my code osabi is set to “”.

However, setting osabi to "" in GDBserver may slightly change the
the XML content GDB received from GDBserver.  Without your changes, the
XML contents received from GDBserver doesn't have "<osabi>XXX</osabi>",
however with your changes, the XML contents have "<osabi></osabi>".  Can
you confirm this?  The change like this doesn't affect any GDB's
behavior, because osabi in GDB side is still GDB_OSABI_UNKNOWN.

On the other hand, "osabi" is an optional field,
https://sourceware.org/gdb/current/onlinedocs/gdb/Target-Description-Format.html
so it is optional in "tdesc" too.  IMO, we need to remove
"tdesc->osabi != NULL" from the assert, and let GDBserver only generate
"<osabi>XXX</osabi>" when tdesc->osabi isn't NULL.  What do you think?

-- 
Yao (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]