From: Joel Brobecker <brobecker@adacore.com>
To: Keith Seitz <keiths@redhat.com>
Cc: archer@sourceware.org
Subject: Re: [Archer] Re: [Archer] Stop the Insanity! Linespec Rewrite
Date: Wed, 07 Mar 2012 01:26:00 -0000 [thread overview]
Message-ID: <20120307012603.GX2867@adacore.com> (raw)
In-Reply-To: <4F56B4D5.4070700@redhat.com>
> 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
next prev parent reply other threads:[~2012-03-07 1:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 1:14 Keith Seitz
2012-03-02 17:00 ` Tom Tromey
2012-03-02 22:41 ` Keith Seitz
2012-03-03 2:36 ` Tom Tromey
2012-03-02 19:07 ` [Archer] " Joel Brobecker
2012-03-02 22:49 ` Keith Seitz
2012-03-06 17:40 ` [Archer] " Joel Brobecker
2012-03-06 19:08 ` Keith Seitz
2012-03-06 19:36 ` Keith Seitz
2012-03-06 21:50 ` [Archer] " Joel Brobecker
2012-03-07 0:11 ` [Archer] " Joel Brobecker
2012-03-07 1:08 ` Keith Seitz
2012-03-07 1:26 ` Joel Brobecker [this message]
2012-03-07 14:39 ` [Archer] " Tom Tromey
2012-03-07 15:01 ` Tom Tromey
2012-03-07 15:39 ` [Archer] " Joel Brobecker
2012-03-07 16:06 ` Tom Tromey
2012-03-07 21:19 ` Joel Brobecker
2012-03-07 21:11 ` [Archer] " Keith Seitz
2012-03-08 3:02 ` Joel Brobecker
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=20120307012603.GX2867@adacore.com \
--to=brobecker@adacore.com \
--cc=archer@sourceware.org \
--cc=keiths@redhat.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).