aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2019-08-16 10:19:18 +0100
committerAlan Hayward <alan.hayward@arm.com>2019-08-16 10:19:18 +0100
commitaa7ca1bb443e8c2baad17392f395d1556fecfafa (patch)
treea5a8006f5d93879956ad07a0a184bc657e0fc69e /gdb/gdbarch.h
parentfdfc8cf7f04e2f4d24ec9fff331ebd71a2e768a3 (diff)
downloadfsf-binutils-gdb-aa7ca1bb443e8c2baad17392f395d1556fecfafa.zip
fsf-binutils-gdb-aa7ca1bb443e8c2baad17392f395d1556fecfafa.tar.gz
fsf-binutils-gdb-aa7ca1bb443e8c2baad17392f395d1556fecfafa.tar.bz2
Move [PAC] into a new MI field addr_flags
Add a new print_pc which prints both the PC and a new field addr_flags. Call this wherever the PC is printed in stack.c. Add a new gdbarch method get_pc_address_flags to obtain the addr_flag contents. By default returns an empty string, on AArch64 this returns PAC if the address has been masked in the frame. Document this in the manual and NEWS file. gdb/ChangeLog: * NEWS (Other MI changes): New subsection. * aarch64-tdep.c (aarch64_get_pc_address_flags): New function. (aarch64_gdbarch_init): Add aarch64_get_pc_address_flags. * arch-utils.c (default_get_pc_address_flags): New function. * arch-utils.h (default_get_pc_address_flags): New declaration. * gdbarch.sh: Add get_pc_address_flags. * gdbarch.c: Regenerate. * gdbarch.h: Likewise. * stack.c (print_pc): New function. (print_frame_info) (print_frame): Call print_pc. gdb/doc/ChangeLog: * gdb.texinfo (AArch64 Pointer Authentication) (GDB/MI Breakpoint Information) (Frame Information): Document addr_field.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index c3556d3..3c6efae 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1640,6 +1640,12 @@ typedef ULONGEST (gdbarch_type_align_ftype) (struct gdbarch *gdbarch, struct typ
extern ULONGEST gdbarch_type_align (struct gdbarch *gdbarch, struct type *type);
extern void set_gdbarch_type_align (struct gdbarch *gdbarch, gdbarch_type_align_ftype *type_align);
+/* Return a string containing any flags for the given PC in the given FRAME. */
+
+typedef std::string (gdbarch_get_pc_address_flags_ftype) (frame_info *frame, CORE_ADDR pc);
+extern std::string gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, frame_info *frame, CORE_ADDR pc);
+extern void set_gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, gdbarch_get_pc_address_flags_ftype *get_pc_address_flags);
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);