mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-22 07:37:38 +01:00
Call `unw_backtrace()' explicitly in test-flush-cache.c
This commit is contained in:
parent
643fc92e91
commit
aeb1afc65d
1 changed files with 2 additions and 11 deletions
|
@ -25,15 +25,6 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_EXECINFO_H
|
|
||||||
# include <execinfo.h>
|
|
||||||
#else
|
|
||||||
extern int backtrace (void **, int);
|
|
||||||
#endif
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -50,7 +41,7 @@ f257 (void)
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf ("First backtrace:\n");
|
printf ("First backtrace:\n");
|
||||||
n = backtrace (buffer, 300);
|
n = unw_backtrace (buffer, 300);
|
||||||
if (verbose)
|
if (verbose)
|
||||||
for (i = 0; i < n; ++i)
|
for (i = 0; i < n; ++i)
|
||||||
printf ("[%d] ip=%p\n", i, buffer[i]);
|
printf ("[%d] ip=%p\n", i, buffer[i]);
|
||||||
|
@ -59,7 +50,7 @@ f257 (void)
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf ("\nSecond backtrace:\n");
|
printf ("\nSecond backtrace:\n");
|
||||||
n = backtrace (buffer, 300);
|
n = unw_backtrace (buffer, 300);
|
||||||
if (verbose)
|
if (verbose)
|
||||||
for (i = 0; i < n; ++i)
|
for (i = 0; i < n; ++i)
|
||||||
printf ("[%d] ip=%p\n", i, buffer[i]);
|
printf ("[%d] ip=%p\n", i, buffer[i]);
|
||||||
|
|
Loading…
Reference in a new issue