VirtualBox

Changeset 83810 in vbox for trunk


Ignore:
Timestamp:
Apr 19, 2020 12:03:08 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137337
Message:

VBoxDTrace: VC++ 14.1 adjustments and a little fix/optimization. bugref:8489

Location:
trunk/src/VBox/ExtPacks/VBoxDTrace
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk

    r82968 r83810  
    6565 TEMPLATE_VBoxR3ExtPackDTrace_INST = $(INST_EXTPACK_VBOXDTRACE)$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
    6666 TEMPLATE_VBoxR3ExtPackDTrace_DEFS = $(TEMPLATE_VBoxR3ExtPack_DEFS) VBOX_IN_DTRACE_EXTPACK
     67 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC141"
     68  # -wd4456: declaration of 'rval' hides previous local declaration
     69  # -wd4477: 'fprintf' : format string '%02lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'ulong_t'
     70  # -wd4457: warning C4457: declaration of 'arg' hides function parameter
     71  TEMPLATE_VBoxR3ExtPackDTrace_CFLAGS.win = $(TEMPLATE_VBoxR3ExtPack_CFLAGS.win) -wd4456 -wd4477 -wd4457
     72 endif
    6773
    6874 TEMPLATE_VBoxR0ExtPackDTrace = For the ring-0 context modules in the VBoxDTrace extension pack.
     
    102108 DLLS += VBoxDTraceCmd
    103109 VBoxDTraceCmd_TEMPLATE = VBoxR3ExtPackDTrace
     110 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
     111 VBoxDTraceCmd_DEFS = RTMEM_WRAP_TO_EF_APIS VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME="$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)"
     112 else
    104113 VBoxDTraceCmd_DEFS = RTMEM_WRAP_TO_EF_APIS VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME=\"$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)\"
     114 endif
    105115 #VBoxDTraceCmd_DEFS += YYDEBUG
    106116 VBoxDTraceCmd_DEFS.linux = _XOPEN_SOURCE=700 _LARGEFILE64_SOURCE
  • trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c

    r76346 r83810  
    915915        (void) printf("%s: %s%s\n", g_pname, hdr, strlen(hdr) > 0 ? ":" : "");
    916916
     917#ifdef VBOX /* The orignal upsets VC++ 14.1 with variable 'c' shadowing variable in the function.
     918             * This version is faster and does not try to print '\0' as that doesn't look like it's intentional */
     919#define BUFDUMPSTR(ptr, field) do { \
     920        const char *pszField = (ptr)->field; \
     921        if (pszField) { \
     922                const char *pszStart = pszField; \
     923                char ch; \
     924                printf("%s: %20s => \"", g_pname, #field); \
     925                while ((ch = *pszField) != '\0') { \
     926                        if (ch != '\n')  \
     927                                pszField++; \
     928                        else { \
     929                                printf("%*.*s\\n", (int)(pszField - pszStart), \
     930                                       (int)(pszField - pszStart), pszStart); \
     931                                pszStart = ++pszField; \
     932                        } \
     933                } \
     934                printf("%*.*s\"", (int)(pszField - pszStart), \
     935                       (int)(pszField - pszStart), pszStart); \
     936        } else {  \
     937                printf("%s: %20s => <NULL>\n", g_pname, #field); \
     938        } \
     939} while (0)
     940#else
    917941#define BUFDUMPSTR(ptr, field) \
    918942        (void) printf("%s: %20s => ", g_pname, #field); \
     
    932956                (void) printf("<NULL>\n");              \
    933957        }
     958#endif
    934959
    935960#define BUFDUMPASSTR(ptr, field, str) \
     
    19131938
    19141939                if (g_ofile == NULL) {
     1940#ifndef VBOX
    19151941                        char *p;
     1942#endif
    19161943
    19171944                        if (g_cmdc > 1) {
  • trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/uts/common/dtrace/dtrace.c

    r76389 r83810  
    107107# include <limits.h>
    108108
     109# undef offsetof
     110# define offsetof RT_OFFSETOF
     111
    109112/*
    110113 * Use asm.h to implemente some of the simple stuff in dtrace_asm.s.
Note: See TracChangeset for help on using the changeset viewer.

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