diff options
author | Alan Hayward <alan.hayward@arm.com> | 2017-11-16 10:05:21 +0000 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2017-11-16 10:09:17 +0000 |
commit | 1d0aa65c24f7c6406718cb506bed912aeec1d5c9 (patch) | |
tree | eb5ecfeadc41fe415dfb638a0f7d527af3a3bdb5 /gdb/gdbserver | |
parent | 3491a34c4f7de10dbd19c719052642d8471c45a6 (diff) | |
download | gdb-1d0aa65c24f7c6406718cb506bed912aeec1d5c9.zip gdb-1d0aa65c24f7c6406718cb506bed912aeec1d5c9.tar.gz gdb-1d0aa65c24f7c6406718cb506bed912aeec1d5c9.tar.bz2 |
Allow osabi to be optional in target descriptions
gdbserver/
* tdesc.c (tdesc_get_features_xml): Allow null osabi.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/gdbserver/tdesc.c | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 138d6bc..7e72b7c 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2017-11-16 Alan Hayward <alan.hayward@arm.com> + + * tdesc.c (tdesc_get_features_xml): Allow null osabi. + 2017-11-16 Yao Qi <yao.qi@linaro.org> * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf. diff --git a/gdb/gdbserver/tdesc.c b/gdb/gdbserver/tdesc.c index 63d6467..e2c4288 100644 --- a/gdb/gdbserver/tdesc.c +++ b/gdb/gdbserver/tdesc.c @@ -92,8 +92,7 @@ tdesc_get_features_xml (target_desc *tdesc) /* Either .xmltarget or .features is not NULL. */ gdb_assert (tdesc->xmltarget != NULL || (tdesc->features != NULL - && tdesc->arch != NULL - && tdesc->osabi != NULL)); + && tdesc->arch != NULL)); if (tdesc->xmltarget == NULL) { @@ -105,9 +104,12 @@ tdesc_get_features_xml (target_desc *tdesc) buffer += tdesc->arch; buffer += "</architecture>"; - buffer += "<osabi>"; - buffer += tdesc->osabi; - buffer += "</osabi>"; + if (tdesc->osabi != nullptr) + { + buffer += "<osabi>"; + buffer += tdesc->osabi; + buffer += "</osabi>"; + } char *xml; |