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 22e6049516c..e925742e7f5 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/binutils/readelf.c b/binutils/readelf.c index 1ff1fceb3d1..339ef2e921a 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -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. */ -- 2.30.2