diff options
author | Pierre Muller <muller@ics.u-strasbg.fr> | 2003-03-11 16:38:52 +0000 |
---|---|---|
committer | Pierre Muller <muller@ics.u-strasbg.fr> | 2003-03-11 16:38:52 +0000 |
commit | 7ea497b0925741f7a2a7319427d0f9475279c276 (patch) | |
tree | 0ea9446bf630c1cd511c79312e8dc26486dcbfaf | |
parent | 2db8a2f178d54beaa8437f2673efb58bc6749c7d (diff) | |
download | gdb-7ea497b0925741f7a2a7319427d0f9475279c276.tar.gz |
2003-03-11 Pierre Muller <muller@ics.u-strasbg.fr>
* doublest.c (floatformat_from_length): Accept also
the real size of 'long double' type.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doublest.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9407556ae68..da117699255 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-03-11 Pierre Muller <muller@ics.u-strasbg.fr> + + * doublest.c (floatformat_from_length): Accept also + the real size of 'long double' type. + 2003-03-10 Klee Dienes <kdienes@apple.com> * breakpoint.c (bpstat_copy): Copy the command lines as well diff --git a/gdb/doublest.c b/gdb/doublest.c index e601a4dc405..3f68273877c 100644 --- a/gdb/doublest.c +++ b/gdb/doublest.c @@ -633,6 +633,14 @@ floatformat_from_length (int len) return TARGET_DOUBLE_FORMAT; else if (len * TARGET_CHAR_BIT == TARGET_LONG_DOUBLE_BIT) return TARGET_LONG_DOUBLE_FORMAT; + /* On i386 the 'long double' type takes 96 bits, + while the real number of used bits is only 80, + both in processor and in memory. + The code below accepts the real bit size. */ + else if ((TARGET_LONG_DOUBLE_FORMAT != NULL) + && (len * TARGET_CHAR_BIT == + TARGET_LONG_DOUBLE_FORMAT->totalsize)) + return TARGET_LONG_DOUBLE_FORMAT; return NULL; } |