From 89c200ed1bb37d6b879f6dbadbeaf143b7782224 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Tue, 15 Mar 2016 14:43:49 -0700 Subject: [PATCH] Add cpsr_flags to aarch64 core regs. gdb/ChangeLog: * features/aarch64-core.xml (cpsr_flags): New flags type. (cpsr): Use it. * features/aarch64.c: Regenerate. --- gdb/ChangeLog | 6 ++++++ gdb/features/aarch64-core.xml | 23 ++++++++++++++++++++++- gdb/features/aarch64.c | 19 ++++++++++++++++++- 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2f950464443..ac542f05e9b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2016-03-15 Doug Evans + + * features/aarch64-core.xml (cpsr_flags): New flags type. + (cpsr): Use it. + * features/aarch64.c: Regenerate. + 2016-03-15 Doug Evans * features/i386/32bit-core.xml (i386_eflags): Remove "end" spec. diff --git a/gdb/features/aarch64-core.xml b/gdb/features/aarch64-core.xml index b5944fcb2ee..8f962961e51 100644 --- a/gdb/features/aarch64-core.xml +++ b/gdb/features/aarch64-core.xml @@ -42,5 +42,26 @@ - + + + + + + + + + + + + + + + + + + + + + + diff --git a/gdb/features/aarch64.c b/gdb/features/aarch64.c index 1e9a99d3e94..cec695694c0 100644 --- a/gdb/features/aarch64.c +++ b/gdb/features/aarch64.c @@ -17,6 +17,23 @@ initialize_tdesc_aarch64 (void) set_tdesc_architecture (result, bfd_scan_arch ("aarch64")); feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.core"); + type = tdesc_create_flags (feature, "cpsr_flags", 4); + tdesc_add_flag (type, 0, "SP"); + tdesc_add_bitfield (type, "", 1, 1); + tdesc_add_bitfield (type, "EL", 2, 3); + tdesc_add_flag (type, 4, "nRW"); + tdesc_add_bitfield (type, "", 5, 5); + tdesc_add_flag (type, 6, "F"); + tdesc_add_flag (type, 7, "I"); + tdesc_add_flag (type, 8, "A"); + tdesc_add_flag (type, 9, "D"); + tdesc_add_flag (type, 20, "IL"); + tdesc_add_flag (type, 21, "SS"); + tdesc_add_flag (type, 28, "V"); + tdesc_add_flag (type, 29, "C"); + tdesc_add_flag (type, 30, "Z"); + tdesc_add_flag (type, 31, "N"); + tdesc_create_reg (feature, "x0", 0, 1, NULL, 64, "int"); tdesc_create_reg (feature, "x1", 1, 1, NULL, 64, "int"); tdesc_create_reg (feature, "x2", 2, 1, NULL, 64, "int"); @@ -50,7 +67,7 @@ initialize_tdesc_aarch64 (void) tdesc_create_reg (feature, "x30", 30, 1, NULL, 64, "int"); tdesc_create_reg (feature, "sp", 31, 1, NULL, 64, "data_ptr"); tdesc_create_reg (feature, "pc", 32, 1, NULL, 64, "code_ptr"); - tdesc_create_reg (feature, "cpsr", 33, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "cpsr", 33, 1, NULL, 32, "cpsr_flags"); feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.fpu"); field_type = tdesc_named_type (feature, "ieee_double"); -- 2.30.2