X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fmsp430-tdep.c;h=7fa4475aa2c24d0b5fd94e83850f4c577823153f;hb=098caef485a4ece6096e6cdbb4cd9726e4a13386;hp=0e55eab22fe01a230acddbd2d525eb2c6e1d5ee8;hpb=c825904428f7c89a65eeb313b243f65e950a0a19;p=binutils-gdb.git diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c index 0e55eab22fe..7fa4475aa2c 100644 --- a/gdb/msp430-tdep.c +++ b/gdb/msp430-tdep.c @@ -1,7 +1,7 @@ /* Target-dependent code for the Texas Instruments MSP430 for GDB, the GNU debugger. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2021 Free Software Foundation, Inc. Contributed by Red Hat, Inc. @@ -32,7 +32,7 @@ #include "frame-base.h" #include "value.h" #include "gdbcore.h" -#include "dwarf2-frame.h" +#include "dwarf2/frame.h" #include "reggroups.h" #include "elf/msp430.h" @@ -466,7 +466,7 @@ msp430_analyze_frame_prologue (struct frame_info *this_frame, stop_addr = get_frame_pc (this_frame); /* If we couldn't find any function containing the PC, then - just initialize the prologue cache, but don't do anything. */ + just initialize the prologue cache, but don't do anything. */ if (!func_start) stop_addr = func_start; @@ -570,8 +570,8 @@ msp430_return_value (struct gdbarch *gdbarch, int code_model = gdbarch_tdep (gdbarch)->code_model; if (TYPE_LENGTH (valtype) > 8 - || TYPE_CODE (valtype) == TYPE_CODE_STRUCT - || TYPE_CODE (valtype) == TYPE_CODE_UNION) + || valtype->code () == TYPE_CODE_STRUCT + || valtype->code () == TYPE_CODE_UNION) return RETURN_VALUE_STRUCT_CONVENTION; if (readbuf) @@ -585,7 +585,7 @@ msp430_return_value (struct gdbarch *gdbarch, int size = 2; if (code_model == MSP_LARGE_CODE_MODEL - && TYPE_CODE (valtype) == TYPE_CODE_PTR) + && valtype->code () == TYPE_CODE_PTR) { size = 4; } @@ -609,7 +609,7 @@ msp430_return_value (struct gdbarch *gdbarch, int size = 2; if (code_model == MSP_LARGE_CODE_MODEL - && TYPE_CODE (valtype) == TYPE_CODE_PTR) + && valtype->code () == TYPE_CODE_PTR) { size = 4; } @@ -652,12 +652,12 @@ msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct type *func_type = value_type (function); /* Dereference function pointer types. */ - while (TYPE_CODE (func_type) == TYPE_CODE_PTR) + while (func_type->code () == TYPE_CODE_PTR) func_type = TYPE_TARGET_TYPE (func_type); /* The end result had better be a function or a method. */ - gdb_assert (TYPE_CODE (func_type) == TYPE_CODE_FUNC - || TYPE_CODE (func_type) == TYPE_CODE_METHOD); + gdb_assert (func_type->code () == TYPE_CODE_FUNC + || func_type->code () == TYPE_CODE_METHOD); /* We make two passes; the first does the stack allocation, the second actually stores the arguments. */ @@ -691,8 +691,8 @@ msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function, current_arg_on_stack = 0; - if (TYPE_CODE (arg_type) == TYPE_CODE_STRUCT - || TYPE_CODE (arg_type) == TYPE_CODE_UNION) + if (arg_type->code () == TYPE_CODE_STRUCT + || arg_type->code () == TYPE_CODE_UNION) { /* Aggregates of any size are passed by reference. */ store_unsigned_integer (struct_addr_buf, 4, byte_order, @@ -703,7 +703,7 @@ msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function, else { /* Scalars bigger than 8 bytes such as complex doubles are passed - on the stack. */ + on the stack. */ if (arg_size > 8) current_arg_on_stack = 1; } @@ -712,8 +712,8 @@ msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (offset = 0; offset < arg_size; offset += 2) { /* The condition below prevents 8 byte scalars from being split - between registers and memory (stack). It also prevents other - splits once the stack has been written to. */ + between registers and memory (stack). It also prevents other + splits once the stack has been written to. */ if (!current_arg_on_stack && (arg_reg + ((arg_size == 8 || args_on_stack) @@ -723,10 +723,10 @@ msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function, int size = 2; if (code_model == MSP_LARGE_CODE_MODEL - && (TYPE_CODE (arg_type) == TYPE_CODE_PTR - || TYPE_IS_REFERENCE (arg_type) - || TYPE_CODE (arg_type) == TYPE_CODE_STRUCT - || TYPE_CODE (arg_type) == TYPE_CODE_UNION)) + && (arg_type->code () == TYPE_CODE_PTR + || TYPE_IS_REFERENCE (arg_type) + || arg_type->code () == TYPE_CODE_STRUCT + || arg_type->code () == TYPE_CODE_UNION)) { /* When using the large memory model, pointer, reference, struct, and union arguments are @@ -808,7 +808,7 @@ msp430_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) if (!bms.minsym) return pc; - stub_name = MSYMBOL_LINKAGE_NAME (bms.minsym); + stub_name = bms.minsym->linkage_name (); if (gdbarch_tdep (gdbarch)->code_model == MSP_SMALL_CODE_MODEL && msp430_in_return_stub (gdbarch, pc, stub_name)) @@ -986,8 +986,9 @@ msp430_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Register the initialization routine. */ +void _initialize_msp430_tdep (); void -_initialize_msp430_tdep (void) +_initialize_msp430_tdep () { register_gdbarch_init (bfd_arch_msp430, msp430_gdbarch_init); }