diff options
author | Joseph Myers <jsm@polyomino.org.uk> | 2008-06-27 20:15:01 +0000 |
---|---|---|
committer | Joseph Myers <jsm@polyomino.org.uk> | 2008-06-27 20:15:01 +0000 |
commit | e54f90a3eb2db1cbbaf55c00645cce1ce611bd39 (patch) | |
tree | 0090bb8d08fdf289901ee4c8bf3c44c40b5b084e | |
parent | 1ffd7c5426973ea679cc5300e5b7ee019235bd4c (diff) | |
download | gdb-e54f90a3eb2db1cbbaf55c00645cce1ce611bd39.tar.gz |
* dfp.c (decimal_convert): Call match_endianness before and after
conversion.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dfp.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 43d3851f970..25b8de39bac 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-06-27 Joseph Myers <joseph@codesourcery.com> + + * dfp.c (decimal_convert): Call match_endianness before and after + conversion. + 2008-06-27 Jonathan Larmour <jifl@eCosCentric.com> * remote.c (remote_insert_breakpoint): Ensure that if Z0 diff --git a/gdb/dfp.c b/gdb/dfp.c index fff82880742..9816d272e89 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); } |