From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28971 invoked by alias); 7 Mar 2012 01:26:25 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 28962 invoked by uid 22791); 7 Mar 2012 01:26:24 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Date: Wed, 07 Mar 2012 01:26:00 -0000 From: Joel Brobecker To: Keith Seitz Cc: archer@sourceware.org Subject: Re: [Archer] Re: [Archer] Stop the Insanity! Linespec Rewrite Message-ID: <20120307012603.GX2867@adacore.com> References: <4F501EC1.3050104@redhat.com> <20120302190658.GH2867@adacore.com> <4F514E30.7070400@redhat.com> <20120306173945.GP2867@adacore.com> <4F564C6F.60001@redhat.com> <4F56671E.4000905@redhat.com> <20120306215019.GQ2867@adacore.com> <20120307001119.GU2867@adacore.com> <4F56B4D5.4070700@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F56B4D5.4070700@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-SW-Source: 2012-q1/txt/msg00026.txt.bz2 > I'm afraid I don't understand. As far as I can tell, CVS HEAD and > archer-keiths-linespec-rewrite behave identically. The output is > exactly the same: The thing is that the task ID you are using needs to be valid. So, basically, you need to use an Ada program that uses tasking, and the task ID needs to be known at the time the breakpoint is inserted. My favorite little Ada program happens to be available from gdb.ada/mi_task_arg. Using that program: gdb -q task_switch (gdb) b break_me Breakpoint 1 at 0x403a5a: file /[...]/task_switch.adb, line 57. (gdb) run Starting program: /[...]/task_switch [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". [New Thread 0x7ffff7852910 (LWP 32425)] [New Thread 0x7ffff764e910 (LWP 32426)] [Switching to Thread 0x7ffff764e910 (LWP 32426)] Breakpoint 1, task_switch.break_me () at /[...]/task_switch.adb:57 57 null; (gdb) info tasks ID TID P-ID Pri State Name 1 645010 48 Child Activation Wait main_task 2 645d80 1 48 Accept or Select Term my_callee * 3 649490 1 48 Runnable my_caller (gdb) b task_switch.adb:70 task 1 Breakpoint 2 at 0x40365a: file /[...]/task_switch.adb, line 70. The above works. But if you start using a different casing on the "task" keyword, as below, the current GDB rejects it: (gdb) b task_switch.adb:70 TASK 1 Junk at end of arguments. (gdb) b task_switch.adb:70 Task 1 Junk at end of arguments. (note: the "info tasks" command is not necessary for things to work; GDB will automatically compute the list of tasks as needed) -- Joel