X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdbsupport%2Fcommon-regcache.h;h=650536e8a88cb59681a90cd67c351855a16f61df;hb=081e778cb855581fe63a9b26aa582900da5d1a8b;hp=18446ff8416d052c244decb298a7faa8d0ba688a;hpb=01027315f54048dbaf03ac37455c2528c72a6d9b;p=deliverable%2Fbinutils-gdb.git diff --git a/gdbsupport/common-regcache.h b/gdbsupport/common-regcache.h index 18446ff841..650536e8a8 100644 --- a/gdbsupport/common-regcache.h +++ b/gdbsupport/common-regcache.h @@ -56,6 +56,11 @@ extern int regcache_register_size (const struct regcache *regcache, int n); extern CORE_ADDR regcache_read_pc (struct regcache *regcache); +/* Read the PC register. If PC cannot be read, return 0. + This is a wrapper around 'regcache_read_pc'. */ + +extern CORE_ADDR regcache_read_pc_protected (regcache *regcache); + /* Read a raw register into a unsigned integer. */ extern enum register_status regcache_raw_read_unsigned (struct regcache *regcache, int regnum, ULONGEST *val);