1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-21 23:27:39 +01:00

(Logical change 1.21)

This commit is contained in:
mostang.com!davidm 2002-11-09 03:59:27 +00:00
parent 9f708e3bb2
commit dee2508b2c
3 changed files with 104 additions and 0 deletions

View file

@ -1,3 +1,19 @@
***********************************************************
Discontinued. See bitkeeper loginstead at
http://unwind.bkbits.net/
***********************************************************
2002-11-08 David Mosberger-Tang <David.Mosberger@acm.org>
* src/ia64/unwind_i.h (ia64_getfp): Change from macro to inline
function. Check "loc" argument for being NULL before dereferencing it.
(ia64_putfp): Ditto.
(ia64_get): Ditto.
(ia64_put): Ditto.
2002-01-18 David Mosberger-Tang <David.Mosberger@acm.org>
* src/ia64/parser.c (__ia64_unw_create_state_record): Set

View file

@ -0,0 +1,36 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
extern int backtrace (void **, int);
static void
b (void)
{
void *v[20];
int i, n;
n = backtrace(v, 20);
for (i = 0; i < n; ++i)
printf ("[%d] %p\n", i, v[i]);
}
static void
a (void)
{
b();
}
static void c (void) __attribute__((constructor));
static void
c (void)
{
b();
}
int
main (int argc, char **argv)
{
return atexit (a);
}

View file

@ -0,0 +1,52 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
extern int backtrace (void **, int);
static void
b (void)
{
void *v[20];
int i, n;
n = backtrace(v, 20);
for (i = 0; i < n; ++i)
printf ("[%d] %p\n", i, v[i]);
}
static void
c (void)
{
b ();
}
static void
a (int d, ...)
{
switch (d)
{
case 5:
a (4, 2,4);
break;
case 4:
a (3, 1,3,5);
break;
case 3:
a (2, 11, 13, 17, 23);
break;
case 2:
a (1);
break;
case 1:
c ();
}
}
int
main (int argc, char **argv)
{
a (5, 3, 4, 5, 6);
return 0;
}