VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/util/debug_opcodes.py@ 15707

Last change on this file since 15707 was 15532, checked in by vboxsync, 16 years ago

crOpenGL: export to OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 813 bytes
Line 
1# Copyright (c) 2001, Stanford University
2# All rights reserved.
3#
4# See the file LICENSE.txt for information on redistributing this software.
5
6import sys;
7import cPickle;
8import string;
9import re;
10
11import apiutil
12
13apiutil.CopyrightC()
14
15print """
16#include "cr_debugopcodes.h"
17#include <stdio.h>
18"""
19
20print """void crDebugOpcodes( FILE *fp, unsigned char *ptr, unsigned int num_opcodes )
21{
22\tunsigned int i;
23\tfor (i = 0 ; i < num_opcodes ; i++)
24\t{
25\t\tswitch(*(ptr--))
26\t\t{
27"""
28
29keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
30keys.sort()
31
32for func_name in keys:
33 if "pack" in apiutil.ChromiumProps(func_name):
34 print '\t\tcase %s:' % apiutil.OpcodeName( func_name )
35 print '\t\t\tfprintf( fp, "%s\\n" ); ' % apiutil.OpcodeName( func_name )
36 print '\t\t\tbreak;'
37
38print """
39\t\t}
40\t}
41}
42"""
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette