VirtualBox

Changeset 85121 in vbox for trunk/src/VBox/Debugger


Ignore:
Timestamp:
Jul 8, 2020 7:33:26 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139061
Message:

iprt/cdefs.h: Refactored the typedef use of DECLCALLBACK as well as DECLCALLBACKMEMBER to wrap the whole expression, similar to the DECLR?CALLBACKMEMBER macros. This allows adding a throw() at the end when compiling with the VC++ compiler to indicate that the callbacks won't throw anything, so we can stop supressing the C5039 warning about passing functions that can potential throw C++ exceptions to extern C code that can't necessarily cope with such (unwind,++). Introduced a few _EX variations that allows specifying different/no calling convention too, as that's handy when dynamically resolving host APIs. Fixed numerous places missing DECLCALLBACK and such. Left two angry @todos regarding use of CreateThread. bugref:9794

Location:
trunk/src/VBox/Debugger
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/DBGCGdbRemoteStub.cpp

    r84707 r85121  
    175175 * @param   cbVal               Size of the remaining value in bytes.
    176176 */
    177 typedef DECLCALLBACK(int) FNGDBSTUBQPKTPROC(PGDBSTUBCTX pThis, const uint8_t *pbVal, size_t cbVal);
     177typedef DECLCALLBACKTYPE(int, FNGDBSTUBQPKTPROC,(PGDBSTUBCTX pThis, const uint8_t *pbVal, size_t cbVal));
    178178typedef FNGDBSTUBQPKTPROC *PFNGDBSTUBQPKTPROC;
    179179
     
    227227 * @param   cbVal               Size of the value in bytes.
    228228 */
    229 typedef DECLCALLBACK(int) FNGDBSTUBFEATHND(PGDBSTUBCTX pThis, const uint8_t *pbVal, size_t cbVal);
     229typedef DECLCALLBACKTYPE(int, FNGDBSTUBFEATHND,(PGDBSTUBCTX pThis, const uint8_t *pbVal, size_t cbVal));
    230230typedef FNGDBSTUBFEATHND *PFNGDBSTUBFEATHND;
    231231
  • trunk/src/VBox/Debugger/DBGCInternal.h

    r84708 r85121  
    305305 * @param   pResult     Where to store the result.
    306306 */
    307 typedef DECLCALLBACK(int) FNDBGCOPUNARY(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat, PDBGCVAR pResult);
     307typedef DECLCALLBACKTYPE(int, FNDBGCOPUNARY,(PDBGC pDbgc, PCDBGCVAR pArg, DBGCVARCAT enmCat, PDBGCVAR pResult));
    308308/** Pointer to a unary operator handler function. */
    309309typedef FNDBGCOPUNARY *PFNDBGCOPUNARY;
     
    321321 * @param   pResult     Where to store the result.
    322322 */
    323 typedef DECLCALLBACK(int) FNDBGCOPBINARY(PDBGC pDbgc, PCDBGCVAR pArg1, PCDBGCVAR pArg2, PDBGCVAR pResult);
     323typedef DECLCALLBACKTYPE(int, FNDBGCOPBINARY,(PDBGC pDbgc, PCDBGCVAR pArg1, PCDBGCVAR pArg2, PDBGCVAR pResult));
    324324/** Pointer to a binary operator handler function. */
    325325typedef FNDBGCOPBINARY *PFNDBGCOPBINARY;
     
    376376 * @param   pResult     Where to store the result.
    377377 */
    378 typedef DECLCALLBACK(int) FNDBGCSYMGET(PCDBGCSYM pSymDesc, PDBGCCMDHLP pCmdHlp, DBGCVARTYPE enmType, PDBGCVAR pResult);
     378typedef DECLCALLBACKTYPE(int, FNDBGCSYMGET,(PCDBGCSYM pSymDesc, PDBGCCMDHLP pCmdHlp, DBGCVARTYPE enmType, PDBGCVAR pResult));
    379379/** Pointer to get function for a builtin symbol. */
    380380typedef FNDBGCSYMGET *PFNDBGCSYMGET;
     
    390390 * @param   pValue      The value to assign the symbol.
    391391 */
    392 typedef DECLCALLBACK(int) FNDBGCSYMSET(PCDBGCSYM pSymDesc, PDBGCCMDHLP pCmdHlp, PCDBGCVAR pValue);
     392typedef DECLCALLBACKTYPE(int, FNDBGCSYMSET,(PCDBGCSYM pSymDesc, PDBGCCMDHLP pCmdHlp, PCDBGCVAR pValue));
    393393/** Pointer to set function for a builtin symbol. */
    394394typedef FNDBGCSYMSET *PFNDBGCSYMSET;
     
    540540 * @param   pvUser          Opaque user data.
    541541 */
    542 typedef DECLCALLBACK(int) FNDGCSCREENBLIT(const char *psz, void *pvUser);
     542typedef DECLCALLBACKTYPE(int, FNDGCSCREENBLIT,(const char *psz, void *pvUser));
    543543/** Pointer to a FNDGCSCREENBLIT. */
    544544typedef FNDGCSCREENBLIT *PFNDGCSCREENBLIT;
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