aboutsummaryrefslogtreecommitdiff
path: root/gdb/dfp.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2008-06-27 20:15:01 +0000
committerJoseph Myers <joseph@codesourcery.com>2008-06-27 20:15:01 +0000
commitcd0b43b1f14f8d962924a92165b955f4b5956450 (patch)
treeba3f181010251512cc3612e4372b1d047224a9cd /gdb/dfp.c
parent7c0f6dcc1a42f4432e4d26bf2eeceef44f73b6f3 (diff)
downloadgdb-cd0b43b1f14f8d962924a92165b955f4b5956450.zip
gdb-cd0b43b1f14f8d962924a92165b955f4b5956450.tar.gz
gdb-cd0b43b1f14f8d962924a92165b955f4b5956450.tar.bz2
* dfp.c (decimal_convert): Call match_endianness before and after
conversion.
Diffstat (limited to 'gdb/dfp.c')
-rw-r--r--gdb/dfp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/dfp.c b/gdb/dfp.c
index fff8288..9816d27 100644
--- a/gdb/dfp.c
+++ b/gdb/dfp.c
@@ -395,7 +395,12 @@ decimal_convert (const gdb_byte *from, int len_from, gdb_byte *to,
int len_to)
{
decNumber number;
+ gdb_byte dec[16];
+
+ match_endianness (from, len_from, dec);
+
+ decimal_to_number (dec, len_from, &number);
+ decimal_from_number (&number, dec, len_to);
- decimal_to_number (from, len_from, &number);
- decimal_from_number (&number, to, len_to);
+ match_endianness (dec, len_to, to);
}