From: Joel Brobecker <brobecker@gnat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFC] Add new command to spit out the linetable for a given file
Date: Sat, 01 Mar 2003 08:18:00 -0000 [thread overview]
Message-ID: <20030301081857.GD11181@gnat.com> (raw)
In-Reply-To: <20030301020545.GA32479@nevyn.them.org>
> I believe that this command has been proposed before - I vaguely
> remember it even being implemented but I don't know what happened to
> the patch. It was "maint info lines" or something similar...
>
> Would be within the past year in the list archives somewhere but I
> can't find it.
Thanks Daniel, I think I found the message. I vaguely remembered this
too, but couldn't find it in the archives until you reminded me of the
proposed syntax.
http://sources.redhat.com/ml/gdb-patches/2002-09/msg00084.html
This command is associating line numbers from PC addresses, or from
a range of addresses. The intent was to be able to generate a mixed
source/assembly view of the code. But the patch never got approved
because it was felt that this was not the best approach to solve this
problem, and because there is already a CLI command that does exactly
what the author needed (-data-disassemble).
What GVD needs is the opposite: get the PC addresses for each line of a
file. We could extend a bit the flexibility of this command by allowing
the user to specify a range of line numbers too, to allow a front-end to
limit the query to the lines currently visible in the source view, for
instance.
FernandoN made a very good point that "maint" commands are only intended
for debugging or testing GDB. That's why I chose to stay in the "info"
commands realm. I first thought about calling this command "info
linetable", but dropped this because of completion clashes with
the current "info line". So I came up with "info sloc", which I find
only so so, but was the best I could find.
We are not familiar with the GDB/MI commands yet, but if it is felt that
this new functionality would be more suitable if implemented as a MI
command, we would be happy to look into that too.
Let me know what you think. I believe this new command could be very
useful to all GDB frontends. Being able to tell at a glance which lines
have code is really a cool and helpful feature.
--
Joel
next prev parent reply other threads:[~2003-03-01 8:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-01 0:34 Joel Brobecker
2003-03-01 2:05 ` Daniel Jacobowitz
2003-03-01 8:18 ` Joel Brobecker [this message]
2003-03-01 12:39 ` Eli Zaretskii
2003-03-01 15:28 ` Andrew Cagney
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=20030301081857.GD11181@gnat.com \
--to=brobecker@gnat.com \
--cc=gdb-patches@sources.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