This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] [1/2] auto-loading scripts from .debug_gdb_scripts section
- From: Tom Tromey <tromey at redhat dot com>
- To: dje at google dot com (Doug Evans)
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 20 Apr 2010 13:13:30 -0600
- Subject: Re: [RFA] [1/2] auto-loading scripts from .debug_gdb_scripts section
- References: <20100416070540.4205E84396@ruffy.mtv.corp.google.com>
- Reply-to: tromey at redhat dot com
>>>>> "Doug" == Doug Evans <dje@google.com> writes:
Doug> This patch adds support for auto-loading scripts mentioned in
Doug> section .debug_gdb_scripts.
It seems reasonable to me. I looked through the patch and didn't see
anything I disagreed with.
I'm curious why these new scripts are attached to the program space and
not just the objfile from which the section came. But, I don't think it
really matters.
I'm somewhat concerned about security. I don't know why I didn't think
of this before :-(. The issue is that either approach can result in
random Python code being loaded into gdb.
One idea for a fix would be to check the script file's ownership and
permissions before reading it. I think we'd need to allow files to be
owned by the current user or by root in order for this to work nicely in
the distro case.
Tom