summaryrefslogtreecommitdiffstats
path: root/tests/funcscopes.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/funcscopes.c')
-rw-r--r--tests/funcscopes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/funcscopes.c b/tests/funcscopes.c
index 720ff3b9..55cb4fac 100644
--- a/tests/funcscopes.c
+++ b/tests/funcscopes.c
@@ -1,5 +1,5 @@
/* Test program for dwarf_getscopes.
- Copyright (C) 2005 Red Hat, Inc.
+ Copyright (C) 2005, 2014 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -153,10 +153,10 @@ handle_function (Dwarf_Die *funcdie, void *arg)
lowpc += a->dwbias;
highpc += a->dwbias;
Dwfl_Line *loline = dwfl_getsrc (a->dwfl, lowpc);
- Dwfl_Line *hiline = dwfl_getsrc (a->dwfl, highpc);
+ Dwfl_Line *hiline = dwfl_getsrc (a->dwfl, highpc - 1);
paddr (": ", lowpc, loline);
if (highpc != lowpc)
- paddr (" .. ", lowpc, hiline == loline ? NULL : hiline);
+ paddr (" .. ", highpc - 1, hiline == loline ? NULL : hiline);
}
puts ("");