Fix clang debug info startup problem
[build-cgdb.git] / patches / cgdb-0.6.6_clang_fix.patch
blob5be03612823b20d20eba7a386d13cfc1e4285bf3
1 diff -Nuradp cgdb-0.6.6/tgdb/annotate-two/src/commands.c cgdb-0.6.6/tgdb/annotate-two/src/commands.c
2 --- cgdb-0.6.6/tgdb/annotate-two/src/commands.c 2010-11-13 10:09:49.000000000 +0000
3 +++ cgdb-0.6.6/tgdb/annotate-two/src/commands.c 2012-04-14 05:27:10.000000000 +0000
4 @@ -1012,9 +1012,9 @@ commands_create_command (struct commands
5 ibuf_add (temp_file_name, data);
7 if (data == NULL)
8 - ncom = (char *) cgdb_malloc (sizeof (char) * (16));
9 + ncom = (char *) cgdb_malloc (sizeof (char) * (19));
10 else
11 - ncom = (char *) cgdb_malloc (sizeof (char) * (16 + strlen (data)));
12 + ncom = (char *) cgdb_malloc (sizeof (char) * (19 + strlen (data)));
13 strcpy (ncom, "server list ");
15 if (temp_file_name != NULL)
16 @@ -1022,6 +1022,11 @@ commands_create_command (struct commands
17 strcat (ncom, ibuf_get (temp_file_name));
18 strcat (ncom, ":1");
20 + else
21 + {
22 + strcat (ncom, "+0");
23 + }
24 + strcat (ncom, ",+0");
26 /* This happens when the user wants to get the absolute path of
27 * the current file. They pass in NULL to represent that. */