From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19690 invoked by alias); 23 Feb 2014 23:27:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 19681 invoked by uid 89); 23 Feb 2014 23:27:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f169.google.com Received: from mail-yk0-f169.google.com (HELO mail-yk0-f169.google.com) (209.85.160.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 23 Feb 2014 23:27:31 +0000 Received: by mail-yk0-f169.google.com with SMTP id 142so12551599ykq.0 for ; Sun, 23 Feb 2014 15:27:29 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.236.101.227 with SMTP id b63mr27171455yhg.37.1393198049194; Sun, 23 Feb 2014 15:27:29 -0800 (PST) Received: by 10.170.130.14 with HTTP; Sun, 23 Feb 2014 15:27:29 -0800 (PST) In-Reply-To: <20140223212400.GA8831@host2.jankratochvil.net> References: <20140223212400.GA8831@host2.jankratochvil.net> Date: Sun, 23 Feb 2014 23:27:00 -0000 Message-ID: Subject: Re: [patch+7.7] Fix auto-load 7.7 regression [Re: [commit 2/2] Move processing of .debug_gdb_scripts to auto-load.c] From: Doug Evans To: Jan Kratochvil Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00714.txt.bz2 On Sun, Feb 23, 2014 at 1:24 PM, Jan Kratochvil wrote: > Hi Doug, > > the regression affects any loading from /usr/share/gdb/auto-load . > > 5b2bf9471f1499bee578fcd60c05afe85794e280 is the first bad commit > commit 5b2bf9471f1499bee578fcd60c05afe85794e280 > Author: Doug Evans > Date: Fri Nov 29 21:29:26 2013 -0800 > Move .debug_gdb_script processing to auto-load.c. > Simplify handling of auto-loaded objfile scripts. > > Fedora 20 x86_64 > $ gdb -q /usr/lib64/libgobject-2.0.so > Reading symbols from /usr/lib64/libglib-2.0.so.0.3800.2...Reading symbols from /usr/lib/debug/usr/lib64/libglib-2.0.so.0.3800.2.debug...done. > done. > (gdb) _ > > Fedora Rawhide x86_64 > $ gdb -q /usr/lib64/libgobject-2.0.so > Reading symbols from /usr/lib64/libglib-2.0.so...Reading symbols from /usr/lib/debug/usr/lib64/libglib-2.0.so.0.3990.0.debug...done. > done. > warning: File "/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load:/usr/bin/mono-gdb.py". > To enable execution of this file add > add-auto-load-safe-path /usr/lib64/libglib-2.0.so.0.3990.0-gdb.py > line to your configuration file "/home/jkratoch/.gdbinit". > To completely disable this security protection add > set auto-load safe-path / > line to your configuration file "/home/jkratoch/.gdbinit". > For more information about this security protection see the > "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: > info "(gdb)Auto-loading safe path" > (gdb) _ > > That is it tries to load "forbidden" > /usr/lib64/libglib-2.0.so.0.3990.0-gdb.py > but it should load instead > /usr/share/gdb/auto-load/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py* > Although that is also not exactly this way, there does not exist any > /usr/lib64/libglib-2.0.so.0.3990.0-gdb.py > despite regressed GDB says so. > > > > Regards, > Jan > > gdb/ > 2014-02-23 Jan Kratochvil > > * auto-load.c (auto_load_objfile_script_1): Change filename to > debugfile. > > gdb/testsuite/ > 2014-02-23 Jan Kratochvil > > * gdb.base/auto-load-script: New file. > * gdb.base/auto-load.c: New file. > * gdb.base/auto-load.exp: New file. Crap. "Sorry about that chief." I filed this: https://sourceware.org/bugzilla/show_bug.cgi?id=16626 If we make 7.7.1 this should definitely go in. Your fix looks fine to me with one nit: The .exp file is missing a test for native or a call to gdb_remote_download to download the script. You might also want to add a test to verify gdb won't load the wrong file that it's trying to do now.