2022-06-26 23:26:22 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
|
2006-06-02 10:36:31 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2005 by Dominic Rath *
|
|
|
|
* Dominic.Rath@gmx.de *
|
|
|
|
* *
|
2009-12-10 18:11:03 +00:00
|
|
|
* Copyright (C) 2007-2009 Øyvind Harboe *
|
2008-07-25 06:54:17 +00:00
|
|
|
* oyvind.harboe@zylin.com *
|
|
|
|
* *
|
2008-09-20 10:50:53 +00:00
|
|
|
* Copyright (C) 2008 by Spencer Oliver *
|
|
|
|
* spen@spen-soft.co.uk *
|
|
|
|
* *
|
2011-04-14 08:25:01 +00:00
|
|
|
* Copyright (C) 2011 by Broadcom Corporation *
|
|
|
|
* Evan Hunter - ehunter@broadcom.com *
|
2006-06-02 10:36:31 +00:00
|
|
|
***************************************************************************/
|
2012-01-30 12:05:19 +00:00
|
|
|
|
2015-09-21 19:07:46 +00:00
|
|
|
#ifndef OPENOCD_SERVER_GDB_SERVER_H
|
|
|
|
#define OPENOCD_SERVER_GDB_SERVER_H
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2009-11-13 17:46:21 +00:00
|
|
|
struct image;
|
2011-04-19 06:43:33 +00:00
|
|
|
struct reg;
|
2009-12-04 22:06:20 +00:00
|
|
|
#include <target/target.h>
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2012-01-30 12:05:19 +00:00
|
|
|
#define GDB_BUFFER_SIZE 16384
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2009-11-29 02:56:23 +00:00
|
|
|
int gdb_target_add_all(struct target *target);
|
2009-11-13 21:25:47 +00:00
|
|
|
int gdb_register_commands(struct command_context *command_context);
|
2018-02-14 23:22:42 +00:00
|
|
|
void gdb_service_free(void);
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2011-04-14 08:25:01 +00:00
|
|
|
int gdb_put_packet(struct connection *connection, char *buffer, int len);
|
|
|
|
|
2011-08-24 15:23:04 +00:00
|
|
|
static inline struct target *get_target_from_connection(struct connection *connection)
|
|
|
|
{
|
|
|
|
struct gdb_service *gdb_service = connection->service->priv;
|
|
|
|
return gdb_service->target;
|
|
|
|
}
|
|
|
|
|
2006-06-02 10:36:31 +00:00
|
|
|
#define ERROR_GDB_BUFFER_TOO_SMALL (-800)
|
2008-02-16 15:21:13 +00:00
|
|
|
#define ERROR_GDB_TIMEOUT (-801)
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2015-09-21 19:07:46 +00:00
|
|
|
#endif /* OPENOCD_SERVER_GDB_SERVER_H */
|