This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix "break *EXP thread/task NUM" for Ada (was: "Re: RFC: Fix "break *EXP thread NUM"")
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 1 Jan 2010 10:31:14 +0400
- Subject: [commit] Fix "break *EXP thread/task NUM" for Ada (was: "Re: RFC: Fix "break *EXP thread NUM"")
- References: <20091123212736.GA3828@caradoc.them.org> <4B0BB652.3080303@codesourcery.com> <20091124142406.GA14875@caradoc.them.org> <20091124145422.GA26004@adacore.com> <20091124150533.GA8964@caradoc.them.org> <20091125204303.GA21726@caradoc.them.org>
I finally took the time to fix this for Ada as well. Initially,
I just fixed it for "task", until I realized that I should have
fixed it for both "thread" and "task". Hence two patches instead
of just one.
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.
2010-01-01 Joel Brobecker <brobecker@adacore.com>
Fix break *FUN'address thread NUM.
* ada-lex.l (task): Expand rule to also match the thread keyword.
Tested on x86_64-linux.
--
Joel
commit 366b0ad634564fcc3ee6242510d91fab52d994db
Author: brobecke <brobecke@f8352e7e-cb20-0410-8ce7-b5d9e71c585c>
Date: Fri Jan 1 05:18:51 2010 +0000
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.
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index 745ed64..9505c2d 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -160,6 +160,13 @@ if {
return 0;
}
+task {
+ while (*lexptr != 't' && *lexptr != 'T')
+ lexptr--;
+ yyrestart(NULL);
+ return 0;
+ }
+
/* ADA KEYWORDS */
abs { return ABS; }
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index 806548a..af80877 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -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));
}
commit 7d7cd745c3f76445eb0f92a76e347de999d938ff
Author: Joel Brobecker <brobecker@adacore.com>
Date: Fri Jan 1 10:22:11 2010 +0400
Fix break *FUN'address thread NUM.
* ada-lex.l (task): Expand rule to also match the thread keyword.
Related to J101-001.
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index 9505c2d..8c47418 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -160,7 +160,9 @@ if {
return 0;
}
-task {
+(task|thread) {
+ /* This keyword signals the end of the expression and
+ will be processed separately. */
while (*lexptr != 't' && *lexptr != 'T')
lexptr--;
yyrestart(NULL);