aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/buildsym.c')
-rw-r--r--gdb/buildsym.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index ae0750a..94800bd 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -1139,6 +1139,11 @@ record_debugformat (char *format)
void
record_producer (const char *producer)
{
+ /* The producer is not always provided in the debugging info.
+ Do nothing if PRODUCER is NULL. */
+ if (producer == NULL)
+ return;
+
current_subfile->producer = savestring (producer, strlen (producer));
}