From 70616151ac0740159e28d61fa0f07515c18e8098 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 26 Apr 2011 13:09:10 +0000 Subject: [PATCH] * readelf.c (get_stapsdt_note_type): New function. (process_note): Recognize "stapsdt" notes. --- binutils/ChangeLog | 5 +++++ binutils/readelf.c | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 22e6049..e925742 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,10 @@ 2011-04-21 Tom Tromey + * readelf.c (get_stapsdt_note_type): New function. + (process_note): Recognize "stapsdt" notes. + +2011-04-21 Tom Tromey + * readelf.c (process_corefile_note_segment): Change header field widths. (process_note): Change field widths. diff --git a/binutils/readelf.c b/binutils/readelf.c index 1ff1fce..339ef2e 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -12351,6 +12351,24 @@ get_netbsd_elfcore_note_type (unsigned e_type) } 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) { static char buff[64]; @@ -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. */ -- 2.7.4