Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [RFA/doco/commit] Make the "info dll" command available on all platform.
Date: Tue, 05 May 2015 18:02:00 -0000	[thread overview]
Message-ID: <1430848969-10842-1-git-send-email-brobecker@adacore.com> (raw)

Hello,

A follow-up on a discussion we had a while back:
https://www.sourceware.org/ml/gdb-patches/2015-01/msg00050.html

The "info dll", an alias of the "info sharedlibrary" command, is
currently only defined in windows native versions. This patch makes
it universally available by moving the alias declaration to solib.c,
and adjusts the documentation accordingly.

Making it universally available has two benefits:
  - Windows users moving to a Unix platforms are still able to use
    the same command for getting the list of shared libraries;
  - Unix to Windows cross debuggers now provide that command also.

gdb/ChangeLog:

        * solib.c (_initialize_solib): Add "info dll" alias creation.
        * windows-nat.c (set_windows_aliases): Delete.
        (_initialize_windows_nat): Remove deprecated_init_ui_hook
        assignment.
        * NEWS: Add news entry about "info dll" now being available
        on all platforms.

gdb/doc/ChangeLog:

        * gdb.texinfo (Files): Add "info dll" documentation.
        (Cygwin Native): Remove "info dll" documentation.

Tested on x86_64-linux, no regression (obviously).

I'll push the patch once documentation is reviewed.
Note that I looked at getting rid of deprecated_init_ui_hook,
but I found that insight might still be needing it :-( (to be
confirmed, though, as my sources are fairly old).

Thanks,
-- 
Joel

---
 gdb/NEWS            | 3 +++
 gdb/doc/gdb.texinfo | 8 ++++----
 gdb/solib.c         | 1 +
 gdb/windows-nat.c   | 7 -------
 4 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/gdb/NEWS b/gdb/NEWS
index 651401d..0c7084a 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -23,6 +23,9 @@
   present in the debug info.  This typically includes the compiler version
   and may include things like its command line arguments.
 
+* The "info dll", an alias of the "info sharedlibrary" command,
+  is now available on all platforms.
+
 * Directory names supplied to the "set sysroot" commands may be
   prefixed with "target:" to tell GDB to access shared libraries from
   the target system, be it local or remote.  This replaces the prefix
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 9e2787d..19d8bb3 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -17854,6 +17854,10 @@ Print the names of the shared libraries which are currently loaded
 that match @var{regex}.  If @var{regex} is omitted then print
 all shared libraries that are loaded.
 
+@kindex info dll
+@item info dll @var{regex}
+This is an alias of @code{info sharedlibrary}.
+
 @kindex sharedlibrary
 @kindex share
 @item sharedlibrary @var{regex}
@@ -20701,10 +20705,6 @@ This command displays thread specific information stored in the
 Thread Information Block (readable on the X86 CPU family using @code{$fs}
 selector for 32-bit programs and @code{$gs} for 64-bit programs).
 
-@kindex info dll
-@item info dll
-This is a Cygwin-specific alias of @code{info shared}.
-
 @kindex set cygwin-exceptions
 @cindex debugging the Cygwin DLL
 @cindex Cygwin DLL, debugging
diff --git a/gdb/solib.c b/gdb/solib.c
index 358a0a2..0010c2f 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -1675,6 +1675,7 @@ _initialize_solib (void)
 	   _("Load shared object library symbols for files matching REGEXP."));
   add_info ("sharedlibrary", info_sharedlibrary_command,
 	    _("Status of loaded shared object libraries."));
+  add_info_alias ("dll", "sharedlibrary", 1);
   add_com ("nosharedlibrary", class_files, no_shared_libraries,
 	   _("Unload all shared object library symbols."));
 
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index be5d7e8..701d2c5 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2502,12 +2502,6 @@ windows_target (void)
   return t;
 }
 
-static void
-set_windows_aliases (char *argv0)
-{
-  add_info_alias ("dll", "sharedlibrary", 1);
-}
-
 /* -Wmissing-prototypes */
 extern initialize_file_ftype _initialize_windows_nat;
 
@@ -2601,7 +2595,6 @@ Show whether to display kernel exceptions in child process."), NULL,
   add_cmd ("selector", class_info, display_selectors,
 	   _("Display selectors infos."),
 	   &info_w32_cmdlist);
-  deprecated_init_ui_hook = set_windows_aliases;
 }
 
 /* Hardware watchpoint support, adapted from go32-nat.c code.  */
-- 
1.9.1


             reply	other threads:[~2015-05-05 18:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05 18:02 Joel Brobecker [this message]
2015-05-05 18:35 ` Eli Zaretskii
2015-05-06 17:50   ` Joel Brobecker
2015-05-06 11:53 ` Pedro Alves
2015-05-06 17:52   ` [pushed] Get rid of deprecated_init_ui_hook Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1430848969-10842-1-git-send-email-brobecker@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox