gdb: Add default reggroups for ARC
There is no reggroups set in ARC. If a "maintenance print reggroups" command is issued, the default register set is dumped (which is fine). However, if a new group is added via an XML file, then that will become the _only_ group. This behavior causes gdb.xml/tdesc-regs.exp to fail. Fixes gdb.xml/tdesc-regs.exp on ARC. gdb/ChangeLog: * arc-tdep.c (arc_add_reggroups): New function. (arc_gdbarch_init): Call arc_add_reggroups.
This commit is contained in:
parent
ac3571d941
commit
d0cc52bdf2
@ -1,3 +1,8 @@
|
|||||||
|
2021-01-26 Shahab Vahedi <shahab@synopsys.com>
|
||||||
|
|
||||||
|
* arc-tdep.c (arc_add_reggroups): New function.
|
||||||
|
(arc_gdbarch_init): Call arc_add_reggroups.
|
||||||
|
|
||||||
2021-01-26 Anton Kolesov <anton.kolesov@synopsys.com>
|
2021-01-26 Anton Kolesov <anton.kolesov@synopsys.com>
|
||||||
|
|
||||||
* arc-tdep.c (arc_skip_prologue): Log "pc" address.
|
* arc-tdep.c (arc_skip_prologue): Log "pc" address.
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "frame-base.h"
|
#include "frame-base.h"
|
||||||
#include "frame-unwind.h"
|
#include "frame-unwind.h"
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
|
#include "reggroups.h"
|
||||||
#include "gdbcmd.h"
|
#include "gdbcmd.h"
|
||||||
#include "objfiles.h"
|
#include "objfiles.h"
|
||||||
#include "osabi.h"
|
#include "osabi.h"
|
||||||
@ -1954,6 +1955,20 @@ static const struct frame_base arc_normal_base = {
|
|||||||
arc_frame_base_address
|
arc_frame_base_address
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Add all the expected register sets into GDBARCH. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
arc_add_reggroups (struct gdbarch *gdbarch)
|
||||||
|
{
|
||||||
|
reggroup_add (gdbarch, general_reggroup);
|
||||||
|
reggroup_add (gdbarch, float_reggroup);
|
||||||
|
reggroup_add (gdbarch, system_reggroup);
|
||||||
|
reggroup_add (gdbarch, vector_reggroup);
|
||||||
|
reggroup_add (gdbarch, all_reggroup);
|
||||||
|
reggroup_add (gdbarch, save_reggroup);
|
||||||
|
reggroup_add (gdbarch, restore_reggroup);
|
||||||
|
}
|
||||||
|
|
||||||
static enum arc_isa
|
static enum arc_isa
|
||||||
mach_type_to_arc_isa (const unsigned long mach)
|
mach_type_to_arc_isa (const unsigned long mach)
|
||||||
{
|
{
|
||||||
@ -2352,6 +2367,9 @@ arc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||||||
/* This doesn't include possible long-immediate value. */
|
/* This doesn't include possible long-immediate value. */
|
||||||
set_gdbarch_max_insn_length (gdbarch, 4);
|
set_gdbarch_max_insn_length (gdbarch, 4);
|
||||||
|
|
||||||
|
/* Add default register groups. */
|
||||||
|
arc_add_reggroups (gdbarch);
|
||||||
|
|
||||||
/* Frame unwinders and sniffers. */
|
/* Frame unwinders and sniffers. */
|
||||||
dwarf2_frame_set_init_reg (gdbarch, arc_dwarf2_frame_init_reg);
|
dwarf2_frame_set_init_reg (gdbarch, arc_dwarf2_frame_init_reg);
|
||||||
dwarf2_append_unwinders (gdbarch);
|
dwarf2_append_unwinders (gdbarch);
|
||||||
|
Loading…
Reference in New Issue
Block a user