aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-10-10 10:32:46 +0100
committerYao Qi <yao.qi@linaro.org>2016-10-10 10:32:46 +0100
commit97ce08cb8071bf9a8df6c99cdf8e9fbf1911f3f5 (patch)
treec419b4aaf9a0241881e98f0082e691baa94dcc58 /gdb
parentff12a6593a1675aa9ba5340aa2984af19cf8966c (diff)
downloadgdb-97ce08cb8071bf9a8df6c99cdf8e9fbf1911f3f5.zip
gdb-97ce08cb8071bf9a8df6c99cdf8e9fbf1911f3f5.tar.gz
gdb-97ce08cb8071bf9a8df6c99cdf8e9fbf1911f3f5.tar.bz2
Rename 'arch' by 'gdbarch' in m32c_gdbarch_init
This patch renames local 'arch' by 'gdbarch' in m32c_gdbarch_init, so that I can use macros in the following patch. gdb: 2016-10-10 Yao Qi <yao.qi@linaro.org> * m32c-tdep.c (m32c_gdbarch_init): Rename local 'arch' by 'gdbarch'.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/m32c-tdep.c42
2 files changed, 26 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1b76940..aac2b4b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2016-10-10 Yao Qi <yao.qi@linaro.org>
+ * m32c-tdep.c (m32c_gdbarch_init): Rename local 'arch' by
+ 'gdbarch'.
+
+2016-10-10 Yao Qi <yao.qi@linaro.org>
+
* v850-tdep.c (v850_breakpoint_from_pc): Use the right
breakpoint instruction.
(v850_dbtrap_breakpoint_from_pc): Remove.
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index 547c997..adfa873 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -2621,7 +2621,7 @@ m32c_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc,
static struct gdbarch *
m32c_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
- struct gdbarch *arch;
+ struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep;
unsigned long mach = info.bfd_arch_info->mach;
@@ -2633,51 +2633,51 @@ m32c_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return arches->gdbarch;
tdep = XCNEW (struct gdbarch_tdep);
- arch = gdbarch_alloc (&info, tdep);
+ gdbarch = gdbarch_alloc (&info, tdep);
/* Essential types. */
- make_types (arch);
+ make_types (gdbarch);
/* Address/pointer conversions. */
if (mach == bfd_mach_m16c)
{
- set_gdbarch_address_to_pointer (arch, m32c_m16c_address_to_pointer);
- set_gdbarch_pointer_to_address (arch, m32c_m16c_pointer_to_address);
+ set_gdbarch_address_to_pointer (gdbarch, m32c_m16c_address_to_pointer);
+ set_gdbarch_pointer_to_address (gdbarch, m32c_m16c_pointer_to_address);
}
/* Register set. */
- make_regs (arch);
+ make_regs (gdbarch);
/* Disassembly. */
- set_gdbarch_print_insn (arch, print_insn_m32c);
+ set_gdbarch_print_insn (gdbarch, print_insn_m32c);
/* Breakpoints. */
- set_gdbarch_breakpoint_from_pc (arch, m32c_breakpoint_from_pc);
+ set_gdbarch_breakpoint_from_pc (gdbarch, m32c_breakpoint_from_pc);
/* Prologue analysis and unwinding. */
- set_gdbarch_inner_than (arch, core_addr_lessthan);
- set_gdbarch_skip_prologue (arch, m32c_skip_prologue);
- set_gdbarch_unwind_pc (arch, m32c_unwind_pc);
- set_gdbarch_unwind_sp (arch, m32c_unwind_sp);
+ set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+ set_gdbarch_skip_prologue (gdbarch, m32c_skip_prologue);
+ set_gdbarch_unwind_pc (gdbarch, m32c_unwind_pc);
+ set_gdbarch_unwind_sp (gdbarch, m32c_unwind_sp);
#if 0
/* I'm dropping the dwarf2 sniffer because it has a few problems.
They may be in the dwarf2 cfi code in GDB, or they may be in
the debug info emitted by the upstream toolchain. I don't
know which, but I do know that the prologue analyzer works better.
MVS 04/13/06 */
- dwarf2_append_sniffers (arch);
+ dwarf2_append_sniffers (gdbarch);
#endif
- frame_unwind_append_unwinder (arch, &m32c_unwind);
+ frame_unwind_append_unwinder (gdbarch, &m32c_unwind);
/* Inferior calls. */
- set_gdbarch_push_dummy_call (arch, m32c_push_dummy_call);
- set_gdbarch_return_value (arch, m32c_return_value);
- set_gdbarch_dummy_id (arch, m32c_dummy_id);
+ set_gdbarch_push_dummy_call (gdbarch, m32c_push_dummy_call);
+ set_gdbarch_return_value (gdbarch, m32c_return_value);
+ set_gdbarch_dummy_id (gdbarch, m32c_dummy_id);
/* Trampolines. */
- set_gdbarch_skip_trampoline_code (arch, m32c_skip_trampoline_code);
+ set_gdbarch_skip_trampoline_code (gdbarch, m32c_skip_trampoline_code);
- set_gdbarch_virtual_frame_pointer (arch, m32c_virtual_frame_pointer);
+ set_gdbarch_virtual_frame_pointer (gdbarch, m32c_virtual_frame_pointer);
/* m32c function boundary addresses are not necessarily even.
Therefore, the `vbit', which indicates a pointer to a virtual
@@ -2687,9 +2687,9 @@ m32c_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
In order to verify this, see the definition of
TARGET_PTRMEMFUNC_VBIT_LOCATION in gcc/defaults.h along with the
definition of FUNCTION_BOUNDARY in gcc/config/m32c/m32c.h. */
- set_gdbarch_vbit_in_delta (arch, 1);
+ set_gdbarch_vbit_in_delta (gdbarch, 1);
- return arch;
+ return gdbarch;
}
/* Provide a prototype to silence -Wmissing-prototypes. */