- Timestamp:
- Jan 20, 2015 1:08:17 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r53728 r53865 4469 4469 TEMPLATE_VBOXMAINEXE_RCDEFS = $(TEMPLATE_VBOXR3EXE_RCDEFS) 4470 4470 TEMPLATE_VBOXMAINEXE_LIBS.kprofile = $(LIB_KPROFILE) 4471 TEMPLATE_VBOXMAINEXE_USES = dtrace 4472 if defined(VBOX_WITH_DTRACE_R3_MAIN) && defined(VBOX_WITH_NATIVE_DTRACE) 4473 TEMPLATE_VBOXMAINEXE_DTRACETOOL = DTraceAndVBoxTpG 4474 TEMPLATE_VBOXMAINEXE_DTRACE_OBJ_FLAGS = -C 4475 TEMPLATE_VBOXMAINEXE_DTRACE_HDR_FLAGS = -C 4476 TEMPLATE_VBOXMAINEXE_DEFS += VBOX_WITH_DTRACE VBOX_WITH_DTRACE_R3 VBOX_WITH_DTRACE_R3_MAIN VBOX_WITH_NATIVE_DTRACE 4477 else 4478 TEMPLATE_VBOXMAINEXE_DTRACE_HDR_FLAGS = --ring-3-context 4479 TEMPLATE_VBOXMAINEXE_DTRACE_OBJ_FLAGS = --ring-3-context --pic --probe-fn-imported --probe-fn-name "SUPTracerFireProbe" 4480 if defined(VBOX_WITH_DTRACE_R3_MAIN) 4481 TEMPLATE_VBOXMAINEXE_DTRACETOOL = VBoxTpG 4482 TEMPLATE_VBOXMAINEXE_DEFS += VBOX_WITH_DTRACE VBOX_WITH_DTRACE_R3 VBOX_WITH_DTRACE_R3_MAIN 4483 else 4484 TEMPLATE_VBOXMAINEXE_DTRACETOOL = VBoxTpG-Disabled 4485 endif 4486 endif 4471 4487 4472 4488 ifeq ($(KBUILD_TARGET),win) … … 4499 4515 TEMPLATE_VBOXMAINEXE_LDFLAGS += -IntegrityCheck 4500 4516 endif 4517 ifdef VBOX_WITH_DTRACE_R3_MAIN 4518 TEMPLATE_VBOXMAINEXE_LDFLAGS += -Merge:VTGPrLc.Data=VTGPrLc.Begin -Merge:VTGPrLc.End=VTGPrLc.Begin -Merge:VTGPrLc.Begin=VTGObj 4519 endif 4501 4520 TEMPLATE_VBOXMAINEXE_LIBS = \ 4502 4521 $(LIB_RUNTIME) … … 4520 4539 -fshort-wchar -fpermissive -fexceptions -frtti $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing \ 4521 4540 $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_std) 4541 ifdef VBOX_WITH_DTRACE_R3_MAIN 4542 TEMPLATE_VBOXMAINEXE_CXXFLAGS := $(filter-out -pedantic,$(TEMPLATE_VBOXMAINEXE_CXXFLAGS)) -fdollars-in-identifiers # annoying gcc option precedence. 4543 endif 4522 4544 TEMPLATE_VBOXMAINEXE_CXXFLAGS.x86 = -m32 4523 4545 TEMPLATE_VBOXMAINEXE_CXXFLAGS.amd64 = -m64 -
trunk/src/VBox/Main/Makefile.kmk
r53844 r53865 185 185 LIBRARIES += VBoxAPIWrap 186 186 VBoxAPIWrap_TEMPLATE = VBoxMainLib 187 VBoxAPIWrap_SOURCES = $(filter %.cpp,$(VBOX_MAIN_APIWRAPPER_GEN_FILES)) 187 VBoxAPIWrap_SOURCES = \ 188 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \ 189 $(filter %.cpp,$(VBOX_MAIN_APIWRAPPER_GEN_FILES)) 188 190 VBoxAPIWrap_DEFS.win.x86 += _WIN32_WINNT=0x0500 189 191 VBoxAPIWrap_DEFS.win.amd64 += _WIN32_WINNT=0x0510 … … 193 195 $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.cpp) \ 194 196 $(wildcard $(VBoxAPIWrap_0_OUTDIR)/*.h) \ 197 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \ 198 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d \ 195 199 $(VBoxAPIWrap_VBOX_RAWSRC) 196 200 … … 201 205 $(VBOX_PATH_MAIN_SRC)/idl/apiwrap-server.xsl 202 206 207 203 208 # This include file (generated at the bottom of this file), defines 204 209 # VBOX_MAIN_APIWRAPPER_GEN_FILES and VBOX_MAIN_APIWRAPPER_GEN_HDRS. … … 210 215 VBoxAPIWrap-x86_TEMPLATE = VBoxMainLib-x86 211 216 VBoxAPIWrap-x86_EXTENDS = VBoxAPIWrap 217 VBoxAPIWrap-x86_DTRACE_HDR_FLAGS = -32 # ugly, should be fixed in the tool in Config.kmk 212 218 endif 213 219 … … 1150 1156 +| $(VBOX_MAIN_APIWRAPPER_GEN_FILES): \ 1151 1157 $(VBOX_XIDL_FILE) \ 1158 $(VBOX_PATH_MAIN_SRC)/idl/typemap-shared.inc.xsl \ 1152 1159 $(VBoxAPIWrap_VBOX_XSLT) \ 1153 1160 $(VBOX_FILESPLIT) \ … … 1168 1175 $(QUIET)$(CP) --changed -fv $@ $(VBoxAPIWrap_VBOX_KMK_FILE) 1169 1176 1177 $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \ 1178 +| $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d: \ 1179 $(VBOX_MAIN_APIWRAPPER_GEN_FILES) \ 1180 $(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-start.d \ 1181 $(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-end.d 1182 $(call MSG_L1,Collecting automatically generated dtrace probes) 1183 $(RM) -f -- $@ 1184 $(CP) -f -- $(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-start.d $@ 1185 $(SED) -ne 's/^ *\/\* dtrace \(probe .*;\) \*\// \1/p' --append $@ \ 1186 -- $(filter %.cpp, $(VBOX_MAIN_APIWRAPPER_GEN_FILES)) 1187 $(SED) -e "" --append $@ $(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-end.d 1188 $(QUIET)$(CP) --changed -fv -- $@ $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d 1189 1190 1191 1170 1192 updatenls:: 1171 1193 $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_VBOX_HEADERS) -ts $(VBoxSVC_VBOX_TRANSLATIONS) -
trunk/src/VBox/Main/idl/VirtualBox.dtd
r47649 r53865 72 72 <!-- waitable is only relevant for event interfaces, and 73 73 specifies that this event can be waited for. --> 74 <!-- dtrace has a probe name length limit, so dtracename helps dealing with excessivly long names. --> 75 <!ATTLIST interface dtrace CDATA #IMPLIED> 74 76 <!ELEMENT class (interface)> <!-- done --> 75 77 <!ATTLIST class name CDATA #REQUIRED> … … 85 87 <!ATTLIST attribute safearray (yes|no) "no"> 86 88 <!ATTLIST attribute wsmap (managed|suppress) "managed"> 89 <!-- dtrace has a probe name length limit, so dtracename helps dealing with excessivly long names. --> 90 <!ATTLIST attribute dtrace CDATA #IMPLIED> 87 91 <!ELEMENT method (desc?,param*,result*)> <!-- done --> 88 92 <!ATTLIST method name CDATA #REQUIRED> … … 90 94 <!ATTLIST method internal (yes|no) "no"> 91 95 <!ATTLIST method wsmap (managed|suppress) "managed"> 96 <!-- dtrace has a probe name length limit, so dtracename helps dealing with excessivly long names. --> 97 <!ATTLIST attribute dtrace CDATA #IMPLIED> 92 98 <!ELEMENT param (desc?)> <!-- done --> 93 99 <!ATTLIST param name CDATA #REQUIRED> -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r53851 r53865 1507 1507 </desc> 1508 1508 </attribute> 1509 <attribute name="advertiseDefaultIPv6RouteEnabled" type="boolean" />1509 <attribute name="advertiseDefaultIPv6RouteEnabled" type="boolean" dtracename="advertiseDefaultIPv6Route"/> 1510 1510 <attribute name="needDhcpServer" type="boolean"/> 1511 1511 <attribute name="eventSource" type="IEventSource" readonly="yes"/> … … 9491 9491 </method> 9492 9492 9493 <method name="getDefaultIoCacheSettingForStorageController" >9493 <method name="getDefaultIoCacheSettingForStorageController" dtracename="getDefaultStorageCtrlCacheSetting"> 9494 9494 <desc>Returns the default I/O cache setting for the 9495 9495 given storage controller</desc> … … 22376 22376 <attribute name="network" type="wstring" readonly="yes"/> 22377 22377 <attribute name="gateway" type="wstring" readonly="yes"/> 22378 <attribute name="advertiseDefaultIPv6RouteEnabled" type="boolean" readonly="yes" />22378 <attribute name="advertiseDefaultIPv6RouteEnabled" type="boolean" readonly="yes" dtracename="advertiseDefIPv6Route"/> 22379 22379 <attribute name="needDhcpServer" type="boolean" readonly="yes"/> 22380 22380 </interface> … … 22396 22396 uuid="f9b9e1cf-cb63-47a1-84fb-02c4894b89a9" 22397 22397 wsmap="managed" autogen="VBoxEvent" id="OnHostNameResolutionConfigurationChange" 22398 dtracename="HostNameResCfgChangeEvent" 22398 22399 > 22399 22400 <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/> -
trunk/src/VBox/Main/idl/apiwrap-server.xsl
r52248 r53865 190 190 <xsl:value-of select="concat('#include "', substring(@name, 2), 'Wrap.h" ')"/> 191 191 <xsl:text>#include "Logging.h" 192 #ifdef VBOX_WITH_DTRACE_R3_MAIN 193 # include "dtrace/VBoxAPI.h" 194 #endif 192 195 193 196 </xsl:text> … … 444 447 </xsl:template> 445 448 449 <xsl:template name="translatedtracetype"> 450 <xsl:param name="type"/> 451 <xsl:param name="dir"/> 452 <xsl:param name="mod"/> 453 454 <!-- get dtrace probe type from IDL type from table in typemap-shared.inc.xsl --> 455 <xsl:variable name="dtracetypefield" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@dtracename"/> 456 <xsl:choose> 457 <xsl:when test="string-length($dtracetypefield)"> 458 <xsl:value-of select="$dtracetypefield"/> 459 </xsl:when> 460 <xsl:when test="//enum[@name=$type]"> 461 <!-- <xsl:value-of select="concat($type, '_T')"/> - later we can emit enums into dtrace the library --> 462 <xsl:text>int</xsl:text> 463 </xsl:when> 464 <xsl:when test="$type='$unknown'"> 465 <!-- <xsl:text>struct IUnknown *</xsl:text> --> 466 <xsl:text>void *</xsl:text> 467 </xsl:when> 468 <xsl:when test="//interface[@name=$type]"> 469 <!-- 470 <xsl:variable name="thatif" select="//interface[@name=$type]"/> 471 <xsl:variable name="thatifname" select="$thatif/@name"/> 472 <xsl:value-of select="concat('struct ', $thatifname, ' *')"/> 473 --> 474 <xsl:text>void *</xsl:text> 475 </xsl:when> 476 <xsl:otherwise> 477 <xsl:call-template name="fatalError"> 478 <xsl:with-param name="msg" select="concat('translatedtracetype Type "', $type, '" is not supported.')"/> 479 </xsl:call-template> 480 </xsl:otherwise> 481 </xsl:choose> 482 <xsl:if test="$mod='ptr'"> 483 <xsl:text> *</xsl:text> 484 </xsl:if> 485 </xsl:template> 486 487 446 488 <!-- - - - - - - - - - - - - - - - - - - - - - - 447 489 templates for handling entire interfaces and their contents … … 627 669 </xsl:template> 628 670 629 <xsl:template match="attribute/@type | param/@type" mode="paramvalconversion"> 671 <xsl:template match="attribute/@type | param/@type" mode="dtraceparamval"> 672 <xsl:param name="dir"/> 673 674 <xsl:variable name="viatmpvar"> 675 <xsl:call-template name="paramconversionviatmp"> 676 <xsl:with-param name="dir" select="$dir"/> 677 </xsl:call-template> 678 </xsl:variable> 679 680 <xsl:variable name="type" select="."/> 681 <xsl:choose> 682 <xsl:when test="$viatmpvar = 'yes'"> 683 <xsl:variable name="tmpname"> 684 <xsl:text>Tmp</xsl:text> 685 <xsl:call-template name="capitalize"> 686 <xsl:with-param name="str" select="../@name"/> 687 </xsl:call-template> 688 </xsl:variable> 689 690 <xsl:choose> 691 <xsl:when test="../@safearray = 'yes'"> 692 <xsl:text>(uint32_t)</xsl:text> 693 <xsl:value-of select="$tmpname"/> 694 <xsl:text>.array().size(), </xsl:text> 695 <!-- Later: 696 <xsl:value-of select="concat($tmpname, '.array().data(), ')"/> 697 --> 698 <xsl:text>NULL /*for now*/</xsl:text> 699 </xsl:when> 700 <xsl:when test="$type = 'wstring'"> 701 <xsl:value-of select="$tmpname"/> 702 <xsl:text>.str().c_str()</xsl:text> 703 </xsl:when> 704 <xsl:when test="$type = 'uuid'"> 705 <xsl:value-of select="$tmpname"/> 706 <xsl:text>.uuid().toStringCurly().c_str()</xsl:text> 707 </xsl:when> 708 <xsl:when test="$type = '$unknown'"> 709 <xsl:text>(void *)</xsl:text> 710 <xsl:value-of select="$tmpname"/> 711 <xsl:text>.ptr()</xsl:text> 712 </xsl:when> 713 <xsl:otherwise> 714 <xsl:variable name="thatif" select="//interface[@name=$type]"/> 715 <xsl:choose> 716 <xsl:when test="$thatif"> 717 <xsl:text>(void *)</xsl:text> 718 <xsl:value-of select="$tmpname"/> 719 <xsl:text>.ptr()</xsl:text> 720 </xsl:when> 721 <xsl:otherwise> 722 <xsl:value-of select="$tmpname"/> 723 </xsl:otherwise> 724 </xsl:choose> 725 </xsl:otherwise> 726 </xsl:choose> 727 </xsl:when> 728 729 <xsl:otherwise> 730 <xsl:if test="$dir != 'in'"> 731 <xsl:text>*</xsl:text> 732 </xsl:if> 733 <xsl:text>a</xsl:text> 734 <xsl:call-template name="capitalize"> 735 <xsl:with-param name="str" select="../@name"/> 736 </xsl:call-template> 737 738 <xsl:if test="$type = 'boolean'"> 739 <xsl:text> != FALSE</xsl:text> 740 </xsl:if> 741 </xsl:otherwise> 742 </xsl:choose> 743 </xsl:template> 744 745 <!-- Same as dtraceparamval except no temporary variables are used (they are out of scope). --> 746 <xsl:template match="attribute/@type | param/@type" mode="dtraceparamvalnotmp"> 747 <xsl:param name="dir"/> 748 749 <xsl:variable name="viatmpvar"> 750 <xsl:call-template name="paramconversionviatmp"> 751 <xsl:with-param name="dir" select="$dir"/> 752 </xsl:call-template> 753 </xsl:variable> 754 755 <xsl:variable name="type" select="."/> 756 <xsl:choose> 757 <xsl:when test="$viatmpvar = 'yes'"> 758 <xsl:if test="../@safearray = 'yes'"> 759 <xsl:text>0, </xsl:text> 760 </xsl:if> 761 <xsl:text>0</xsl:text> 762 </xsl:when> 763 764 <xsl:otherwise> 765 <xsl:if test="$dir != 'in'"> 766 <xsl:text>*</xsl:text> 767 </xsl:if> 768 <xsl:text>a</xsl:text> 769 <xsl:call-template name="capitalize"> 770 <xsl:with-param name="str" select="../@name"/> 771 </xsl:call-template> 772 773 <xsl:if test="$type = 'boolean'"> 774 <xsl:text> != FALSE</xsl:text> 775 </xsl:if> 776 </xsl:otherwise> 777 </xsl:choose> 778 </xsl:template> 779 780 <xsl:template match="attribute/@type | param/@type" mode="dtraceparamdecl"> 781 <xsl:param name="dir"/> 782 783 <xsl:variable name="gluetype"> 784 <xsl:call-template name="translatedtracetype"> 785 <xsl:with-param name="type" select="."/> 786 <xsl:with-param name="dir" select="$dir"/> 787 <xsl:with-param name="mod" select="../@mod"/> 788 </xsl:call-template> 789 </xsl:variable> 790 791 <!-- Safe arrays get an extra size parameter. --> 792 <xsl:if test="../@safearray='yes'"> 793 <xsl:text>uint32_t a_c</xsl:text> 794 <xsl:call-template name="capitalize"> 795 <xsl:with-param name="str" select="../@name"/> 796 </xsl:call-template> 797 <xsl:text>, </xsl:text> 798 </xsl:if> 799 800 <xsl:value-of select="$gluetype"/> 801 <xsl:choose> 802 <xsl:when test="../@safearray='yes'"> 803 <xsl:text> *a_pa</xsl:text> 804 </xsl:when> 805 <xsl:otherwise> 806 <xsl:if test="substring($gluetype,string-length($gluetype))!='*'"> 807 <xsl:text> </xsl:text> 808 </xsl:if> 809 <xsl:text>a_</xsl:text> 810 </xsl:otherwise> 811 </xsl:choose> 812 813 <xsl:call-template name="capitalize"> 814 <xsl:with-param name="str" select="../@name"/> 815 </xsl:call-template> 816 </xsl:template> 817 818 <!-- Call this to determine whether a temporary conversion variable is used for the current parameter. 819 Returns empty if not needed, non-empty ('yes') if needed. --> 820 <xsl:template name="paramconversionviatmp"> 821 <xsl:param name="dir"/> 822 <xsl:variable name="type" select="."/> 823 <xsl:variable name="thatif" select="//interface[@name=$type]"/> 824 <xsl:if test="$thatif or $type = 'wstring' or $type = '$unknown' or $type = 'uuid' or ../@safearray = 'yes'"> 825 <xsl:text>yes</xsl:text> 826 </xsl:if> 827 </xsl:template> 828 829 <!-- Call this to get the argument conversion class, if any is needed. --> 830 <xsl:template name="paramconversionclass"> 630 831 <xsl:param name="dir"/> 631 832 … … 639 840 <xsl:variable name="type" select="."/> 640 841 <xsl:variable name="thatif" select="//interface[@name=$type]"/> 842 641 843 <xsl:choose> 642 844 <xsl:when test="$type='$unknown'"> … … 646 848 <xsl:choose> 647 849 <xsl:when test="$dir='in'"> 648 <xsl:text>ComTypeInConverter<IUnknown> (</xsl:text>850 <xsl:text>ComTypeInConverter<IUnknown></xsl:text> 649 851 </xsl:when> 650 852 <xsl:otherwise> 651 <xsl:text>ComTypeOutConverter<IUnknown> (</xsl:text>853 <xsl:text>ComTypeOutConverter<IUnknown></xsl:text> 652 854 </xsl:otherwise> 653 855 </xsl:choose> 654 <xsl:if test="../@safearray='yes'"> 655 <xsl:choose> 656 <xsl:when test="$dir='in'"> 657 <xsl:text>ComSafeArrayInArg(</xsl:text> 658 </xsl:when> 659 <xsl:otherwise> 660 <xsl:text>ComSafeArrayOutArg(</xsl:text> 661 </xsl:otherwise> 662 </xsl:choose> 663 </xsl:if> 664 </xsl:when> 856 </xsl:when> 857 665 858 <xsl:when test="$thatif"> 666 859 <xsl:if test="../@safearray='yes'"> 667 860 <xsl:text>Array</xsl:text> 668 861 </xsl:if> 669 <xsl:variable name="thatifname" select="$thatif/@name"/>670 862 <xsl:choose> 671 863 <xsl:when test="$dir='in'"> … … 676 868 </xsl:otherwise> 677 869 </xsl:choose> 678 <xsl:value-of select="concat('<', $thatifname, '>(')"/> 679 <xsl:if test="../@safearray='yes'"> 680 <xsl:choose> 681 <xsl:when test="$dir='in'"> 682 <xsl:text>ComSafeArrayInArg(</xsl:text> 683 </xsl:when> 684 <xsl:otherwise> 685 <xsl:text>ComSafeArrayOutArg(</xsl:text> 686 </xsl:otherwise> 687 </xsl:choose> 688 </xsl:if> 689 </xsl:when> 870 <xsl:variable name="thatifname" select="$thatif/@name"/> 871 <xsl:value-of select="concat('<', $thatifname, '>')"/> 872 </xsl:when> 873 690 874 <xsl:when test="$type='wstring'"> 691 875 <xsl:if test="../@safearray='yes'"> … … 694 878 <xsl:choose> 695 879 <xsl:when test="$dir='in'"> 696 <xsl:text>BSTRInConverter (</xsl:text>880 <xsl:text>BSTRInConverter</xsl:text> 697 881 </xsl:when> 698 882 <xsl:otherwise> 699 <xsl:text>BSTROutConverter (</xsl:text>883 <xsl:text>BSTROutConverter</xsl:text> 700 884 </xsl:otherwise> 701 885 </xsl:choose> 702 <xsl:if test="../@safearray='yes'"> 703 <xsl:choose> 704 <xsl:when test="$dir='in'"> 705 <xsl:text>ComSafeArrayInArg(</xsl:text> 706 </xsl:when> 707 <xsl:otherwise> 708 <xsl:text>ComSafeArrayOutArg(</xsl:text> 709 </xsl:otherwise> 710 </xsl:choose> 711 </xsl:if> 712 </xsl:when> 886 </xsl:when> 887 713 888 <xsl:when test="$type='uuid'"> 714 889 <xsl:if test="../@safearray='yes'"> … … 717 892 <xsl:choose> 718 893 <xsl:when test="$dir='in'"> 719 <xsl:text>UuidInConverter (</xsl:text>894 <xsl:text>UuidInConverter</xsl:text> 720 895 </xsl:when> 721 896 <xsl:otherwise> 722 <xsl:text>UuidOutConverter (</xsl:text>897 <xsl:text>UuidOutConverter</xsl:text> 723 898 </xsl:otherwise> 724 899 </xsl:choose> 725 <xsl:if test="../@safearray='yes'"> 726 <xsl:choose> 727 <xsl:when test="$dir='in'"> 728 <xsl:text>ComSafeArrayInArg(</xsl:text> 729 </xsl:when> 730 <xsl:otherwise> 731 <xsl:text>ComSafeArrayOutArg(</xsl:text> 732 </xsl:otherwise> 733 </xsl:choose> 734 </xsl:if> 735 </xsl:when> 900 </xsl:when> 901 902 <xsl:when test="../@safearray='yes'"> 903 <xsl:text>Array</xsl:text> 904 <xsl:choose> 905 <xsl:when test="$dir='in'"> 906 <xsl:text>InConverter</xsl:text> 907 </xsl:when> 908 <xsl:otherwise> 909 <xsl:text>OutConverter</xsl:text> 910 </xsl:otherwise> 911 </xsl:choose> 912 <xsl:value-of select="concat('<', $gluetype, '>')"/> 913 </xsl:when> 914 </xsl:choose> 915 </xsl:template> 916 917 <!-- Emits code for converting the parameter to a temporary variable. --> 918 <xsl:template match="attribute/@type | param/@type" mode="paramvalconversion2tmpvar"> 919 <xsl:param name="dir"/> 920 921 <xsl:variable name="conversionclass"> 922 <xsl:call-template name="paramconversionclass"> 923 <xsl:with-param name="dir" select="$dir"/> 924 </xsl:call-template> 925 </xsl:variable> 926 927 <xsl:if test="$conversionclass != ''"> 928 <xsl:value-of select="$conversionclass"/> 929 <xsl:text> Tmp</xsl:text> 930 <xsl:call-template name="capitalize"> 931 <xsl:with-param name="str" select="../@name"/> 932 </xsl:call-template> 933 <xsl:text>(</xsl:text> 934 <xsl:if test="../@safearray = 'yes'"> 935 <xsl:choose> 936 <xsl:when test="$dir = 'in'"> 937 <xsl:text>ComSafeArrayInArg(</xsl:text> 938 </xsl:when> 939 <xsl:otherwise> 940 <xsl:text>ComSafeArrayOutArg(</xsl:text> 941 </xsl:otherwise> 942 </xsl:choose> 943 </xsl:if> 944 <xsl:text>a</xsl:text> 945 <xsl:call-template name="capitalize"> 946 <xsl:with-param name="str" select="../@name"/> 947 </xsl:call-template> 948 <xsl:if test="../@safearray = 'yes'"> 949 <xsl:text>)</xsl:text> 950 </xsl:if> 951 <xsl:text>);</xsl:text> 952 </xsl:if> 953 954 </xsl:template> 955 956 <!-- Partner to paramvalconversion2tmpvar that emits the parameter when calling call the internal worker method. --> 957 <xsl:template match="attribute/@type | param/@type" mode="paramvalconversionusingtmp"> 958 <xsl:param name="dir"/> 959 960 <xsl:variable name="viatmpvar"> 961 <xsl:call-template name="paramconversionviatmp"> 962 <xsl:with-param name="dir" select="$dir"/> 963 </xsl:call-template> 964 </xsl:variable> 965 <xsl:variable name="type" select="."/> 966 967 <xsl:choose> 968 <xsl:when test="$viatmpvar = 'yes'"> 969 <xsl:text>Tmp</xsl:text> 970 <xsl:call-template name="capitalize"> 971 <xsl:with-param name="str" select="../@name"/> 972 </xsl:call-template> 973 974 <xsl:choose> 975 <xsl:when test="../@safearray='yes'"> 976 <xsl:text>.array()</xsl:text> 977 </xsl:when> 978 <xsl:when test="$type = 'wstring'"> 979 <xsl:text>.str()</xsl:text> 980 </xsl:when> 981 <xsl:when test="$type = 'uuid'"> 982 <xsl:text>.uuid()</xsl:text> 983 </xsl:when> 984 <xsl:when test="$type = '$unknown'"> 985 <xsl:text>.ptr()</xsl:text> 986 </xsl:when> 987 <xsl:otherwise> 988 <xsl:variable name="thatif" select="//interface[@name=$type]"/> 989 <xsl:if test="$thatif"> 990 <xsl:text>.ptr()</xsl:text> 991 </xsl:if> 992 </xsl:otherwise> 993 </xsl:choose> 994 </xsl:when> 995 736 996 <xsl:otherwise> 737 <xsl:if test="../@safearray='yes'"> 738 <xsl:text>Array</xsl:text> 739 <xsl:choose> 740 <xsl:when test="$dir='in'"> 741 <xsl:text>InConverter</xsl:text> 742 </xsl:when> 743 <xsl:otherwise> 744 <xsl:text>OutConverter</xsl:text> 745 </xsl:otherwise> 746 </xsl:choose> 747 <xsl:value-of select="concat('<', $gluetype, '>(')"/> 748 <xsl:choose> 749 <xsl:when test="$dir='in'"> 750 <xsl:text>ComSafeArrayInArg(</xsl:text> 751 </xsl:when> 752 <xsl:otherwise> 753 <xsl:text>ComSafeArrayOutArg(</xsl:text> 754 </xsl:otherwise> 755 </xsl:choose> 997 <xsl:text>a</xsl:text> 998 <xsl:call-template name="capitalize"> 999 <xsl:with-param name="str" select="../@name"/> 1000 </xsl:call-template> 1001 1002 <!-- Make sure BOOL values we pass down are either TRUE or FALSE. --> 1003 <xsl:if test="$type = 'boolean' and $dir = 'in'"> 1004 <xsl:text> != FALSE</xsl:text> 756 1005 </xsl:if> 757 1006 </xsl:otherwise> 758 1007 </xsl:choose> 759 <xsl:text>a</xsl:text> 760 <xsl:call-template name="capitalize"> 761 <xsl:with-param name="str" select="../@name"/> 762 </xsl:call-template> 763 <xsl:choose> 764 <xsl:when test="$type='$unknown' or $thatif"> 765 <xsl:choose> 766 <xsl:when test="../@safearray='yes'"> 767 <xsl:text>)).array()</xsl:text> 768 </xsl:when> 769 <xsl:otherwise> 770 <xsl:text>).ptr()</xsl:text> 771 </xsl:otherwise> 772 </xsl:choose> 773 </xsl:when> 774 <xsl:when test="$type='wstring'"> 775 <xsl:choose> 776 <xsl:when test="../@safearray='yes'"> 777 <xsl:text>)).array()</xsl:text> 778 </xsl:when> 779 <xsl:otherwise> 780 <xsl:text>).str()</xsl:text> 781 </xsl:otherwise> 782 </xsl:choose> 783 </xsl:when> 784 <xsl:when test="$type='uuid'"> 785 <xsl:choose> 786 <xsl:when test="../@safearray='yes'"> 787 <xsl:text>)).array()</xsl:text> 788 </xsl:when> 789 <xsl:otherwise> 790 <xsl:text>).uuid()</xsl:text> 791 </xsl:otherwise> 792 </xsl:choose> 793 </xsl:when> 794 <xsl:otherwise> 795 <xsl:if test="../@safearray='yes'"> 796 <xsl:text>)).array()</xsl:text> 797 </xsl:if> 798 </xsl:otherwise> 799 </xsl:choose> 1008 800 1009 </xsl:template> 801 1010 … … 886 1095 <xsl:template match="attribute" mode="code"> 887 1096 <xsl:param name="topclass"/> 1097 <xsl:param name="dtracetopclass"/> 888 1098 <xsl:param name="target"/> 889 1099 … … 902 1112 <xsl:with-param name="option" select="'limitedcaller'"/> 903 1113 </xsl:call-template> 1114 </xsl:variable> 1115 1116 <xsl:variable name="dtraceattrname"> 1117 <xsl:choose> 1118 <xsl:when test="@dtracename"> 1119 <xsl:value-of select="@dtracename"/> 1120 </xsl:when> 1121 <xsl:otherwise> 1122 <xsl:value-of select="$attrbasename"/> 1123 </xsl:otherwise> 1124 </xsl:choose> 904 1125 </xsl:variable> 905 1126 … … 932 1153 <xsl:value-of select="$attrbasename"/> 933 1154 <xsl:text>); 1155 </xsl:text> 1156 <xsl:apply-templates select="@type" mode="paramvalconversion2tmpvar"> 1157 <xsl:with-param name="dir" select="'out'"/> 1158 </xsl:apply-templates> 1159 <xsl:if test="$attrbasename != 'MidlDoesNotLikEmptyInterfaces'"> 1160 <xsl:text> 1161 #ifdef VBOX_WITH_DTRACE_R3_MAIN 1162 /* dtrace probe </xsl:text> 1163 <!-- <xsl:value-of select="concat($dtracetopclass, '__get__', $dtraceattrname, '__enter(struct ', $topclass)"/> --> 1164 <xsl:value-of select="concat($dtracetopclass, '__get__', $dtraceattrname, '__enter(void')"/> 1165 <xsl:text> *a_pThis); */ 1166 </xsl:text> 1167 <xsl:value-of select="translate(concat('VBOXAPI_', $dtracetopclass, '_GET_', $dtraceattrname, '_ENTER('), $G_lowerCase, $G_upperCase)"/> 1168 <xsl:text>this); 1169 #endif</xsl:text> 1170 </xsl:if> 1171 <xsl:text> 934 1172 935 1173 </xsl:text> … … 957 1195 <xsl:text>autoCaller, </xsl:text> 958 1196 </xsl:if> 959 <xsl:apply-templates select="@type" mode="paramvalconversion ">1197 <xsl:apply-templates select="@type" mode="paramvalconversionusingtmp"> 960 1198 <xsl:with-param name="dir" select="'out'"/> 961 1199 </xsl:apply-templates> 962 1200 <xsl:text>); 1201 </xsl:text> 1202 <xsl:if test="$attrbasename != 'MidlDoesNotLikEmptyInterfaces'"> 1203 <xsl:text> 1204 #ifdef VBOX_WITH_DTRACE_R3_MAIN 1205 /* dtrace probe </xsl:text> 1206 <!-- <xsl:value-of select="concat($dtracetopclass, '__get__', $dtraceattrname, '__return(struct ', $topclass, ' *a_pThis')"/> --> 1207 <xsl:value-of select="concat($dtracetopclass, '__get__', $dtraceattrname, '__return(void *a_pThis')"/> 1208 <xsl:text>, uint32_t a_hrc, int32_t enmWhy, </xsl:text> 1209 <xsl:apply-templates select="@type" mode="dtraceparamdecl"> 1210 <xsl:with-param name="dir">out</xsl:with-param> 1211 </xsl:apply-templates> 1212 <xsl:text>); */ 1213 </xsl:text> 1214 <xsl:value-of select="translate(concat('VBOXAPI_', $dtracetopclass, '_GET_', $dtraceattrname, '_RETURN('), $G_lowerCase, $G_upperCase)"/> 1215 <xsl:text>this, hrc, 0 /*normal*/,</xsl:text> 1216 <xsl:apply-templates select="@type" mode="dtraceparamval"> 1217 <xsl:with-param name="dir">out</xsl:with-param> 1218 </xsl:apply-templates> 1219 <xsl:text>); 1220 #endif 1221 </xsl:text> 1222 </xsl:if> 1223 <xsl:text> 963 1224 } 964 1225 catch (HRESULT hrc2) 965 1226 { 966 hrc = hrc2; 1227 hrc = hrc2;</xsl:text> 1228 <xsl:if test="$attrbasename != 'MidlDoesNotLikEmptyInterfaces'"> 1229 <xsl:text> 1230 #ifdef VBOX_WITH_DTRACE_R3_MAIN 1231 </xsl:text> 1232 <xsl:value-of select="translate(concat('VBOXAPI_', $dtracetopclass, '_GET_', $dtraceattrname, '_RETURN('), $G_lowerCase, $G_upperCase)"/> 1233 <xsl:text>this, hrc, 1 /*hrc exception*/,</xsl:text> 1234 <xsl:apply-templates select="@type" mode="dtraceparamvalnotmp"> 1235 <xsl:with-param name="dir">out</xsl:with-param> 1236 </xsl:apply-templates> 1237 <xsl:text>); 1238 #endif 1239 </xsl:text> 1240 </xsl:if> 1241 <xsl:text> 967 1242 } 968 1243 catch (...) 969 1244 { 970 hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS); 1245 hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);</xsl:text> 1246 <xsl:if test="$attrbasename != 'MidlDoesNotLikEmptyInterfaces'"> 1247 <xsl:text> 1248 #ifdef VBOX_WITH_DTRACE_R3_MAIN 1249 </xsl:text> 1250 <xsl:value-of select="translate(concat('VBOXAPI_', $dtracetopclass, '_GET_', $dtraceattrname, '_RETURN('), $G_lowerCase, $G_upperCase)"/> 1251 <xsl:text>this, hrc, 9 /*unhandled exception*/,</xsl:text> 1252 <xsl:apply-templates select="@type" mode="dtraceparamvalnotmp"> 1253 <xsl:with-param name="dir">out</xsl:with-param> 1254 </xsl:apply-templates> 1255 <xsl:text>); 1256 #endif 1257 </xsl:text> 1258 </xsl:if> 1259 <xsl:text> 971 1260 } 972 1261 … … 977 1266 </xsl:apply-templates> 978 1267 <xsl:text> hrc=%Rhrc\n", this, </xsl:text> 979 <xsl:value-of select="concat('"', $topclass, '::get', $ attrbasename, '", ')"/>1268 <xsl:value-of select="concat('"', $topclass, '::get', $dtraceattrname, '", ')"/> 980 1269 <xsl:apply-templates select="@type" mode="logparamval"> 981 1270 <xsl:with-param name="dir" select="'out'"/> … … 1015 1304 try 1016 1305 { 1306 </xsl:text> 1307 <xsl:apply-templates select="@type" mode="paramvalconversion2tmpvar"> 1308 <xsl:with-param name="dir" select="'in'"/> 1309 </xsl:apply-templates> 1310 <xsl:text> 1311 1312 #ifdef VBOX_WITH_DTRACE_R3_MAIN 1313 /* dtrace probe </xsl:text> 1314 <!-- <xsl:value-of select="concat($topclass, '__set__', $dtraceattrname, '__enter(struct ', $topclass, ' *a_pThis, ')"/>--> 1315 <xsl:value-of select="concat($topclass, '__set__', $dtraceattrname, '__enter(void *a_pThis, ')"/> 1316 <xsl:apply-templates select="@type" mode="dtraceparamdecl"> 1317 <xsl:with-param name="dir" select="'in'"/> 1318 </xsl:apply-templates> 1319 <xsl:text>); */ 1320 </xsl:text> 1321 <xsl:value-of select="translate(concat('VBOXAPI_', $topclass, '_SET_', $dtraceattrname, '_ENTER('), $G_lowerCase, $G_upperCase)"/> 1322 <xsl:text>this, </xsl:text> 1323 <xsl:apply-templates select="@type" mode="dtraceparamval"> 1324 <xsl:with-param name="dir">in</xsl:with-param> 1325 </xsl:apply-templates> 1326 <xsl:text>); 1327 #endif 1328 1017 1329 </xsl:text> 1018 1330 <xsl:choose> … … 1033 1345 <xsl:text>autoCaller, </xsl:text> 1034 1346 </xsl:if> 1035 <xsl:apply-templates select="@type" mode="paramvalconversion ">1347 <xsl:apply-templates select="@type" mode="paramvalconversionusingtmp"> 1036 1348 <xsl:with-param name="dir" select="'in'"/> 1037 1349 </xsl:apply-templates> 1038 1350 <xsl:text>); 1351 1352 #ifdef VBOX_WITH_DTRACE_R3_MAIN 1353 /* dtrace probe </xsl:text> 1354 <!-- <xsl:value-of select="concat($dtracetopclass, '__set__', $dtraceattrname, '__return(struct ', $topclass, ' *a_pThis')"/> --> 1355 <xsl:value-of select="concat($dtracetopclass, '__set__', $dtraceattrname, '__return(void *a_pThis')"/> 1356 <xsl:text>, uint32_t a_hrc, int32_t enmWhy, </xsl:text> 1357 <xsl:apply-templates select="@type" mode="dtraceparamdecl"> 1358 <xsl:with-param name="dir">in</xsl:with-param> 1359 </xsl:apply-templates> 1360 <xsl:text>); */ 1361 </xsl:text> 1362 <xsl:value-of select="translate(concat('VBOXAPI_', $dtracetopclass, '_SET_', $dtraceattrname, '_RETURN('), $G_lowerCase, $G_upperCase)"/> 1363 <xsl:text>this, hrc, 0 /*normal*/,</xsl:text> 1364 <xsl:apply-templates select="@type" mode="dtraceparamval"> 1365 <xsl:with-param name="dir">in</xsl:with-param> 1366 </xsl:apply-templates> 1367 <xsl:text>); 1368 #endif 1039 1369 } 1040 1370 catch (HRESULT hrc2) 1041 1371 { 1042 1372 hrc = hrc2; 1373 #ifdef VBOX_WITH_DTRACE_R3_MAIN 1374 </xsl:text> 1375 <xsl:value-of select="translate(concat('VBOXAPI_', $dtracetopclass, '_SET_', $dtraceattrname, '_RETURN('), $G_lowerCase, $G_upperCase)"/> 1376 <xsl:text>this, hrc, 1 /*hrc exception*/,</xsl:text> 1377 <xsl:apply-templates select="@type" mode="dtraceparamvalnotmp"> 1378 <xsl:with-param name="dir">in</xsl:with-param> 1379 </xsl:apply-templates> 1380 <xsl:text>); 1381 #endif 1043 1382 } 1044 1383 catch (...) 1045 1384 { 1046 1385 hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS); 1386 #ifdef VBOX_WITH_DTRACE_R3_MAIN 1387 </xsl:text> 1388 <xsl:value-of select="translate(concat('VBOXAPI_', $dtracetopclass, '_SET_', $dtraceattrname, '_RETURN('), $G_lowerCase, $G_upperCase)"/> 1389 <xsl:text>this, hrc, 9 /*unhandled exception*/,</xsl:text> 1390 <xsl:apply-templates select="@type" mode="dtraceparamvalnotmp"> 1391 <xsl:with-param name="dir">in</xsl:with-param> 1392 </xsl:apply-templates> 1393 <xsl:text>); 1394 #endif 1047 1395 } 1048 1396 … … 1069 1417 <xsl:param name="iface"/> 1070 1418 <xsl:param name="topclass"/> 1419 <xsl:param name="dtracetopclass"/> 1071 1420 <xsl:param name="pmode"/> 1072 1421 … … 1078 1427 <xsl:with-param name="topclass" select="$topclass"/> 1079 1428 <xsl:with-param name="pmode" select="$pmode"/> 1429 <xsl:with-param name="dtracetopclass" select="$dtracetopclass"/> 1080 1430 </xsl:call-template> 1081 1431 </xsl:if> … … 1109 1459 <xsl:apply-templates select="$iface/attribute | $iface/if" mode="code"> 1110 1460 <xsl:with-param name="topclass" select="$topclass"/> 1461 <xsl:with-param name="dtracetopclass" select="$dtracetopclass"/> 1111 1462 <xsl:with-param name="emitmode" select="'attribute'"/> 1112 1463 </xsl:apply-templates> … … 1241 1592 <xsl:template match="method" mode="code"> 1242 1593 <xsl:param name="topclass"/> 1594 <xsl:param name="dtracetopclass"/> 1243 1595 <xsl:param name="target"/> 1244 1596 … … 1267 1619 <xsl:with-param name="option" select="'limitedcaller'"/> 1268 1620 </xsl:call-template> 1621 </xsl:variable> 1622 <xsl:variable name="dtracemethodname"> 1623 <xsl:choose> 1624 <xsl:when test="@dtracename"> 1625 <xsl:value-of select="@dtracename"/> 1626 </xsl:when> 1627 <xsl:otherwise> 1628 <xsl:value-of select="@name"/> 1629 </xsl:otherwise> 1630 </xsl:choose> 1269 1631 </xsl:variable> 1270 1632 … … 1319 1681 </xsl:if> 1320 1682 </xsl:for-each> 1683 <xsl:text> 1684 </xsl:text> 1685 <xsl:for-each select="param"> 1686 <xsl:text> 1687 </xsl:text> 1688 <xsl:apply-templates select="@type" mode="paramvalconversion2tmpvar"> 1689 <xsl:with-param name="dir" select="@dir"/> 1690 </xsl:apply-templates> 1691 </xsl:for-each> 1321 1692 <xsl:text> 1693 #ifdef VBOX_WITH_DTRACE_R3_MAIN 1694 /* dtrace probe </xsl:text> 1695 <xsl:variable name="dtracenamehack"> <!-- Ugly hack to deal with Session::assignMachine and similar. --> 1696 <xsl:if test="name(..) = 'if'"> 1697 <xsl:value-of select="concat('__', ../@target)"/> 1698 </xsl:if> 1699 </xsl:variable> 1700 <!-- <xsl:value-of select="concat($dtracetopclass, '__', $dtracemethodname, $dtracenamehack, '__enter(struct ', $dtracetopclass, ' *a_pThis')"/> --> 1701 <xsl:value-of select="concat($dtracetopclass, '__', $dtracemethodname, $dtracenamehack, '__enter(void *a_pThis')"/> 1702 <xsl:for-each select="param[@dir='in']"> 1703 <xsl:text>, </xsl:text> 1704 <xsl:apply-templates select="@type" mode="dtraceparamdecl"> 1705 <xsl:with-param name="dir" select="'@dir'"/> 1706 </xsl:apply-templates> 1707 </xsl:for-each> 1708 <xsl:text>); */ 1709 </xsl:text> 1710 <xsl:value-of select="translate(concat('VBOXAPI_', $dtracetopclass, '_', $dtracemethodname, substring($dtracenamehack, 2), '_ENTER('), $G_lowerCase, $G_upperCase)"/> 1711 <xsl:text>this</xsl:text> 1712 <xsl:for-each select="param[@dir='in']"> 1713 <xsl:text>, </xsl:text> 1714 <xsl:apply-templates select="@type" mode="dtraceparamval"> 1715 <xsl:with-param name="dir" select="@dir"/> 1716 </xsl:apply-templates> 1717 </xsl:for-each> 1718 <xsl:text>); 1719 #endif 1720 1322 1721 </xsl:text> 1323 1722 <xsl:choose> … … 1350 1749 </xsl:if> 1351 1750 <xsl:for-each select="param"> 1352 <xsl:apply-templates select="@type" mode="paramvalconversion ">1751 <xsl:apply-templates select="@type" mode="paramvalconversionusingtmp"> 1353 1752 <xsl:with-param name="dir" select="@dir"/> 1354 1753 </xsl:apply-templates> … … 1360 1759 </xsl:for-each> 1361 1760 <xsl:text>); 1761 1762 #ifdef VBOX_WITH_DTRACE_R3_MAIN 1763 /* dtrace probe </xsl:text> 1764 <!-- <xsl:value-of select="concat($dtracetopclass, '__', $dtracemethodname, '__return(struct ', $dtracetopclass, ' *a_pThis')"/> --> 1765 <xsl:value-of select="concat($dtracetopclass, '__', $dtracemethodname, $dtracenamehack, '__return(void *a_pThis')"/> 1766 <xsl:text>, uint32_t a_hrc, int32_t enmWhy</xsl:text> 1767 <xsl:for-each select="param"> 1768 <xsl:text>, </xsl:text> 1769 <xsl:apply-templates select="@type" mode="dtraceparamdecl"> 1770 <xsl:with-param name="dir" select="'@dir'"/> 1771 </xsl:apply-templates> 1772 </xsl:for-each> 1773 <xsl:text>); */ 1774 </xsl:text> 1775 <xsl:value-of select="translate(concat('VBOXAPI_', $dtracetopclass, '_', $dtracemethodname, substring($dtracenamehack, 2), '_RETURN('), $G_lowerCase, $G_upperCase)"/> 1776 <xsl:text>this, hrc, 0 /*normal*/</xsl:text> 1777 <xsl:for-each select="param"> 1778 <xsl:text>, </xsl:text> 1779 <xsl:apply-templates select="@type" mode="dtraceparamval"> 1780 <xsl:with-param name="dir" select="@dir"/> 1781 </xsl:apply-templates> 1782 </xsl:for-each> 1783 <xsl:text>); 1784 #endif 1362 1785 } 1363 1786 catch (HRESULT hrc2) 1364 1787 { 1365 1788 hrc = hrc2; 1789 #ifdef VBOX_WITH_DTRACE_R3_MAIN 1790 </xsl:text> 1791 <xsl:value-of select="translate(concat('VBOXAPI_', $dtracetopclass, '_', $dtracemethodname, substring($dtracenamehack, 2), '_RETURN('), $G_lowerCase, $G_upperCase)"/> 1792 <xsl:text>this, hrc, 1 /*hrc exception*/</xsl:text> 1793 <xsl:for-each select="param"> 1794 <xsl:text>, </xsl:text> 1795 <xsl:apply-templates select="@type" mode="dtraceparamvalnotmp"> 1796 <xsl:with-param name="dir" select="@dir"/> 1797 </xsl:apply-templates> 1798 </xsl:for-each> 1799 <xsl:text>); 1800 #endif 1366 1801 } 1367 1802 catch (...) 1368 1803 { 1369 1804 hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS); 1805 #ifdef VBOX_WITH_DTRACE_R3_MAIN 1806 </xsl:text> 1807 <xsl:value-of select="translate(concat('VBOXAPI_', $dtracetopclass, '_', $dtracemethodname, substring($dtracenamehack, 2), '_RETURN('), $G_lowerCase, $G_upperCase)"/> 1808 <xsl:text>this, hrc, 9 /*unhandled exception*/</xsl:text> 1809 <xsl:for-each select="param"> 1810 <xsl:text>, </xsl:text> 1811 <xsl:apply-templates select="@type" mode="dtraceparamvalnotmp"> 1812 <xsl:with-param name="dir" select="@dir"/> 1813 </xsl:apply-templates> 1814 </xsl:for-each> 1815 <xsl:text>); 1816 #endif 1370 1817 } 1371 1818 … … 1409 1856 <xsl:param name="topclass"/> 1410 1857 <xsl:param name="emitmode"/> 1858 <xsl:param name="dtracetopclass"/> 1411 1859 1412 1860 <xsl:if test="($target = 'xpidl') or ($target = 'midl')"> … … 1450 1898 <xsl:with-param name="target" select="$target"/> 1451 1899 <xsl:with-param name="topclass" select="$topclass"/> 1900 <xsl:with-param name="dtracetopclass" select="$dtracetopclass"/> 1452 1901 </xsl:apply-templates> 1453 1902 </xsl:when> … … 1456 1905 <xsl:with-param name="target" select="$target"/> 1457 1906 <xsl:with-param name="topclass" select="$topclass"/> 1907 <xsl:with-param name="dtracetopclass" select="$dtracetopclass"/> 1458 1908 </xsl:apply-templates> 1459 1909 </xsl:when> … … 1494 1944 <xsl:param name="topclass"/> 1495 1945 <xsl:param name="emitmode"/> 1946 <xsl:param name="dtracetopclass"/> 1496 1947 1497 1948 <xsl:call-template name="emitIf"> … … 1500 1951 <xsl:with-param name="emitmode" select="$emitmode"/> 1501 1952 <xsl:with-param name="topclass" select="$topclass"/> 1953 <xsl:with-param name="dtracetopclass" select="$dtracetopclass"/> 1502 1954 </xsl:call-template> 1503 1955 </xsl:template> … … 1510 1962 <xsl:param name="topclass"/> 1511 1963 <xsl:param name="pmode"/> 1964 <xsl:param name="dtracetopclass"/> 1512 1965 1513 1966 <!-- first recurse to emit all base interfaces --> … … 1518 1971 <xsl:with-param name="topclass" select="$topclass"/> 1519 1972 <xsl:with-param name="pmode" select="$pmode"/> 1973 <xsl:with-param name="dtracetopclass" select="$dtracetopclass"/> 1520 1974 </xsl:call-template> 1521 1975 </xsl:if> … … 1549 2003 <xsl:apply-templates select="$iface/method | $iface/if" mode="code"> 1550 2004 <xsl:with-param name="topclass" select="$topclass"/> 2005 <xsl:with-param name="dtracetopclass" select="$dtracetopclass"/> 1551 2006 <xsl:with-param name="emitmode" select="'method'"/> 1552 2007 </xsl:apply-templates> … … 1678 2133 <xsl:value-of select="concat('DEFINE_EMPTY_CTOR_DTOR(', substring($iface/@name, 2), 'Wrap) ')"/> 1679 2134 2135 <xsl:variable name="dtracetopclass"> 2136 <xsl:choose> 2137 <xsl:when test="$iface/@dtracename"><xsl:value-of select="$iface/@dtracename"/></xsl:when> 2138 <xsl:otherwise><xsl:value-of select="substring($iface/@name, 2)"/></xsl:otherwise> 2139 </xsl:choose> 2140 </xsl:variable> 2141 1680 2142 <!-- attributes --> 1681 2143 <xsl:call-template name="emitAttributes"> 1682 2144 <xsl:with-param name="iface" select="$iface"/> 1683 2145 <xsl:with-param name="topclass" select="substring($iface/@name, 2)"/> 2146 <xsl:with-param name="dtracetopclass" select="$dtracetopclass"/> 1684 2147 <xsl:with-param name="pmode" select="'code'"/> 1685 2148 </xsl:call-template> … … 1696 2159 <xsl:with-param name="iface" select="$G_root//interface[@name=$addifname]"/> 1697 2160 <xsl:with-param name="topclass" select="substring($iface/@name, 2)"/> 2161 <xsl:with-param name="dtracetopclass" select="$dtracetopclass"/> 1698 2162 <xsl:with-param name="pmode" select="'code'"/> 1699 2163 </xsl:call-template> … … 1704 2168 <xsl:with-param name="iface" select="$iface"/> 1705 2169 <xsl:with-param name="topclass" select="substring($iface/@name, 2)"/> 2170 <xsl:with-param name="dtracetopclass" select="$dtracetopclass"/> 1706 2171 <xsl:with-param name="pmode" select="'code'"/> 1707 2172 </xsl:call-template> … … 1718 2183 <xsl:with-param name="iface" select="$G_root//interface[@name=$addifname]"/> 1719 2184 <xsl:with-param name="topclass" select="substring($iface/@name, 2)"/> 2185 <xsl:with-param name="dtracetopclass" select="$dtracetopclass"/> 1720 2186 <xsl:with-param name="pmode" select="'code'"/> 1721 2187 </xsl:call-template> -
trunk/src/VBox/Main/idl/typemap-shared.inc.xsl
r45483 r53865 163 163 164 164 <xsl:variable name="G_aSharedTypes"> 165 <type idlname="octet" xmlname="unsignedByte" cname="unsigned char" gluename="BYTE" gluefmt="%RU8" javaname="byte" />166 <type idlname="boolean" xmlname="boolean" cname="bool" gluename="BOOL" gluefmt="%RTbool" javaname="Boolean" />167 <type idlname="short" xmlname="short" cname="short" gluename="SHORT" gluefmt="%RI16" javaname="Short" />168 <type idlname="unsigned short" xmlname="unsignedShort" cname="unsigned short" gluename="USHORT" gluefmt="%RU16" javaname="Integer" />169 <type idlname="long" xmlname="int" cname="int" gluename="LONG" gluefmt="%RI32" javaname="Integer" />170 <type idlname="unsigned long" xmlname="unsignedInt" cname="unsigned int" gluename="ULONG" gluefmt="%RU32" javaname="Long" />171 <type idlname="long long" xmlname="long" cname="LONG64" gluename="LONG64" gluefmt="%RI64" javaname="Long" />172 <type idlname="unsigned long long" xmlname="unsignedLong" cname="ULONG64" gluename="ULONG64" gluefmt="%RU64" javaname="BigInteger" />173 <type idlname="double" xmlname="double" cname="double" gluename="DOUBLE" gluefmt="%#RX64" javaname="Double" />174 <type idlname="float" xmlname="float" cname="float" gluename="FLOAT" gluefmt="%#RX32" javaname="Float" />175 <type idlname="wstring" xmlname="string" cname="std::string" gluename="BSTR" gluefmt="%ls" javaname="String" />176 <type idlname="uuid" xmlname="string" cname="std::string" gluename="BSTR" gluefmt="%ls" javaname="String" />177 <type idlname="result" xmlname="unsignedInt" cname="unsigned int" gluename="HRESULT" gluefmt="%Rhrc" javaname="Long" />165 <type idlname="octet" xmlname="unsignedByte" cname="unsigned char" gluename="BYTE" gluefmt="%RU8" javaname="byte" dtracename="uint8_t" /> 166 <type idlname="boolean" xmlname="boolean" cname="bool" gluename="BOOL" gluefmt="%RTbool" javaname="Boolean" dtracename="int8_t" /> 167 <type idlname="short" xmlname="short" cname="short" gluename="SHORT" gluefmt="%RI16" javaname="Short" dtracename="int16_t" /> 168 <type idlname="unsigned short" xmlname="unsignedShort" cname="unsigned short" gluename="USHORT" gluefmt="%RU16" javaname="Integer" dtracename="uint16_t" /> 169 <type idlname="long" xmlname="int" cname="int" gluename="LONG" gluefmt="%RI32" javaname="Integer" dtracename="int32_t" /> 170 <type idlname="unsigned long" xmlname="unsignedInt" cname="unsigned int" gluename="ULONG" gluefmt="%RU32" javaname="Long" dtracename="uint32_t" /> 171 <type idlname="long long" xmlname="long" cname="LONG64" gluename="LONG64" gluefmt="%RI64" javaname="Long" dtracename="int64_t" /> 172 <type idlname="unsigned long long" xmlname="unsignedLong" cname="ULONG64" gluename="ULONG64" gluefmt="%RU64" javaname="BigInteger" dtracename="uint64_t" /> 173 <type idlname="double" xmlname="double" cname="double" gluename="DOUBLE" gluefmt="%#RX64" javaname="Double" dtracename="double" /> 174 <type idlname="float" xmlname="float" cname="float" gluename="FLOAT" gluefmt="%#RX32" javaname="Float" dtracename="float" /> 175 <type idlname="wstring" xmlname="string" cname="std::string" gluename="BSTR" gluefmt="%ls" javaname="String" dtracename="const char *"/> 176 <type idlname="uuid" xmlname="string" cname="std::string" gluename="BSTR" gluefmt="%ls" javaname="String" dtracename="const char *"/> 177 <type idlname="result" xmlname="unsignedInt" cname="unsigned int" gluename="HRESULT" gluefmt="%Rhrc" javaname="Long" dtracename="int32_t" /> 178 178 </xsl:variable> 179 179
Note:
See TracChangeset
for help on using the changeset viewer.