aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch
diff options
context:
space:
mode:
authorLuis Machado <luis.machado@linaro.org>2021-11-11 17:22:50 -0300
committerLuis Machado <luis.machado@linaro.org>2021-11-15 16:00:01 -0300
commit37989733d8a8fe6ea13a82ec22272255e0702938 (patch)
tree8d32012d17f3e3cbfa4b15a88eaa0e2f145716ab /gdb/arch
parent345bd07cce33565f1cd66acabdaf387ca3a7ccb3 (diff)
downloadgdb-37989733d8a8fe6ea13a82ec22272255e0702938.zip
gdb-37989733d8a8fe6ea13a82ec22272255e0702938.tar.gz
gdb-37989733d8a8fe6ea13a82ec22272255e0702938.tar.bz2
Extend the prologue analyzer to handle the bti instruction
Handle the BTI instruction in the prologue analyzer. The patch handles all the variations of the BTI instruction.
Diffstat (limited to 'gdb/arch')
-rw-r--r--gdb/arch/aarch64-insn.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/arch/aarch64-insn.h b/gdb/arch/aarch64-insn.h
index 6f9ec85..a05a607 100644
--- a/gdb/arch/aarch64-insn.h
+++ b/gdb/arch/aarch64-insn.h
@@ -42,6 +42,11 @@ extern bool aarch64_debug;
#define sbits(obj,st,fn) \
((long) (bits(obj,st,fn) | ((long) bit(obj,fn) * ~ submask (fn - st))))
+/* Prologue analyzer helper macros. */
+
+/* Is the instruction "bti"? */
+#define IS_BTI(instruction) ((instruction & 0xffffff3f) == 0xd503241f)
+
/* List of opcodes that we need for building the jump pad and relocating
an instruction. */