This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: New feature "source-id"
- From: Doug Evans <dje at google dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: Gerhard Gappmeier <gerhard dot gappmeier at ascolab dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Sat, 15 Mar 2014 19:34:08 -0700
- Subject: Re: New feature "source-id"
- Authentication-results: sourceware.org; auth=none
- References: <7365721 dot BnaR1nHazz at lt-gergap> <CADPb22RsRdFvr09HC_zj_tvBVLEScC6UzgNs=UCjpf3zWCt_gQ at mail dot gmail dot com> <83siqjb50u dot fsf at gnu dot org>
On Sat, Mar 15, 2014 at 1:06 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Sat, 15 Mar 2014 10:32:12 -0700
>> From: Doug Evans <dje@google.com>
>> Cc: gdb-patches <gdb-patches@sourceware.org>
>>
>> But IMO the fetching of source must go through the Extension Language API.
>> See gdb/extension*.[ch].
>> I.e., don't do the popen in gdb. Just call out to the extension
>> language via the API (e.g, Python), passing it the necessary
>> parameters.
>
> That would mean the feature will be unavailable in a GDB compiled
> without Python and Guile.
Actually, that could be an orthogonal question: the Extension Language
API also provides an interface to gdb's own scripting language (e.g.,
to support auto-loading .gdb scripts).
I'm not sure I would go that route though. I have no problem with
requiring Python or Guile in order to support this.
Note that one concern I have is that it may be that some sites will
want to have some of gdb's state updated when source files are
automagically fetched. E.g., maybe one would want to update the
source search path. Maybe not, but at any rate I don't want this
feature to preclude doing things like that, and one can't do that if
the feature works by running an external program via popen.
btw, Gerhard, this would require a copyright assignment.
Do you have one? [If/when (and at this point I'd say it's still a big
"if") there is general consensus on adding the feature you'll need to
complete an assignment before the patch can be added to the FSF
sources. Let me know if you need the necessary paperwork. There's no
rush on that, but it's something to keep in mind.