VirtualBox

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

最後變更 在這個檔案從63939是 63939,由 vboxsync 提交於 8 年 前

Build/scripts (bugref:6627): Python build scripts updated to generate the same code when used with Python 2 and 3.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 842 位元組
 
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""")
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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