From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24327 invoked by alias); 1 Jan 2010 06:31:56 -0000 Received: (qmail 24317 invoked by uid 22791); 1 Jan 2010 06:31:55 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,FH_DATE_PAST_20XX X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Jan 2010 06:31:48 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 70B832BABC3 for ; Fri, 1 Jan 2010 01:31:46 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25BysAUnsH8z for ; Fri, 1 Jan 2010 01:31:46 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id BB1C22BAB4A for ; Fri, 1 Jan 2010 01:31:45 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 57155F5937; Fri, 1 Jan 2010 07:31:14 +0100 (CET) Date: Fri, 01 Jan 2010 06:31:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [commit] Fix "break *EXP thread/task NUM" for Ada (was: "Re: RFC: Fix "break *EXP thread NUM"") Message-ID: <20100101063114.GO2788@adacore.com> 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> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="gr/z0/N6AeWAPJVB" Content-Disposition: inline In-Reply-To: <20091125204303.GA21726@caradoc.them.org> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-01/txt/msg00002.txt.bz2 --gr/z0/N6AeWAPJVB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 652 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 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 Fix break *FUN'address thread NUM. * ada-lex.l (task): Expand rule to also match the thread keyword. Tested on x86_64-linux. -- Joel --gr/z0/N6AeWAPJVB Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="task-bp-at-addr.diff" Content-length: 1020 commit 366b0ad634564fcc3ee6242510d91fab52d994db Author: brobecke 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)); } --gr/z0/N6AeWAPJVB Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="thread-bp-at-addr.diff" Content-length: 691 commit 7d7cd745c3f76445eb0f92a76e347de999d938ff Author: Joel Brobecker 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); --gr/z0/N6AeWAPJVB--