public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-3452] Add cgraph_edge::debug function. Date: Fri, 25 Sep 2020 08:13:52 +0000 (GMT) [thread overview] Message-ID: <20200925081352.B046F381DCE9@sourceware.org> (raw) https://gcc.gnu.org/g:b2784a9698ffdd6cd8434694c11336e9f7905be5 commit r11-3452-gb2784a9698ffdd6cd8434694c11336e9f7905be5 Author: Martin Liska <mliska@suse.cz> Date: Thu Sep 24 16:29:49 2020 +0200 Add cgraph_edge::debug function. gcc/ChangeLog: * cgraph.c (cgraph_edge::debug): New. * cgraph.h (cgraph_edge::debug): New. Diff: --- gcc/cgraph.c | 14 ++++++++++++++ gcc/cgraph.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/gcc/cgraph.c b/gcc/cgraph.c index eb5f1a56c26..f018020fa4b 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -2072,6 +2072,20 @@ cgraph_edge::dump_edge_flags (FILE *f) fprintf (f, "(can throw external) "); } +/* Dump edge to stderr. */ + +void +cgraph_edge::debug (void) +{ + fprintf (stderr, "%s -> %s ", caller->dump_asm_name (), + callee == NULL ? "(null)" : callee->dump_asm_name ()); + dump_edge_flags (stderr); + fprintf (stderr, "\n\n"); + caller->debug (); + if (callee != NULL) + callee->debug (); +} + /* Dump call graph node to file F. */ void diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 0211f08964f..96d6cf609fe 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -2022,6 +2022,9 @@ private: /* Output flags of edge to a file F. */ void dump_edge_flags (FILE *f); + /* Dump edge to stderr. */ + void DEBUG_FUNCTION debug (void); + /* Verify that call graph edge corresponds to DECL from the associated statement. Return true if the verification should fail. */ bool verify_corresponds_to_fndecl (tree decl);
reply other threads:[~2020-09-25 8:13 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200925081352.B046F381DCE9@sourceware.org \ --to=marxin@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).