Fix break *FUN'address task NUM.
authorJoel Brobecker <brobecker@gnat.com>
Fri, 1 Jan 2010 06:06:49 +0000 (06:06 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 1 Jan 2010 06:06:49 +0000 (06:06 +0000)
        * ada-lex.l (task): New rule.
        * ada-lang.c (valid_task_id): Make sure the Ada task list has
        been built before using it.

gdb/ChangeLog
gdb/ada-lex.l
gdb/ada-tasks.c

index 753fbb0cc0aa90eb045b77169cf050250af327f1..f9163588284b31ba9ac5daa2f12b7a39d0750f01 100644 (file)
@@ -1,3 +1,10 @@
+2010-01-01  Joel Brobecker  <brobecker@adacore.com>
+
+       Fix break *FUN'address task NUM.
+       * ada-lex.l (task): New rule.
+       * ada-lang.c (valid_task_id): Make sure the Ada task list has
+       been built before using it.
+
 2009-12-31  Stan Shebs  <stan@codesourcery.com>
 
        Add new tracepoint action teval.
index 9886553e4b501362fb35564cacf1689e464bf4bb..e16acb5f6e2fef55557282421b22e6b78a4de765 100644 (file)
@@ -160,6 +160,13 @@ if         {
                  return 0;
                }
 
+task           {
+                 while (*lexptr != 't' && *lexptr != 'T')
+                   lexptr--;
+                 yyrestart(NULL);
+                 return 0;
+               }
+
        /* ADA KEYWORDS */
 
 abs            { return ABS; }
index 68cc696d56ee0a3a4e36b1113bdad4831804b0bf..62f443227080c91955f31262c897c39e9d25dbb7 100644 (file)
@@ -198,6 +198,7 @@ get_task_number_from_id (CORE_ADDR task_id)
 int
 valid_task_id (int task_num)
 {
+  ada_build_task_list (0);
   return (task_num > 0
           && task_num <= VEC_length (ada_task_info_s, task_list));
 }