forked from Imagelibrary/binutils-gdb
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
This commit is contained in:
@@ -1609,14 +1609,14 @@ fbsd_get_siginfo_type (struct gdbarch *gdbarch)
|
||||
/* __pid_t */
|
||||
pid_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF,
|
||||
TYPE_LENGTH (int32_type) * TARGET_CHAR_BIT, "__pid_t");
|
||||
TYPE_TARGET_TYPE (pid_type) = int32_type;
|
||||
pid_type->set_target_type (int32_type);
|
||||
pid_type->set_target_is_stub (true);
|
||||
|
||||
/* __uid_t */
|
||||
uid_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF,
|
||||
TYPE_LENGTH (uint32_type) * TARGET_CHAR_BIT,
|
||||
"__uid_t");
|
||||
TYPE_TARGET_TYPE (uid_type) = uint32_type;
|
||||
uid_type->set_target_type (uint32_type);
|
||||
pid_type->set_target_is_stub (true);
|
||||
|
||||
/* _reason */
|
||||
|
||||
Reference in New Issue
Block a user