Skip to content

Commit

Permalink
microblaze: apply gdb patches from meta-xilinx repository
Browse files Browse the repository at this point in the history
This patchset fixes many known issues on gnu-toolchain for microblaze.
But mainly the atomic-cas and binutils incorrect relocation issues.

Patches obtained from https://github.com/Xilinx/meta-xilinx/blob/master/meta-microblaze/recipes-devtools/gdb/gdb
Below is a list of patches applied and squashed after filtering out
microblaze64 and microblaze-linux patches:

0008-Patch-MicroBlaze.patch

Signed-off-by: Alp Sayin <alpsayin@gmail.com>
  • Loading branch information
MBODAPAT authored and alpsayin committed Dec 2, 2023
1 parent e04a09b commit d0b3a0f
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions gdb/microblaze-tdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,16 +401,8 @@ microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
static CORE_ADDR
microblaze_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
gdb_byte buf[4];
CORE_ADDR pc;

frame_unwind_register (next_frame, MICROBLAZE_PC_REGNUM, buf);
pc = extract_typed_address (buf, builtin_type (gdbarch)->builtin_func_ptr);
/* For sentinel frame, return address is actual PC. For other frames,
return address is pc+8. This is a workaround because gcc does not
generate correct return address in CIE. */
if (frame_relative_level (next_frame) >= 0)
pc += 8;
pc=frame_unwind_register_unsigned (next_frame, MICROBLAZE_PC_REGNUM);
return pc;
}

Expand Down Expand Up @@ -517,7 +509,8 @@ static const struct frame_unwind microblaze_frame_unwind =
microblaze_frame_this_id,
microblaze_frame_prev_register,
NULL,
default_frame_sniffer
default_frame_sniffer,
NULL,
};

static CORE_ADDR
Expand Down

0 comments on commit d0b3a0f

Please sign in to comment.