From patchwork Fri Dec 1 14:59:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 81116 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 10DC6385C6EE for ; Fri, 1 Dec 2023 14:59:54 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 8B5443858C62 for ; Fri, 1 Dec 2023 14:59:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8B5443858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8B5443858C62 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701442791; cv=none; b=tMg7e2T68RGoxjXDcf8517L3fvAF7sDeOUSTdGSaDtIGUJskBxs4PeNEnZGMn3F7ZAE8RuEo6D+HNkCi6Y0xMyyqbvY9RgJtwA5Vw9+6rNRHj3oHLSlfuRqLIr5JQ0EbFiwFh8IeVWqX1y9eonxvYi80uaBVfEZUmi2DI+DV4CQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701442791; c=relaxed/simple; bh=oRkgb6z7MMVgWKEnYE0NmLCrlUISigOJr2141KZVdF8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=xeWSGSe7C9t3+/MKFuVvq6ujORyVrbAIyx9lrmx4+2TSrQSE83Hs9NCF+EOUprrGAXLXuiP9CdnwCKlZgtg0FCYXVQaPKkVzqAfN5iaLHMLkZBVrjAmUhSymd144RgDQhmGLGcY1mmbjsVClz2eRw4ohMC/d/MSG667Z+ODHNHw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701442789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=u5+1vHG09J8CSkaDUxGb1dUttvq2l40Pvj+4icyU52o=; b=gw4GbC8pDBTmGoDCfjiNCSp8xDQe5TuaKOwhxFFR31510RhVQdETxrJGMQH6SB5SgCnH1z p/bBGVcKh/Io2A9POSmJdj3SfEgoflWjenOW5gbuiiOwjDxpXUg+AhdBoCBbB/E5lys/yt MxfyNT4tLFDCIulj+8SIxGmTIRoZbiE= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-574-4z8QTp7OOtO8Jj1dxzqvkw-1; Fri, 01 Dec 2023 09:59:47 -0500 X-MC-Unique: 4z8QTp7OOtO8Jj1dxzqvkw-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-408695c377dso17031245e9.2 for ; Fri, 01 Dec 2023 06:59:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701442786; x=1702047586; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=u5+1vHG09J8CSkaDUxGb1dUttvq2l40Pvj+4icyU52o=; b=t7Si/biSSamnYNB4a6PZJ4DwSNtGB7a3/PVb1cAqbF/yu7MWeEDc/7uTvst9SQjUSY mJkWp2OPHahynBX3UA/mOWXfQR6pl/kZ81WTMnOfxs1vjU3m8RJcRoWhX6nqlZ0xw/eA w0HZSurVOQgqvTXy31He21TFnMKAEcICrWd9RURSwaCHkARoVH/JY56qXPbyhiqvj750 csQzVVAGYNwbmFBPIjTDXXneZyHn3vePWJepcWBUmgbMI/qh31Z1qaX3jZDp3sUYktD8 gQkqu6etgQbWs3aiuKQb3mmYF9LktmGfEDqx7AXNBhwbopOoE0hspiQ/ocN8+R0V9a+C SwjA== X-Gm-Message-State: AOJu0YzswfrcLcLBKw7+vKNVDJ+xAIWJq5nvEJ+tF9Sa/Rv9/3mG/w/Y 9RzoShGoXUiJVE1OSkHEnbEEjmFAmiMc65D6GTQJsGBeBFJiHkmYW3is3r5XDiDPbYiFeIwGQZg ONivmqZrDMytLBlUNePHGL5uKyueZ X-Received: by 2002:a05:600c:3504:b0:406:f833:d853 with SMTP id h4-20020a05600c350400b00406f833d853mr403579wmq.15.1701442786199; Fri, 01 Dec 2023 06:59:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5Apx9ZUtT8vsErddpNJ7ifdfjlRngpeMEeHHCN1Lf5mUh36Mrc1QmlGnbQ2WjuE2dL5eRzA== X-Received: by 2002:a05:600c:3504:b0:406:f833:d853 with SMTP id h4-20020a05600c350400b00406f833d853mr403574wmq.15.1701442785851; Fri, 01 Dec 2023 06:59:45 -0800 (PST) Received: from localhost ([37.169.169.39]) by smtp.gmail.com with ESMTPSA id n16-20020a05600c501000b00407b93d8085sm9402158wmr.27.2023.12.01.06.59.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 06:59:45 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id 63B425077C43; Fri, 1 Dec 2023 15:59:44 +0100 (CET) From: Dodji Seketeli To: libabigail@sourceware.org Cc: dodji@redhat.com Subject: [PATCH, applied] abilint: Alphabetically sort programs options Organization: Red Hat / France X-Operating-System: AlmaLinux 9.2 X-URL: http://www.redhat.com Date: Fri, 01 Dec 2023 15:59:44 +0100 Message-ID: <87h6l2nf33.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Hello, It's a mess to find an option you are looking for both in the manual or when doing abilint --help. So how about sorting the options of the various libabigail programs, starting from abilint? Here we go. * doc/manuals/abilint.rst: Alphabetically sort options in the manual. * tools/abilint.cc (display_usage): Likewise for the help strings. Signed-off-by: Dodji Seketeli Applied to master. --- doc/manuals/abilint.rst | 48 +++++++++++++++++++++++++---------------- tools/abilint.cc | 22 +++++++++---------- 2 files changed, 41 insertions(+), 29 deletions(-) diff --git a/doc/manuals/abilint.rst b/doc/manuals/abilint.rst index 594dd4c2..5fac4477 100644 --- a/doc/manuals/abilint.rst +++ b/doc/manuals/abilint.rst @@ -34,13 +34,12 @@ Options or even ELF symbols. The purpose is to make the ABIXML output more human-readable for debugging or documenting purposes. - * ``--help`` - Display a short help message and exits. + * ``--ctf`` - * `--version | -v` + Extract ABI information from CTF debug information, if present in + the given object. - Display the version of the program and exit. * ``--debug-info-dir`` <*path*> @@ -57,17 +56,39 @@ Options information installed by your system's package manager because then ``abidiff`` knows where to find it. + * ``--diff`` For XML inputs, perform a text diff between the input and the memory model saved back to disk. This can help to spot issues in the handling of the XML format by the underlying Libabigail library. + + * ``--header-file | --hf`` + + Specifies where to find one of the public headers of the abi file + that the tool has to consider. The tool will thus filter out + types that are not defined in public headers. + + + * ``--headers-dir | --hd`` + + Specifies where to find the public headers of the first shared + library that the tool has to consider. The tool will thus filter + out types that are not defined in public headers. + + + * ``--help`` + + Display a short help message and exits. + + * ``--noout`` Do not display anything on standard output. The return code of the command is the only way to know if the command succeeded. + * ``--suppressions | suppr`` <*path-to-suppression-specifications-file*> Use a :ref:`suppression specification ` file @@ -77,30 +98,21 @@ Options taken into account. ABI artifacts matched by the suppression specifications are suppressed from the output of this tool. - * ``--headers-dir | --hd`` - - Specifies where to find the public headers of the first shared - library that the tool has to consider. The tool will thus filter - out types that are not defined in public headers. - - * ``--header-file | --hf`` - - Specifies where to find one of the public headers of the abi file - that the tool has to consider. The tool will thus filter out - types that are not defined in public headers. * ``--stdin | --`` Read the input content from standard input. + * ``--tu`` Expect the input XML to represent a single translation unit. - * ``--ctf`` - Extract ABI information from CTF debug information, if present in - the given object. + * `--version | -v` + + Display the version of the program and exit. + .. _ELF: http://en.wikipedia.org/wiki/Executable_and_Linkable_Format .. _DWARF: http://www.dwarfstd.org diff --git a/tools/abilint.cc b/tools/abilint.cc index 9c6ed897..40fe6f37 100644 --- a/tools/abilint.cc +++ b/tools/abilint.cc @@ -485,25 +485,25 @@ display_usage(const string& prog_name, ostream& out) emit_prefix(prog_name, out) << "usage: " << prog_name << " [options] []\n" << " where options can be:\n" - << " --help display this message\n" - << " --version|-v display program version information and exit\n" + << " --annotate annotate the ABI artifacts emitted in the output\n" +#ifdef WITH_CTF + << " --ctf use CTF instead of DWARF in ELF files\n" +#endif << " --debug-info-dir the path under which to look for " "debug info for the elf \n" - << " --headers-dir|--hd the path to headers of the elf file\n" - << " --header-file|--hf the path to one header of the elf file\n" - << " --suppressions|--suppr specify a suppression file\n" << " --diff for xml inputs, perform a text diff between " "the input and the memory model saved back to disk\n" + << " --header-file|--hf the path to one header of the elf file\n" + << " --headers-dir|--hd the path to headers of the elf file\n" + << " --help display this message\n" << " --noout do not display anything on stdout\n" - << " --annotate annotate the ABI artifacts emitted in the output\n" - << " --stdin read abi-file content from stdin\n" - << " --tu expect a single translation unit file\n" -#ifdef WITH_CTF - << " --ctf use CTF instead of DWARF in ELF files\n" -#endif #ifdef WITH_SHOW_TYPE_USE_IN_ABILINT << " --show-type-use show how a type is used from the abixml file\n" #endif + << " --stdin read abi-file content from stdin\n" + << " --suppressions|--suppr specify a suppression file\n" + << " --tu expect a single translation unit file\n" + << " --version|-v display program version information and exit\n" ; }