From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81621 invoked by alias); 1 Dec 2019 09:08:19 -0000 Mailing-List: contact dwz-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: dwz-owner@sourceware.org Received: (qmail 81608 invoked by uid 89); 1 Dec 2019 09:08:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=__GNUC__, __gnuc__ X-Spam-Status: No, score=-25.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: mx1.suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Date: Tue, 01 Jan 2019 00:00:00 -0000 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com Subject: [committed] Add dump_die Message-ID: <20191201090811.GA31310@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2019-q4/txt/msg00108.txt.bz2 Hi, Add dump_die debug function, that we can easily call during a debug session: ... (gdb) call dump_die (die) 5b X 0 0 short int base_type ... Committed to trunk. Thanks, - Tom Add dump_die 2019-11-30 Tom de Vries * dwz.c (USED): Define. (dump_die): New function. --- dwz.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dwz.c b/dwz.c index d417c94..f68a81c 100644 --- a/dwz.c +++ b/dwz.c @@ -119,9 +119,11 @@ #if defined __GNUC__ # define FORCE_INLINE __attribute__((always_inline)) # define UNUSED __attribute__((unused)) +# define USED __attribute__((used)) #else # define FORCE_INLINE # define UNUSED +# define USED #endif #define obstack_chunk_alloc malloc @@ -4172,6 +4174,13 @@ dump_die_with_indent (int indent, dw_die_ref die) fprintf (stderr, "\n"); } +/* Dump DIE to stderr. */ +void USED +dump_die (dw_die_ref die) +{ + dump_die_with_indent (0, die); +} + /* Dump DIE tree at tree depth DEPTH. */ static void dump_dies (int depth, dw_die_ref die)