aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-08-10 22:08:22 +0000
committerMichael Snyder <msnyder@vmware.com>2007-08-10 22:08:22 +0000
commit6aef78af044573aa92d16b989b73a959cb97773f (patch)
tree72842c86ca73851452ab82790ee8aa3c45cdeae1
parent46be51c450c8ba1d31e0130bb8b981bd5722648b (diff)
downloadgdb-6aef78af044573aa92d16b989b73a959cb97773f.zip
gdb-6aef78af044573aa92d16b989b73a959cb97773f.tar.gz
gdb-6aef78af044573aa92d16b989b73a959cb97773f.tar.bz2
2007-08-10 Michael Snyder <msnyder@access-company.com>
* stabsread.c (read_huge_number): Attempt to compute value before values that it depends on.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/stabsread.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c5ea139..c4f6ede 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2007-08-10 Michael Snyder <msnyder@access-company.com>
+ * stabsread.c (read_huge_number): Attempt to compute value before
+ values that it depends on.
+
* linespec.c (decode_dollar): Dead code, ptr can't be non-null.
(decode_objc): Use "NULL" instead of 0.
(find_method): Ditto.
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index e155087..678b3cf 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -3714,7 +3714,7 @@ read_huge_number (char **pp, int end, int *bits, int twos_complement_bits)
int nbits = 0;
int c;
long upper_limit;
- int twos_complement_representation = radix == 8 && twos_complement_bits > 0;
+ int twos_complement_representation;
if (*p == '-')
{
@@ -3730,6 +3730,7 @@ read_huge_number (char **pp, int end, int *bits, int twos_complement_bits)
p++;
}
+ twos_complement_representation = radix == 8 && twos_complement_bits > 0;
upper_limit = LONG_MAX / radix;
while ((c = *p++) >= '0' && c < ('0' + radix))