OSDN Git Service
(root)
/
pf3gnuchains
/
pf3gnuchains3x.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f31ddb9
)
* valarith.c (value_binop): Handle unsigned integer
author
muller
<muller>
Tue, 29 Jan 2008 14:24:43 +0000
(14:24 +0000)
committer
muller
<muller>
Tue, 29 Jan 2008 14:24:43 +0000
(14:24 +0000)
division by zero.
gdb/ChangeLog
patch
|
blob
|
history
gdb/valarith.c
patch
|
blob
|
history
diff --git
a/gdb/ChangeLog
b/gdb/ChangeLog
index
2e594f2
..
cc27fa9
100644
(file)
--- a/
gdb/ChangeLog
+++ b/
gdb/ChangeLog
@@
-1,3
+1,8
@@
+2008-01-29 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * valarith.c (value_binop): Handle unsigned integer
+ division by zero.
+
2008-01-28 Kevin Buettner <kevinb@redhat.com>
* mn10300-tdep.c (mn10300_analyze_prologue): Check for an
diff --git
a/gdb/valarith.c
b/gdb/valarith.c
index
173c7a5
..
2fa435d
100644
(file)
--- a/
gdb/valarith.c
+++ b/
gdb/valarith.c
@@
-1035,7
+1035,10
@@
value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
case BINOP_DIV:
case BINOP_INTDIV:
- v = v1 / v2;
+ if (v2 != 0)
+ v = v1 / v2;
+ else
+ error (_("Division by zero"));
break;
case BINOP_EXP: