From a04b53379a18c66376b4130dc3b4936e6433a0e5 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Tue, 25 Jul 2017 15:25:38 +0100 Subject: [PATCH] Make amd64_x32_init_abi and amd64_init_abi argument constant gdb: 2017-07-25 Yao Qi * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc constant. (amd64_x32_init_abi): Likewise. * amd64-tdep.h (amd64_init_abi): Update declaration. (amd64_x32_init_abi): Likewise. --- gdb/ChangeLog | 8 ++++++++ gdb/amd64-tdep.c | 4 ++-- gdb/amd64-tdep.h | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index eb49001c58e..5aa760971ae 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2017-07-25 Yao Qi + + * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc + constant. + (amd64_x32_init_abi): Likewise. + * amd64-tdep.h (amd64_init_abi): Update declaration. + (amd64_x32_init_abi): Likewise. + 2017-07-25 Yao Qi PR tdep/21717 diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 6171bc598d5..f647402af7c 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -3006,7 +3006,7 @@ static const int amd64_record_regmap[] = void amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch, - target_desc *default_tdesc) + const target_desc *default_tdesc) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); const struct target_desc *tdesc = info.target_desc; @@ -3198,7 +3198,7 @@ amd64_x32_pseudo_register_type (struct gdbarch *gdbarch, int regnum) void amd64_x32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch, - target_desc *default_tdesc) + const target_desc *default_tdesc) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); diff --git a/gdb/amd64-tdep.h b/gdb/amd64-tdep.h index d4c6c9aeaab..c1caf999b81 100644 --- a/gdb/amd64-tdep.h +++ b/gdb/amd64-tdep.h @@ -102,13 +102,13 @@ extern void amd64_displaced_step_fixup (struct gdbarch *gdbarch, tdesc, if INFO does not specify one. */ extern void amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch, - target_desc *default_tdesc); + const target_desc *default_tdesc); /* Initialize the ABI for x32. Uses DEFAULT_TDESC as fallback tdesc, if INFO does not specify one. */ extern void amd64_x32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch, - target_desc *default_tdesc); + const target_desc *default_tdesc); extern const struct target_desc *amd64_target_description (uint64_t xcr0); /* Fill register REGNUM in REGCACHE with the appropriate -- 2.30.2