aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-04-26 13:09:10 +0000
committerTom Tromey <tromey@redhat.com>2011-04-26 13:09:10 +0000
commit70616151ac0740159e28d61fa0f07515c18e8098 (patch)
treeaa3027b32ab17c29621d9f769a3cf2af603b6a7b /binutils
parent2aee03ae361c03bdfc722d955ad1eab02462cd8a (diff)
downloadgdb-70616151ac0740159e28d61fa0f07515c18e8098.zip
gdb-70616151ac0740159e28d61fa0f07515c18e8098.tar.gz
gdb-70616151ac0740159e28d61fa0f07515c18e8098.tar.bz2
* readelf.c (get_stapsdt_note_type): New function.
(process_note): Recognize "stapsdt" notes.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/readelf.c21
2 files changed, 26 insertions, 0 deletions
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 <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
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. */