aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.h
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2014-05-14 14:30:37 -0600
committerJan Kratochvil <jan.kratochvil@redhat.com>2014-12-12 22:27:31 +0100
commitd064d1bef5c64c3525c01461ecd5be76c5fb0ca7 (patch)
treeabcaef14b57aa2ae0097accbbe8cd1d3221b0de3 /gdb/dwarf2loc.h
parentaf945b753559079fe37d61917041f2217d181b86 (diff)
downloadgdb-d064d1bef5c64c3525c01461ecd5be76c5fb0ca7.zip
gdb-d064d1bef5c64c3525c01461ecd5be76c5fb0ca7.tar.gz
gdb-d064d1bef5c64c3525c01461ecd5be76c5fb0ca7.tar.bz2
export dwarf2_reg_to_regnum_or_error
This exports a utility function, dwarf2_reg_to_regnum_or_error, that was previously private to dwarf2loc.c. gdb/ChangeLog 2014-12-12 Jan Kratochvil <jan.kratochvil@redhat.com> * dwarf2loc.h (dwarf2_reg_to_regnum_or_error): Declare. * dwarf2loc.c (dwarf2_reg_to_regnum_or_error): Rename from translate_register. Now public. (dwarf2_compile_expr_to_ax): Update.
Diffstat (limited to 'gdb/dwarf2loc.h')
-rw-r--r--gdb/dwarf2loc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h
index 082ccfa..76fb45b4 100644
--- a/gdb/dwarf2loc.h
+++ b/gdb/dwarf2loc.h
@@ -222,4 +222,12 @@ extern struct call_site_chain *call_site_find_chain (struct gdbarch *gdbarch,
CORE_ADDR caller_pc,
CORE_ADDR callee_pc);
+/* A helper function to convert a DWARF register to an arch register.
+ ARCH is the architecture.
+ DWARF_REG is the register.
+ This will throw an exception if the DWARF register cannot be
+ translated to an architecture register. */
+
+extern int dwarf2_reg_to_regnum_or_error (struct gdbarch *arch, int dwarf_reg);
+
#endif /* dwarf2loc.h */