From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YOQYEbPypGBfNwAAWB0awg (envelope-from ) for ; Wed, 19 May 2021 07:12:51 -0400 Received: by simark.ca (Postfix, from userid 112) id 440791F11E; Wed, 19 May 2021 07:12:51 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 607461E01F for ; Wed, 19 May 2021 07:12:50 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 265033938C19; Wed, 19 May 2021 11:12:50 +0000 (GMT) Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 3DE16386FC37 for ; Wed, 19 May 2021 11:12:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3DE16386FC37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x42c.google.com with SMTP id c14so11796126wrx.3 for ; Wed, 19 May 2021 04:12:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZB5a/3QCWK1t5ZwQ557DxyCh/oGFsf0EPWuqEUbkzkg=; b=dIg0FxpWrFyy81671f2gu6yMNoGGn3xBqBS2BtocTzSlTTVzayQfc/7zMatZtej4n4 hMkbCyzmD+Vwairb2rILGJr+8rVcdj1tUuN9WkYLOPRrpIKir76Az1pbMWvx6JKgIWJc woMInZVneePbDQIMxX71Dluku3cX5+rC+SciHDqxt7nqsIQXi2nPzCHqU8lMTAjWQvXJ vJCDeUkwzul360+UvkYTyNgwdfA0yak0V6CadV+E+RkunVvyxpruVXa09uYKvP57eO2c 9wVise9XnRpyODTmOZJ4sUyNleqqRhGqGl9q0+TjDNjE6Xx0M2WYdp16ER8zA4xaBvAQ Z6Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZB5a/3QCWK1t5ZwQ557DxyCh/oGFsf0EPWuqEUbkzkg=; b=DZ09xT++xhPo3VHw9Qn/pY0EwzEWZgCSRkRgvaLjuIfMc8kBJoMNVbDAD/kI/EPyRQ IVazN6aTkNvXz8y5r8tpMr4rK+TvwLTcyuWYc+1ceFAu/sPeFhDlWkQYXkDw8KIn6g89 aOYhn24VF0cmSR6BJMw5NuYk/K8mC+H+FXGJVepyaL+VOba6vjN5gsgAL2U1qkaV3Vbo 5Kq2kUExULAscGg7zRF6uen3G6CUMH0o8Bw+HU+dCGsTs9W4dgVvpygPnQ1FTyypvfPL wdib6QXsSf3QlhfsJ4Nz4pdDNsKMqH7bNrTT7qSBPI1HWTLump8aKlSP1mc2lPlc8kGQ pS6A== X-Gm-Message-State: AOAM532+HoTdYWNryFXci3tOYvU4OwHjL1zBw20kuv0TxLKbnomTIRvw d46CbaAWVmu5QJjlIA8YsddF4NF2aI3BDg== X-Google-Smtp-Source: ABdhPJwMNUlMsYz4vlf1ojxK/KqRX4Zti+WBwOXSBLC2mqBoBNEaO3wnEUUfGi3haUCeDR7sdAEnUg== X-Received: by 2002:a5d:4b04:: with SMTP id v4mr14025560wrq.92.1621422766166; Wed, 19 May 2021 04:12:46 -0700 (PDT) Received: from localhost (host109-151-46-70.range109-151.btcentralplus.com. [109.151.46.70]) by smtp.gmail.com with ESMTPSA id t17sm17599292wrp.89.2021.05.19.04.12.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 04:12:45 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: [PATCHv2 0/5] "info sources" - group by objfile Date: Wed, 19 May 2021 12:12:37 +0100 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Thanks for all the great feedback. In V2: - Documentation talks about object files rather than binaries, I also fixed the other doc issues Eli pointed out. - Renamed the new quick function in patch #1 to has_unexpanded_symtabs as suggested. The resuling objfile::has_unexpanded_symtabs function now has debug print out like other quick function wrapper functions. - The commit message that adds the new MI option has some example output. - Instead of adding a new option for CLI "info sources", the output format has been changed. - Other minor code issues have been cleaned up. Of note: - The new objfile::has_unexpanded_symtabs is still in symfile-debug.c rather than objfile.c as Tom suggested. This ensures that this quick function wrapper is in the same source file as all the other wrapper functions. I think we should move all of them together, or not at all, and if they do all move it feels like it should be a separate, follow-up commit. Thanks, Andrew --- Andrew Burgess (5): gdb: add new function quick_symbol_functions::has_unexpanded_symbols gdb: make struct output_source_filename_data more C++ like gdb/mi: add regexp filtering to -file-list-exec-source-files gdb/mi: add new --group-by-objfile flag for -file-list-exec-source-files gdb: change info sources to group results by objfile gdb/ChangeLog | 111 ++++++ gdb/NEWS | 30 ++ gdb/doc/ChangeLog | 15 + gdb/doc/gdb.texinfo | 166 +++++++-- gdb/dwarf2/read.c | 22 ++ gdb/mi/mi-cmd-file.c | 92 +++-- gdb/objfiles.h | 6 + gdb/psympriv.h | 2 + gdb/psymtab.c | 18 + gdb/quick-symbol.h | 6 + gdb/symfile-debug.c | 25 ++ gdb/symtab.c | 349 +++++++++++------- gdb/symtab.h | 59 +++ gdb/testsuite/ChangeLog | 19 + .../gdb.base/info_sources_2-header.h | 28 ++ gdb/testsuite/gdb.base/info_sources_2-lib.c | 25 ++ gdb/testsuite/gdb.base/info_sources_2-test.c | 26 ++ gdb/testsuite/gdb.base/info_sources_2.exp | 169 +++++++++ gdb/testsuite/gdb.dwarf2/dw2-filename.exp | 2 +- gdb/testsuite/gdb.mi/mi-file.exp | 2 +- gdb/testsuite/gdb.mi/mi-info-sources-base.c | 23 ++ gdb/testsuite/gdb.mi/mi-info-sources.c | 25 ++ gdb/testsuite/gdb.mi/mi-info-sources.exp | 177 +++++++++ 23 files changed, 1205 insertions(+), 192 deletions(-) create mode 100644 gdb/testsuite/gdb.base/info_sources_2-header.h create mode 100644 gdb/testsuite/gdb.base/info_sources_2-lib.c create mode 100644 gdb/testsuite/gdb.base/info_sources_2-test.c create mode 100644 gdb/testsuite/gdb.base/info_sources_2.exp create mode 100644 gdb/testsuite/gdb.mi/mi-info-sources-base.c create mode 100644 gdb/testsuite/gdb.mi/mi-info-sources.c create mode 100644 gdb/testsuite/gdb.mi/mi-info-sources.exp -- 2.25.4