[PATCH] graph: Show position in basic block nodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Change the label for basic block nodes from the basic block address to the
position (file, line, column) of the basic block.

Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxx>
---
 graph.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/graph.c b/graph.c
index db940ae..f9eb33d 100644
--- a/graph.c
+++ b/graph.c
@@ -27,7 +27,8 @@ static void graph_ep(struct entrypoint *
 	printf("ep%p [label=\"%s\",shape=ellipse];\n",
 	       ep, show_ident(ep->name->ident));
 	FOR_EACH_PTR(ep->bbs, bb) {
-		printf("bb%p [shape=record,label=\"bb at %p\"]\n", bb, bb);
+		printf("bb%p [shape=record,label=\"%s:%d:%d\"]\n", bb, bb,
+		       stream_name(bb->pos.stream), bb->pos.line, bb->pos.pos);
 	} END_FOR_EACH_PTR(bb);
 	FOR_EACH_PTR(ep->bbs, bb) {
 		struct basic_block *child;
-- 
1.4.1.1



-- 
VGER BF report: U 0.49994
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux