mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-23 13:21:43 +08:00
* readelf.c (read_and_display_attr_value): New function to
handle DW_FORM_indirect. (read_and_display_attr): Use it.
This commit is contained in:
parent
13d574884b
commit
81766fcaa8
@ -1,3 +1,9 @@
|
|||||||
|
2001-11-13 Keith Walker <keith.walker@arm.com>
|
||||||
|
|
||||||
|
* readelf.c (read_and_display_attr_value): New function to
|
||||||
|
handle DW_FORM_indirect.
|
||||||
|
(read_and_display_attr): Use it.
|
||||||
|
|
||||||
2001-11-13 Geoffrey Keating <geoffk@redhat.com>
|
2001-11-13 Geoffrey Keating <geoffk@redhat.com>
|
||||||
|
|
||||||
* readelf.c (display_debug_lines): Deal with unknown standard
|
* readelf.c (display_debug_lines): Deal with unknown standard
|
||||||
|
@ -231,6 +231,7 @@ static void free_abbrevs PARAMS ((void));
|
|||||||
static void add_abbrev PARAMS ((unsigned long, unsigned long, int));
|
static void add_abbrev PARAMS ((unsigned long, unsigned long, int));
|
||||||
static void add_abbrev_attr PARAMS ((unsigned long, unsigned long));
|
static void add_abbrev_attr PARAMS ((unsigned long, unsigned long));
|
||||||
static unsigned char * read_and_display_attr PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long, unsigned long));
|
static unsigned char * read_and_display_attr PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long, unsigned long));
|
||||||
|
static unsigned char * read_and_display_attr_value PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long, unsigned long));
|
||||||
static unsigned char * display_block PARAMS ((unsigned char *, unsigned long));
|
static unsigned char * display_block PARAMS ((unsigned char *, unsigned long));
|
||||||
static void decode_location_expression PARAMS ((unsigned char *, unsigned int, unsigned long));
|
static void decode_location_expression PARAMS ((unsigned char *, unsigned int, unsigned long));
|
||||||
static void request_dump PARAMS ((unsigned int, int));
|
static void request_dump PARAMS ((unsigned int, int));
|
||||||
@ -6933,7 +6934,7 @@ decode_location_expression (data, pointer_size, length)
|
|||||||
|
|
||||||
|
|
||||||
static unsigned char *
|
static unsigned char *
|
||||||
read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
|
read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
|
||||||
unsigned long attribute;
|
unsigned long attribute;
|
||||||
unsigned long form;
|
unsigned long form;
|
||||||
unsigned char * data;
|
unsigned char * data;
|
||||||
@ -6944,8 +6945,6 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
|
|||||||
unsigned char * block_start = NULL;
|
unsigned char * block_start = NULL;
|
||||||
int bytes_read;
|
int bytes_read;
|
||||||
|
|
||||||
printf (" %-18s:", get_AT_name (attribute));
|
|
||||||
|
|
||||||
switch (form)
|
switch (form)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
@ -6990,6 +6989,13 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
|
|||||||
uvalue = read_leb128 (data, & bytes_read, 0);
|
uvalue = read_leb128 (data, & bytes_read, 0);
|
||||||
data += bytes_read;
|
data += bytes_read;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DW_FORM_indirect:
|
||||||
|
form = read_leb128 (data, & bytes_read, 0);
|
||||||
|
data += bytes_read;
|
||||||
|
printf (" %s", get_FORM_name (form));
|
||||||
|
return read_and_display_attr_value (attribute, form, data, cu_offset,
|
||||||
|
pointer_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (form)
|
switch (form)
|
||||||
@ -7065,7 +7071,7 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case DW_FORM_indirect:
|
case DW_FORM_indirect:
|
||||||
warn (_("Unable to handle FORM: %d"), form);
|
/* handled above */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -7224,6 +7230,20 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned char *
|
||||||
|
read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
|
||||||
|
unsigned long attribute;
|
||||||
|
unsigned long form;
|
||||||
|
unsigned char * data;
|
||||||
|
unsigned long cu_offset;
|
||||||
|
unsigned long pointer_size;
|
||||||
|
{
|
||||||
|
printf (" %-18s:", get_AT_name (attribute));
|
||||||
|
data = read_and_display_attr_value (attribute, form, data, cu_offset,
|
||||||
|
pointer_size);
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user