Skip to content

Commit 6cae1a5

Browse files
MBODAPATstephanosio
authored andcommitted
microblaze: apply gdb patches from meta-xilinx repository
This patchset fixes many known issues on gnu-toolchain for microblaze. But mainly the atomic-cas and binutils incorrect relocation issues. For gdb this patchset resolves the segfault caused by inline-sniffer. Patches obtained from https://github.com/xilinx/meta-xilinx/ repository, from meta-microblaze/recipes-devtools/gdb/gdb path. I've filtered out microblaze64 and microblaze-linux patches because they cause microblaze-gdb to segfault at startup and more importantly, unnecessary for Zephyr. Below is a list of patches applied and squashed: 0008-Patch-MicroBlaze.patch Signed-off-by: Alp Sayin <[email protected]>
1 parent 3e0b322 commit 6cae1a5

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

gdb/microblaze-tdep.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -370,16 +370,8 @@ microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
370370
static CORE_ADDR
371371
microblaze_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
372372
{
373-
gdb_byte buf[4];
374373
CORE_ADDR pc;
375-
376-
frame_unwind_register (next_frame, MICROBLAZE_PC_REGNUM, buf);
377-
pc = extract_typed_address (buf, builtin_type (gdbarch)->builtin_func_ptr);
378-
/* For sentinel frame, return address is actual PC. For other frames,
379-
return address is pc+8. This is a workaround because gcc does not
380-
generate correct return address in CIE. */
381-
if (frame_relative_level (next_frame) >= 0)
382-
pc += 8;
374+
pc=frame_unwind_register_unsigned (next_frame, MICROBLAZE_PC_REGNUM);
383375
return pc;
384376
}
385377

@@ -486,7 +478,8 @@ static const struct frame_unwind microblaze_frame_unwind =
486478
microblaze_frame_this_id,
487479
microblaze_frame_prev_register,
488480
NULL,
489-
default_frame_sniffer
481+
default_frame_sniffer,
482+
NULL,
490483
};
491484

492485
static CORE_ADDR

0 commit comments

Comments
 (0)