summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2009-03-28 17:15:23 -0700
committerRoland McGrath <[email protected]>2009-03-28 17:15:23 -0700
commitfbd13ee52dd9062ac2db6af1a78add0431606a70 (patch)
tree7a8aea0bd502319ad64affeb5ad4d08ffa4e60a2 /tests
parent49ff43d083757e05c86eea25971124fb7b44f302 (diff)
dwarf_frame_return_address_register -> dwarf_frame_info: return address range too
Diffstat (limited to 'tests')
-rw-r--r--tests/addrcfi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/addrcfi.c b/tests/addrcfi.c
index 79e31e29..e2367f2b 100644
--- a/tests/addrcfi.c
+++ b/tests/addrcfi.c
@@ -1,5 +1,5 @@
/* Test program for CFI handling.
- Copyright (C) 2006 Red Hat, Inc.
+ Copyright (C) 2006, 2009 Red Hat, Inc.
This file is part of Red Hat elfutils.
Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -94,10 +94,13 @@ handle_address (GElf_Addr pc, Dwfl *dwfl)
if (result != 0)
error (EXIT_FAILURE, 0, "dwfl_addrframe: %s", dwfl_errmsg (-1));
- printf ("%#" PRIx64 ":\n", pc);
-
+ Dwarf_Addr start = pc;
+ Dwarf_Addr end = pc;
bool signalp;
- int ra_regno = dwarf_frame_return_address_register (frame, &signalp);
+ int ra_regno = dwarf_frame_info (frame, &start, &end, &signalp);
+
+ printf ("%#" PRIx64 " => [%#" PRIx64 ", %#" PRIx64 "):\n", pc, start, end);
+
if (ra_regno < 0)
printf ("\treturn address register unavailable (%s)\n",
dwarf_errmsg (0));