[PATCH] [loader] Tag sdksyms.c entries with source file and line number

Aaron Plattner aplattner at nvidia.com
Mon Aug 23 11:37:46 PDT 2010


---
This isn't 100% accurate... sometimes it's off by a line or two, but it's
still helpful.  I attached a generated sdksyms.c so you can see what it
looks like.

 hw/xfree86/loader/sdksyms.sh |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh
index 13c5ae5..700879c 100755
--- a/hw/xfree86/loader/sdksyms.sh
+++ b/hw/xfree86/loader/sdksyms.sh
@@ -345,11 +345,14 @@ BEGIN {
     if (sdk && $3 ~ /\.h"$/) {
 	# remove quotes
 	gsub(/"/, "", $3);
+	line = $2;
+	header = $3;
 	if (! headers[$3]) {
 	    printf(" \\\n  %s", $3) >> "sdksyms.dep";
 	    headers[$3] = 1;
 	}
     }
+    next;
 }
 
 /^extern[ 	]/  {
@@ -398,10 +401,14 @@ BEGIN {
 	sub(/[^a-zA-Z0-9_].*/, "", symbol);
 
 	#print;
-	printf("    (void *) &%s,\n", symbol);
+	printf("    (void *) &%-50s /* %s:%s */\n", symbol ",", header, line);
     }
 }
 
+{
+    line++;
+}
+
 END {
     print("};");
 
-- 
1.7.0.4

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdksyms.c.gz
Type: application/octet-stream
Size: 25485 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100823/6fe5ba13/attachment-0001.obj>


More information about the xorg-devel mailing list