aboutsummaryrefslogtreecommitdiff
path: root/src/target/riscv
diff options
context:
space:
mode:
authorEvgeniy Naydanov <evgeniy.naydanov@syntacore.com>2024-01-12 16:29:32 +0300
committerAntonio Borneo <borneo.antonio@gmail.com>2024-01-28 14:18:54 +0000
commit1b0ffa97ea90c09e96b068450644e462102c10ae (patch)
tree46f5a26901a23977b90d380c4cdeab54d0b006bd /src/target/riscv
parent67675323e1ea09b5d1a4250bf58163103c85b844 (diff)
downloadriscv-openocd-1b0ffa97ea90c09e96b068450644e462102c10ae.zip
riscv-openocd-1b0ffa97ea90c09e96b068450644e462102c10ae.tar.gz
riscv-openocd-1b0ffa97ea90c09e96b068450644e462102c10ae.tar.bz2
target: get_gdb_arch() accepts target via const pointer
The function in question does not need to change target state. It is a target-type-dependant function, however, IMHO, it is safe to assume that any target type would not need to change type-independant state of a target to figure out the arch. Change-Id: I607cb3aee6529cd5a97bc1200a0226cf6ef43caf Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8093 Tested-by: jenkins Reviewed-by: Jan Matyas <jan.matyas@codasip.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src/target/riscv')
-rw-r--r--src/target/riscv/riscv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index cb8d04f..d895ca3 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -1744,7 +1744,7 @@ static int riscv_write_memory(struct target *target, target_addr_t address,
return tt->write_memory(target, address, size, count, buffer);
}
-static const char *riscv_get_gdb_arch(struct target *target)
+static const char *riscv_get_gdb_arch(const struct target *target)
{
switch (riscv_xlen(target)) {
case 32: