VirtualBox

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

Last change on this file since 71930 was 69392, checked in by vboxsync, 7 years ago

GuestHost/OpenGL: scm updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 838 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
6from __future__ import print_function
7import sys;
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