[CLASSES]: Support DW_TAG_unspecified_parameters
aka "..." [acme@newtoy net-2.6.20]$ pfunct kernel/panic.o panic /* kernel/panic.c:61 */ void panic(const char * fmt, ...); /* size: 241, variables: 3, inline expansions: 1 (3 bytes) */ [acme@newtoy net-2.6.20]$ Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
parent
7150a7295e
commit
a1c8aefe4e
|
@ -744,7 +744,7 @@ void function__print_variables(struct function *self)
|
|||
fputs("}\n", stdout);
|
||||
}
|
||||
|
||||
void function__print(struct function *self)
|
||||
void function__print(const struct function *self)
|
||||
{
|
||||
char bf[256];
|
||||
struct class *class_type;
|
||||
|
@ -778,6 +778,8 @@ void function__print(struct function *self)
|
|||
/* No parameters? */
|
||||
if (first_parameter)
|
||||
fputs("void", stdout);
|
||||
else if (self->unspecified_parameters);
|
||||
fputs(", ...", stdout);
|
||||
fputs(");\n", stdout);
|
||||
printf("/* size: %llu", self->high_pc - self->low_pc);
|
||||
if (self->nr_variables > 0)
|
||||
|
@ -1148,6 +1150,9 @@ static void cu__process_function(Dwarf *dwarf, Dwarf_Die *die,
|
|||
cu__add_variable(cu, variable);
|
||||
}
|
||||
break;
|
||||
case DW_TAG_unspecified_parameters:
|
||||
function->unspecified_parameters = 1;
|
||||
break;
|
||||
case DW_TAG_label:
|
||||
++function->nr_labels;
|
||||
break;
|
||||
|
|
|
@ -87,6 +87,7 @@ struct function {
|
|||
unsigned short inlined;
|
||||
unsigned short nr_inline_expansions;
|
||||
unsigned char external:1;
|
||||
unsigned char unspecified_parameters;
|
||||
unsigned int refcnt;
|
||||
unsigned int size_inline_expansions;
|
||||
signed int diff;
|
||||
|
@ -119,7 +120,7 @@ struct inline_expansion {
|
|||
|
||||
extern void class__find_holes(struct class *self);
|
||||
extern void class__print(struct class *self);
|
||||
extern void function__print(struct function *self);
|
||||
extern void function__print(const struct function *self);
|
||||
|
||||
extern struct cus *cus__new(const char *filename);
|
||||
extern int cus__load(struct cus *self);
|
||||
|
|
Loading…
Reference in New Issue