From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2041) id D1FB93858CDA; Mon, 25 Jul 2022 22:07:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1FB93858CDA Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Vladimir Mezentsev To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] gprofng: fix bug 29351 - Move dynamic loading of modules to a later stage X-Act-Checkin: binutils-gdb X-Git-Author: Ruud van der Pas X-Git-Refname: refs/heads/master X-Git-Oldrev: 24d2cbc42ccf08dba79394635db3be084eed9062 X-Git-Newrev: 872ae1027e3a4d344333acf7507a32874444e3b0 Message-Id: <20220725220731.D1FB93858CDA@sourceware.org> Date: Mon, 25 Jul 2022 22:07:31 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2022 22:07:31 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D872ae1027e3a= 4d344333acf7507a32874444e3b0 commit 872ae1027e3a4d344333acf7507a32874444e3b0 Author: Ruud van der Pas Date: Fri Jul 22 06:32:51 2022 -0700 gprofng: fix bug 29351 - Move dynamic loading of modules to a later sta= ge =20 gprofng/Changelog: 2022-07-22 Ruud van der Pas =20 PR gprofng/29351 * gp-display-html/gp-display-html.in: the dynamic loading of modules occurred too early, resulting in the generation of the man page to fail in case a module is missing; the loading part = is now done somewhat later in the execution to avoid this problem. Diff: --- gprofng/gp-display-html/gp-display-html.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gprofng/gp-display-html/gp-display-html.in b/gprofng/gp-displa= y-html/gp-display-html.in index 54a87d7a3c7..9b207b99aa8 100644 --- a/gprofng/gp-display-html/gp-display-html.in +++ b/gprofng/gp-display-html/gp-display-html.in @@ -8852,6 +8852,8 @@ sub handle_module_availability { my $subr_name =3D get_my_name (); =20 + gp_message ("verbose", $subr_name, "Handling module requirements"); + #-------------------------------------------------------------------------= ----- # This is clunky at best, but there is a chicken egg problem here. For the # man page to be generated, the --help and --version options need to work, @@ -8868,7 +8870,9 @@ sub handle_module_availability "List::Util",=20 "Cwd",=20 "File::Basename",=20 + "File::stat",=20 "POSIX",=20 + "bigint",=20 "bignum"); =20 my @missing_modules =3D (); @@ -8895,12 +8899,17 @@ sub handle_module_availability { $cmd =3D $m . "->import ( qw (min max))"; } + elsif ($m eq "bigint") + { + $cmd =3D $m . "->import ( qw (hex))"; + } else { $cmd =3D $m . "->import"; } $cmd .=3D ";"; $result =3D eval ("$cmd"); + gp_message ("debugM", $subr_name, "cmd =3D $cmd"); } else {