]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Cope with setting trace points on symbols which do not have an associated directory.
authorNick Clifton <nickc@redhat.com>
Wed, 15 Jul 1998 18:00:49 +0000 (18:00 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 15 Jul 1998 18:00:49 +0000 (18:00 +0000)
gdb/ChangeLog
gdb/tracepoint.c

index 4ae49736615a67225c0a4f9bcbb09d8654204ec6..1e815f8f20cce33f5f5e8cbb675203d9fdb3bc28 100644 (file)
@@ -1,3 +1,13 @@
+Wed Jul 15 10:58:29 1998  Nick Clifton  <nickc@cygnus.com>
+
+       * tracepoint.c (set_raw_tracepoint): Cope with symbols that do not
+       have an associated directory.
+
+Mon Jul 13 15:21:04 1998  Mark Alexander  <marka@cygnus.com>
+
+       * utils.c (puts_debug): Display non-printable characters in hex
+       instead of octal.
+
 Thu Jul  9 16:16:47 1998  Jeffrey A Law  (law@cygnus.com)
 
        * mn10300-tdep.c (mn10300_generic_register_names): New variable.
index fa5ac4db38d1de04f15956b456b48b2823fb5810..20379c1cf4c9f896c4e9faf2ee1792b8b6695dcc 100644 (file)
@@ -333,18 +333,26 @@ set_raw_tracepoint (sal)
     t->source_file = NULL;
   else
     {
-      char *p;
-
-      t->source_file = (char *) xmalloc (strlen (sal.symtab->filename) +
-                                         strlen (sal.symtab->dirname) + 2);
-
-      strcpy (t->source_file, sal.symtab->dirname);
-      p = t->source_file;
-      while (*p)
-        p++;
-      if (*(--p) != '/')            /* Will this work on Windows? */
-        strcat (t->source_file, "/");
-      strcat (t->source_file, sal.symtab->filename);
+      if (sal.symtab->dirname == NULL)
+       {
+         t->source_file = (char *) xmalloc (strlen (sal.symtab->filename) + 1);
+         strcpy (t->source_file, sal.symtab->filename);
+       }
+      else
+       {
+         char *p;
+
+         t->source_file = (char *) xmalloc (strlen (sal.symtab->filename) +
+                                            strlen (sal.symtab->dirname) + 2);
+         
+         strcpy (t->source_file, sal.symtab->dirname);
+         p = t->source_file;
+         while (*p)
+           p++;
+         if (*(--p) != '/')            /* Will this work on Windows? */
+           strcat (t->source_file, "/");
+         strcat (t->source_file, sal.symtab->filename);
+       }
     }
 
   t->language = current_language->la_language;