diff options
author | Pedro Alves <palves@redhat.com> | 2009-07-20 18:51:42 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-07-20 18:51:42 +0000 |
commit | 08d1664121e7855d2477854ff1473e82d1731044 (patch) | |
tree | e7c913ae91c6d24a95ecc2994a4e6e711da41bab /gdb/regformats | |
parent | a156a290642281359c8dc0c949fdd942826455a1 (diff) | |
download | binutils-gdb-08d1664121e7855d2477854ff1473e82d1731044.tar.gz |
2009-07-20 Pedro Alves <pedro@codesourcery.com>
* features/gdb-target.dtd (target): Accept an optional 'osabi'
element.
(osabi): Define element.
* features/mips-linux.xml (target): Add an osabi subelement set to
GNU/Linux.
* regformats/regdat.sh (xmlarch, xmlosabi): New variables. Don't
write the architecture into $xmltarget. Store it in $xmlarch.
Handle the 'osabi' type. Handle outputting the osabi element of
the target description.
* regformats/reg-x86-64-linux.dat (osabi): Set to GNU/Linux.
* regformats/reg-i386-linux.dat (osabi): Set to GNU/Linux.
* target-descriptions.h (tdesc_osabi, set_tdesc_osabi): Declare.
* target-descriptions.c (struct target_desc) <osabi>: New field.
(tdesc_osabi): New function.
(set_tdesc_osabi): New function.
* xml-tdesc.c: Include osabi.h.
(tdesc_end_osabi): New.
(target_children): Parse "osabi" elements.
* arch-utils.c (gdbarch_info_fill): Try to get the osabi from the
target description if the user didn't override it or it is not
extractable from the bfd. If that still fails, fallback to the
configured in default.
* osabi.h (osabi_from_tdesc_string): Declare.
* osabi.c (osabi_from_tdesc_string): New.
(gdbarch_lookup_osabi): Return GDB_OSABI_UNKNOWN instead of
GDB_OSABI_DEFAULT.
* NEWS: Mention that target descriptions can now describe the
target OS ABI.
2009-07-20 Pedro Alves <pedro@codesourcery.com>
* gdb.texinfo (Target Description Format): Mention the new <osabi>
optional element.
(subsection OS ABI): New subsection.
Diffstat (limited to 'gdb/regformats')
-rw-r--r-- | gdb/regformats/reg-i386-linux.dat | 1 | ||||
-rw-r--r-- | gdb/regformats/reg-x86-64-linux.dat | 1 | ||||
-rwxr-xr-x | gdb/regformats/regdat.sh | 20 |
3 files changed, 20 insertions, 2 deletions
diff --git a/gdb/regformats/reg-i386-linux.dat b/gdb/regformats/reg-i386-linux.dat index 8ea3d1167df..33452ac3f74 100644 --- a/gdb/regformats/reg-i386-linux.dat +++ b/gdb/regformats/reg-i386-linux.dat @@ -1,5 +1,6 @@ name:i386_linux xmlarch:i386 +osabi:GNU/Linux expedite:ebp,esp,eip 32:eax 32:ecx diff --git a/gdb/regformats/reg-x86-64-linux.dat b/gdb/regformats/reg-x86-64-linux.dat index 656f72aba67..6121db9844c 100644 --- a/gdb/regformats/reg-x86-64-linux.dat +++ b/gdb/regformats/reg-x86-64-linux.dat @@ -1,5 +1,6 @@ name:x86_64_linux xmlarch:i386:x86-64 +osabi:GNU/Linux expedite:rbp,rsp,rip 64:rax 64:rbx diff --git a/gdb/regformats/regdat.sh b/gdb/regformats/regdat.sh index e75beea8dee..b04df7fb497 100755 --- a/gdb/regformats/regdat.sh +++ b/gdb/regformats/regdat.sh @@ -128,6 +128,8 @@ offset=0 i=0 name=x xmltarget=x +xmlarch=x +xmlosabi=x expedite=x exec < $1 while do_read @@ -140,7 +142,10 @@ do xmltarget="${entry}" continue elif test "${type}" = "xmlarch"; then - xmltarget="@<target><architecture>${entry}</architecture></target>" + xmlarch="${entry}" + continue + elif test "${type}" = "osabi"; then + xmlosabi="${entry}" continue elif test "${type}" = "expedite"; then expedite="${entry}" @@ -159,7 +164,18 @@ echo "};" echo echo "const char *expedite_regs_${name}[] = { \"`echo ${expedite} | sed 's/,/", "/g'`\", 0 };" if test "${xmltarget}" = x; then - echo "const char *xmltarget_${name} = 0;" + if test "${xmlarch}" = x && test "${xmlosabi}" = x; then + echo "const char *xmltarget_${name} = 0;" + else + echo "const char *xmltarget_${name} = \"@<target>\\" + if test "${xmlarch}" != x; then + echo "<architecture>${xmlarch}</architecture>\\" + fi + if test "${xmlosabi}" != x; then + echo "<osabi>${xmlosabi}</osabi>\\" + fi + echo "</target>\";" + fi else echo "const char *xmltarget_${name} = \"${xmltarget}\";" fi |