From: Joel Brobecker <brobecker@gnat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFC] Add new command to spit out the linetable for a given file
Date: Sat, 01 Mar 2003 00:34:00 -0000 [thread overview]
Message-ID: <20030301003358.GB11181@gnat.com> (raw)
The GVD developpers have brought to my attention an issue regarding
mostly performance: GVD has a feature were it is capable of telling
whether a given line of a source file contains any code. In order to
do this, they use the "info line" command on every single line of the
file.
Obviously, this causes a lot of communication between GDB and GVD, so
they managed to improve a bit the performance by doing this operation as
a background task for the lines that are not currently displayed in the
editor (that is, without blocking the user from doing anything else).
In an effort to continue improving the performance even more, they asked
me if it was possible to add a new command that would print all in one
go the list of lines containing some code.
In parallel, I know that GVD also provides an assembly view of the
current line of code. In order to get the addresses of the instructions
corresponding to the current line of code, the also use "info line".
So the idea that I came up with was to add a new function that would
essentially dump the linetable for the symtab of the file in question.
Roughly, from the user's perspective, it would be a new info command
(names can be improved):
(gdb) info sloc <filename>
0x1234 1
0x1238 2
0x1239 1
0x123d 3
...
This shouldn't be too hard to implement, and should help GVD a lot.
What do you think? Any other idea, or is there any command I don't know
about that would give us this information?
--
Joel
next reply other threads:[~2003-03-01 0:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-01 0:34 Joel Brobecker [this message]
2003-03-01 2:05 ` Daniel Jacobowitz
2003-03-01 8:18 ` Joel Brobecker
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=20030301003358.GB11181@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