target: get_gdb_arch() accepts target via const pointer 93/8093/2
authorEvgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Fri, 12 Jan 2024 13:29:32 +0000 (16:29 +0300)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 28 Jan 2024 14:18:54 +0000 (14:18 +0000)
commit1b0ffa97ea90c09e96b068450644e462102c10ae
tree46f5a26901a23977b90d380c4cdeab54d0b006bd
parent67675323e1ea09b5d1a4250bf58163103c85b844
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>
13 files changed:
src/target/arm.h
src/target/armv4_5.c
src/target/armv8.c
src/target/esirisc.c
src/target/esirisc.h
src/target/mem_ap.c
src/target/riscv/riscv.c
src/target/stm8.c
src/target/target.c
src/target/target.h
src/target/target_type.h
src/target/xtensa/xtensa.c
src/target/xtensa/xtensa.h

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)