aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-04-13 06:32:28 -0600
committerTom Tromey <tromey@adacore.com>2022-04-14 12:12:34 -0600
commit9da74023eb9378315d6b7e1bae02f52cfecc8bd1 (patch)
treec519554680c772ab554cbc6a4083000842dbda67 /gdb/target.c
parent3b1bdd53b5a9f0798a9315fa9309d2979045aeaf (diff)
downloadgdb-9da74023eb9378315d6b7e1bae02f52cfecc8bd1.zip
gdb-9da74023eb9378315d6b7e1bae02f52cfecc8bd1.tar.gz
gdb-9da74023eb9378315d6b7e1bae02f52cfecc8bd1.tar.bz2
Remove the byte order parameter to target_read_string
target_read_string takes a byte order parameter, but only uses this to check whether a given character is zero. This is readily done without requiring the parameter, so remove it.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/target.c b/gdb/target.c
index 6542305..5a416d5 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1406,8 +1406,7 @@ target_read_string (CORE_ADDR memaddr, int len, int *bytes_read)
bytes_read = &ignore;
/* Note that the endian-ness does not matter here. */
- int errcode = target_read_string (memaddr, -1, 1, len, BFD_ENDIAN_LITTLE,
- &buffer, bytes_read);
+ int errcode = target_read_string (memaddr, -1, 1, len, &buffer, bytes_read);
if (errcode != 0)
return {};