[RFA] [1/2] auto-loading scripts from .debug_gdb_scripts section

Tom Tromey tromey@redhat.com
Tue Apr 20 19:13:00 GMT 2010


>>>>> "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



More information about the Gdb-patches mailing list