From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14962 invoked by alias); 24 Sep 2012 04:48:25 -0000 Received: (qmail 14716 invoked by uid 22791); 24 Sep 2012 04:48:19 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mail-pa0-f41.google.com (HELO mail-pa0-f41.google.com) (209.85.220.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Sep 2012 04:47:55 +0000 Received: by padfa10 with SMTP id fa10so545053pad.0 for ; Sun, 23 Sep 2012 21:47:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=ysvSN8lBMDl8sXPsBukqD4Iw1cCroGyn4lzMeIoED6Y=; b=jCyw3zTC3We2Yh7lOcOIRUvDtLcKuUjh2eaBcASyCa8AABrbj3CbmJNFIdUkdlR/nq lsebIIxP7O1xVs9ckFcd6bjsZuPwYj1bmd3Sayce5agb0e0zZZlhxvh6amy11yTtCpMU jCJCTCOhkakitazzXHsvTMHXM8IMYMxJJG3m79KcSaPgcQ1fSkLFUAZpqe2P/0D/GHoT dD19FqrMpfRpVM3Npd9i1Aq8BNCReVrfjEd5YE1KmnWMi0wSscndIdWquTqJA1zxRaqj A7VzBt9RDLcWOETwlQuWEMRrJ2t4+soN5OViDCY9mCkshHylRY3hc1PoM/x9Wcd3CuFQ +KRQ== Received: by 10.66.73.6 with SMTP id h6mr29563611pav.69.1348462074991; Sun, 23 Sep 2012 21:47:54 -0700 (PDT) Received: from divine-comedy.divine-comedy (ec2-122-248-200-206.ap-southeast-1.compute.amazonaws.com. [122.248.200.206]) by mx.google.com with ESMTPS id b6sm8131017paz.9.2012.09.23.21.47.52 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 23 Sep 2012 21:47:54 -0700 (PDT) From: Sanjoy Das To: gdb-patches@sourceware.org Cc: Sanjoy Das Subject: [PATCH 2/3] Make jit-reader-load accept absolute paths to reader shared objects. Date: Mon, 24 Sep 2012 04:48:00 -0000 Message-Id: <1348462325-4891-3-git-send-email-sanjoy@playingwithpointers.com> In-Reply-To: <1348462325-4891-1-git-send-email-sanjoy@playingwithpointers.com> References: <1348462325-4891-1-git-send-email-sanjoy@playingwithpointers.com> X-Gm-Message-State: ALoCoQlGMn1162rPjz2vtqODqQd1L11OLYRVGiRICqnrD4utNIGFRXBInU8mO2d0ByT/Si3UMlDQ X-IsSubscribed: yes 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 X-SW-Source: 2012-09/txt/msg00485.txt.bz2 --- gdb/ChangeLog | 5 +++++ gdb/doc/ChangeLog | 4 ++++ gdb/doc/gdb.texinfo | 22 +++++++++++++--------- gdb/jit.c | 6 +++++- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 13eaa5c..69e3e8f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2012-09-24 Sanjoy Das + * jit.c (jit_reader_load_command): Interpret the jit reader name + as an absolute path if it begins with a forward slash. + +2012-09-18 Sanjoy Das + PR gdb/14550 * jit.c (finalize_symtab): Ensure that only the global block has a diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index ba8231a..0546467 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2012-09-24 Sanjoy Das + * gdb.texinfo (Using JIT Debug Info Readers): Change documentation + to reflect that jit-reader-load now supports absolute file-names. + 2012-09-21 Yao Qi Pedro Alves diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 5fcbada..c28b803 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -33436,15 +33436,19 @@ Readers can be loaded and unloaded using the @code{jit-reader-load} and @code{jit-reader-unload} commands. @table @code -@item jit-reader-load @var{reader-name} -Load the JIT reader named @var{reader-name}. On a UNIX system, this -will usually load @file{@var{libdir}/gdb/@var{reader-name}}, where -@var{libdir} is the system library directory, usually -@file{/usr/local/lib}. Only one reader can be active at a time; -trying to load a second reader when one is already loaded will result -in @value{GDBN} reporting an error. A new JIT reader can be loaded by -first unloading the current one using @code{jit-reader-load} and then -invoking @code{jit-reader-load}. +@item jit-reader-load @var{reader} +Load the JIT reader named @var{reader}. @var{reader} is a shared +object specified as either an absolute or a relative file name. In +the latter case, gdb will try to load the reader from a pre-configured +directory, usually @file{@var{libdir}/gdb/} on a UNIX system (here +@var{libdir} is the system library directory, often +@file{/usr/local/lib}). + +Only one reader can be active at a time; trying to load a second +reader when one is already loaded will result in @value{GDBN} +reporting an error. A new JIT reader can be loaded by first unloading +the current one using @code{jit-reader-unload} and then invoking +@code{jit-reader-load}. @item jit-reader-unload Unload the currently loaded JIT reader. diff --git a/gdb/jit.c b/gdb/jit.c index eff2ed6..48a2dbb 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -25,6 +25,7 @@ #include "breakpoint.h" #include "command.h" #include "dictionary.h" +#include "filenames.h" #include "frame-unwind.h" #include "gdbcmd.h" #include "gdbcore.h" @@ -208,7 +209,10 @@ jit_reader_load_command (char *args, int from_tty) if (loaded_jit_reader != NULL) error (_("JIT reader already loaded. Run jit-reader-unload first.")); - so_name = xstrprintf ("%s/%s", jit_reader_dir, args); + if (IS_ABSOLUTE_PATH(args)) + so_name = xstrdup (args); + else + so_name = xstrprintf ("%s/%s", jit_reader_dir, args); prev_cleanup = make_cleanup (xfree, so_name); loaded_jit_reader = jit_reader_load (so_name); -- 1.7.10.4