aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-07-30 12:07:39 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-09-21 10:53:55 -0400
commit8a50fdcefc44c40d5c4b978f19c22ddfbeb29139 (patch)
tree423aae459c642ed5542af312098835612df0ec84 /gdb/windows-tdep.c
parent0242db993f8ad0a0de16dafc4ebd35bb6190c833 (diff)
downloadfsf-binutils-gdb-8a50fdcefc44c40d5c4b978f19c22ddfbeb29139.zip
fsf-binutils-gdb-8a50fdcefc44c40d5c4b978f19c22ddfbeb29139.tar.gz
fsf-binutils-gdb-8a50fdcefc44c40d5c4b978f19c22ddfbeb29139.tar.bz2
gdb: add type::target_type / type::set_target_type
Add the `target_type` and `set_target_type` methods on `struct type`, in order to remove the `TYPE_TARGET_TYPE` macro. In this patch, the macro is changed to use the getter, so all the call sites of the macro that are used as a setter are changed to use the setter method directly. The next patch will remove the macro completely. Change-Id: I85ce24d847763badd34fdee3e14b8c8c14cb3161
Diffstat (limited to 'gdb/windows-tdep.c')
-rw-r--r--gdb/windows-tdep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c
index e5e37fc..c4c76e3 100644
--- a/gdb/windows-tdep.c
+++ b/gdb/windows-tdep.c
@@ -246,7 +246,7 @@ windows_get_tlb_type (struct gdbarch *gdbarch)
seh_ptr_type = arch_type (gdbarch, TYPE_CODE_PTR,
TYPE_LENGTH (void_ptr_type) * TARGET_CHAR_BIT,
NULL);
- TYPE_TARGET_TYPE (seh_ptr_type) = seh_type;
+ seh_ptr_type->set_target_type (seh_type);
append_composite_type_field (seh_type, "next_seh", seh_ptr_type);
append_composite_type_field (seh_type, "handler",
@@ -267,7 +267,7 @@ windows_get_tlb_type (struct gdbarch *gdbarch)
peb_ldr_ptr_type = arch_type (gdbarch, TYPE_CODE_PTR,
TYPE_LENGTH (void_ptr_type) * TARGET_CHAR_BIT,
NULL);
- TYPE_TARGET_TYPE (peb_ldr_ptr_type) = peb_ldr_type;
+ peb_ldr_ptr_type->set_target_type (peb_ldr_type);
/* struct UNICODE_STRING */
uni_str_type = arch_composite_type (gdbarch, "unicode_string",
@@ -337,7 +337,7 @@ windows_get_tlb_type (struct gdbarch *gdbarch)
peb_ptr_type = arch_type (gdbarch, TYPE_CODE_PTR,
TYPE_LENGTH (void_ptr_type) * TARGET_CHAR_BIT,
NULL);
- TYPE_TARGET_TYPE (peb_ptr_type) = peb_type;
+ peb_ptr_type->set_target_type (peb_type);
/* struct thread information block */
@@ -381,7 +381,7 @@ windows_get_tlb_type (struct gdbarch *gdbarch)
tib_ptr_type = arch_type (gdbarch, TYPE_CODE_PTR,
TYPE_LENGTH (void_ptr_type) * TARGET_CHAR_BIT,
NULL);
- TYPE_TARGET_TYPE (tib_ptr_type) = tib_type;
+ tib_ptr_type->set_target_type (tib_type);
windows_gdbarch_data->tib_ptr_type = tib_ptr_type;