* readelf.c (get_stapsdt_note_type): New function.

(process_note): Recognize "stapsdt" notes.
This commit is contained in:
Tom Tromey 2011-04-26 13:09:10 +00:00
parent 2aee03ae36
commit 70616151ac
2 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-04-21 Tom Tromey <tromey@redhat.com>
* readelf.c (get_stapsdt_note_type): New function.
(process_note): Recognize "stapsdt" notes.
2011-04-21 Tom Tromey <tromey@redhat.com>
* readelf.c (process_corefile_note_segment): Change header field

View File

@ -12350,6 +12350,24 @@ get_netbsd_elfcore_note_type (unsigned e_type)
return buff;
}
static const char *
get_stapsdt_note_type (unsigned e_type)
{
static char buff[64];
switch (e_type)
{
case NT_STAPSDT:
return _("NT_STAPSDT (SystemTap probe descriptors)");
default:
break;
}
snprintf (buff, sizeof (buff), _("Unknown note type: (0x%08x)"), e_type);
return buff;
}
static const char *
get_ia64_vms_note_type (unsigned e_type)
{
@ -12496,6 +12514,9 @@ process_note (Elf_Internal_Note * pnote)
/* VMS/ia64-specific file notes. */
nt = get_ia64_vms_note_type (pnote->type);
else if (const_strneq (pnote->namedata, "stapsdt"))
nt = get_stapsdt_note_type (pnote->type);
else
/* Don't recognize this note name; just use the default set of
note type strings. */