projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41808eb
)
* valarith.c (value_binop): Handle unsigned BINOP_REM division by zero.
author
Doug Evans
<dje@google.com>
Sun, 3 Feb 2008 01:51:04 +0000
(
01:51
+0000)
committer
Doug Evans
<dje@google.com>
Sun, 3 Feb 2008 01:51:04 +0000
(
01:51
+0000)
gdb/ChangeLog
patch
|
blob
|
history
gdb/valarith.c
patch
|
blob
|
history
diff --git
a/gdb/ChangeLog
b/gdb/ChangeLog
index 7f90ef2e0efde625e8b66a90ffcded9fb8674ddc..a05058c18335a65b694e9f263af9a9ac8b442626 100644
(file)
--- a/
gdb/ChangeLog
+++ b/
gdb/ChangeLog
@@
-1,5
+1,7
@@
2008-02-02 Doug Evans <dje@google.com>
+ * valarith.c (value_binop): Handle unsigned BINOP_REM division by zero.
+
* typeprint.c (*): Whitespace cleanup.
2008-02-02 Mark Kettenis <kettenis@gnu.org>
diff --git
a/gdb/valarith.c
b/gdb/valarith.c
index e69aaa67567d0925c2b50778746a94e65a2a1690..62059122c07f737c41f984872865db5a01519bc9 100644
(file)
--- a/
gdb/valarith.c
+++ b/
gdb/valarith.c
@@
-1116,7
+1116,10
@@
value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
break;
case BINOP_REM:
- v = v1 % v2;
+ if (v2 != 0)
+ v = v1 % v2;
+ else
+ error (_("Division by zero"));
break;
case BINOP_MOD: