aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-03-01 15:13:21 -0700
committerTom Tromey <tromey@adacore.com>2023-03-27 08:20:29 -0600
commit303a881f8789733248f27af0c872d356a34be009 (patch)
tree9ffda24d7cd521e72e568bae8d8df20e5c94bc7a /gdb/utils.c
parentd784fa8fb2936fb9bd2ebb8e1854b855ca206d96 (diff)
downloadgdb-303a881f8789733248f27af0c872d356a34be009.zip
gdb-303a881f8789733248f27af0c872d356a34be009.tar.gz
gdb-303a881f8789733248f27af0c872d356a34be009.tar.bz2
Use gdb_gmp for scalar arithmetic
This changes gdb to use scalar arithmetic for expression evaluation. I suspect this patch is not truly complete, as there may be code paths that still don't correctly handle 128-bit integers. However, many things do work now. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30190
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index 8928295..4c7d665 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -723,36 +723,6 @@ myread (int desc, char *addr, int len)
return orglen;
}
-/* See utils.h. */
-
-ULONGEST
-uinteger_pow (ULONGEST v1, LONGEST v2)
-{
- if (v2 < 0)
- {
- if (v1 == 0)
- error (_("Attempt to raise 0 to negative power."));
- else
- return 0;
- }
- else
- {
- /* The Russian Peasant's Algorithm. */
- ULONGEST v;
-
- v = 1;
- for (;;)
- {
- if (v2 & 1L)
- v *= v1;
- v2 >>= 1;
- if (v2 == 0)
- return v;
- v1 *= v1;
- }
- }
-}
-
/* An RAII class that sets up to handle input and then tears down