VirtualBox

Changeset 84628 in vbox


Ignore:
Timestamp:
Jun 1, 2020 8:23:07 PM (4 years ago)
Author:
vboxsync
Message:

Debugger: Initial port of my GDB stub library from ​https://github.com/AlexanderEichner/libgdbstub to VirtualBox, ​bugref:5217 [build and doxygen fixes]

File:
1 edited

Legend:

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

    r84627 r84628  
    109109    size_t                      cbPktBufMax;
    110110    /** Current offset into the packet buffer. */
    111     uint32_t                    offPktBuf;
     111    size_t                      offPktBuf;
    112112    /** The size of the packet (minus the start, end characters and the checksum). */
    113113    uint32_t                    cbPkt;
     
    293293 * @returns Status code.
    294294 * @param   pThis               The GDB stub context.
    295  * @param   pbReplyData         The reply data to send.
     295 * @param   pvReplyData         The reply data to send.
    296296 * @param   cbReplyData         Size of the reply data in bytes.
    297297 */
     
    330330 * @returns Status code.
    331331 * @param   pThis               The GDB stub context.
    332  * @param   pbReplyPkt          The reply packet to send.
     332 * @param   pvReplyPkt          The reply packet to send.
    333333 * @param   cbReplyPkt          Size of the reply packet in bytes.
    334334 */
     
    604604
    605605/**
    606  * @copydoc{FNGDBSTUBQPKTPROC}
     606 * @copydoc FNGDBSTUBQPKTPROC
    607607 */
    608608static int dbgcGdbStubCtxPktProcessFeatXmlRegs(PGDBSTUBCTX pThis, const uint8_t *pbVal, size_t cbVal)
     
    784784
    785785/**
    786  * Sends the reply to a 'qXfer:<object>:read:...' request.
     786 * Sends the reply to a 'qXfer:object:read:...' request.
    787787 *
    788788 * @returns Status code.
     
    810810        }
    811811        else
    812             rc = dbgcGdbStubCtxReplySendErr(pThis, VERR_NO_MEMORY);
     812            rc = dbgcGdbStubCtxReplySendErrSts(pThis, VERR_NO_MEMORY);
    813813    }
    814814    else if (offRead == cbObj)
     
    822822
    823823/**
    824  * Parses the annex:offset,length part of a 'qXfer:<object>:read:...' request.
    825  *
    826  * @returns Status code.
    827  * @param   pbArgs              Start of the arguments beginning with <annex>.
     824 * Parses the annex:offset,length part of a 'qXfer:object:read:...' request.
     825 *
     826 * @returns Status code.
     827 * @param   pbArgs              Start of the arguments beginning with annex.
    828828 * @param   cbArgs              Number of bytes remaining for the arguments.
    829829 * @param   ppchAnnex           Where to store the pointer to the beginning of the annex on success.
    830830 * @param   pcchAnnex           Where to store the number of characters for the annex on success.
    831  * @param   poff                Where to store the offset on success.
    832  * @param   pcb                 Where to store the length on success.
     831 * @param   poffRead            Where to store the offset on success.
     832 * @param   pcbRead             Where to store the length on success.
    833833 */
    834834static int dbgcGdbStubCtxPktProcessQueryXferParseAnnexOffLen(const uint8_t *pbArgs, size_t cbArgs, const char **ppchAnnex, size_t *pcchAnnex,
     
    14561456                {
    14571457                    size_t cbProcessed = pbPktSep - &pThis->pbPktBuf[2];
    1458                     size_t cbRead = 0;
     1458                    uint64_t cbRead = 0;
    14591459                    rc = dbgcGdbStubCtxParseHexStringAsInteger(pbPktSep + 1, pThis->cbPkt - 1 - cbProcessed - 1, &cbRead, GDBSTUB_PKT_END, NULL);
    14601460                    if (RT_SUCCESS(rc))
     
    15161516                {
    15171517                    size_t cbProcessed = pbPktSep - &pThis->pbPktBuf[2];
    1518                     size_t cbWrite = 0;
     1518                    uint64_t cbWrite = 0;
    15191519                    rc = dbgcGdbStubCtxParseHexStringAsInteger(pbPktSep + 1, pThis->cbPkt - 1 - cbProcessed - 1, &cbWrite, ':', &pbPktSep);
    15201520                    if (RT_SUCCESS(rc))
     
    21662166 *
    21672167 * @returns VBox status code.
    2168  * @param   pDbgc   Pointer to the debugger console instance data.
     2168 * @param   pThis   Pointer to the GDB stub context.
    21692169 */
    21702170int dbgcGdbStubRun(PGDBSTUBCTX pThis)
Note: See TracChangeset for help on using the changeset viewer.

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