radare2/shlr/gdb/include/packet.h
Srimanta Barua d81f369fa1 Fix gdb client packet size (#7703)
* Fixes for packet too long
* Proper escaping in packets and run-length encoding
* Removed old cache code
* Removed currently unnecessary code from client initialization
* Preparation for customized packet sizes
* Better packet-size configuration
* Minimum packet size (for AVR)
* mem_write too
* Corrections to packing code
* Was overcompensating for AVR. (pkt_sz = 16 => read_mem_len = 8)
2017-06-11 02:12:44 +02:00

33 lines
771 B
C

/*! \file */
#ifndef PACKET_H
#define PACKET_H
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "libgdbr.h"
#include <stdio.h>
#if __WINDOWS__
#include <windows.h>
#if !__CYGWIN__ && !defined(_MSC_VER)
#include <winsock.h>
#endif
#endif
/*!
* \brief sends a packet sends a packet to the established connection
* \param g the "instance" of the current libgdbr session
* \returns a failure code (currently -1) or 0 if call successfully
*/
int send_packet(libgdbr_t *g);
/*!
* \brief Function reads data from the established connection
* \param g the "instance" of the current libgdbr session
* \returns a failure code (currently -1) or 0 if call successfully
*/
int read_packet(libgdbr_t *g);
int pack(libgdbr_t *g, const char *msg);
#endif