Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [commit] Fix "break *EXP thread/task NUM" for Ada (was: "Re: RFC:  Fix "break *EXP thread NUM"")
Date: Fri, 01 Jan 2010 06:31:00 -0000	[thread overview]
Message-ID: <20100101063114.GO2788@adacore.com> (raw)
In-Reply-To: <20091125204303.GA21726@caradoc.them.org>

[-- Attachment #1: Type: text/plain, Size: 652 bytes --]

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

[-- Attachment #2: task-bp-at-addr.diff --]
[-- Type: text/x-diff, Size: 1020 bytes --]

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));
 }

[-- Attachment #3: thread-bp-at-addr.diff --]
[-- Type: text/x-diff, Size: 691 bytes --]

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);

  parent reply	other threads:[~2010-01-01  6:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-23 21:27 RFC: Fix "break *EXP thread NUM" Daniel Jacobowitz
2009-11-24  0:21 ` Joel Brobecker
2009-11-24 10:33 ` Andrew Stubbs
2009-11-24 14:24   ` Daniel Jacobowitz
2009-11-24 14:54     ` Joel Brobecker
2009-11-24 15:05       ` Daniel Jacobowitz
2009-11-25 20:43         ` Daniel Jacobowitz
2009-12-01 19:53           ` Maciej W. Rozycki
2009-12-01 20:04             ` Daniel Jacobowitz
2010-01-01  6:31           ` Joel Brobecker [this message]
2009-11-24 17:08     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100101063114.GO2788@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox