2006-06-02 05:36:31 -05:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2005 by Dominic Rath *
|
|
|
|
* Dominic.Rath@gmx.de *
|
|
|
|
* *
|
2009-12-10 12:11:03 -06:00
|
|
|
* Copyright (C) 2007-2009 Øyvind Harboe *
|
2008-07-25 01:54:17 -05:00
|
|
|
* oyvind.harboe@zylin.com *
|
|
|
|
* *
|
2008-09-20 05:50:53 -05:00
|
|
|
* Copyright (C) 2008 by Spencer Oliver *
|
|
|
|
* spen@spen-soft.co.uk *
|
|
|
|
* *
|
2011-04-14 03:25:01 -05:00
|
|
|
* Copyright (C) 2011 by Broadcom Corporation *
|
|
|
|
* Evan Hunter - ehunter@broadcom.com *
|
|
|
|
* *
|
2006-06-02 05:36:31 -05:00
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
* Free Software Foundation, Inc., *
|
2013-06-02 14:32:36 -05:00
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
|
2006-06-02 05:36:31 -05:00
|
|
|
***************************************************************************/
|
2012-01-30 06:05:19 -06:00
|
|
|
|
2006-06-02 05:36:31 -05:00
|
|
|
#ifndef GDB_SERVER_H
|
|
|
|
#define GDB_SERVER_H
|
|
|
|
|
2009-11-13 11:46:21 -06:00
|
|
|
struct image;
|
2011-04-19 01:43:33 -05:00
|
|
|
struct reg;
|
2009-12-04 16:06:20 -06:00
|
|
|
#include <target/target.h>
|
2006-06-02 05:36:31 -05:00
|
|
|
|
2012-01-30 06:05:19 -06:00
|
|
|
#define GDB_BUFFER_SIZE 16384
|
2006-06-02 05:36:31 -05:00
|
|
|
|
2009-11-28 20:56:23 -06:00
|
|
|
int gdb_target_add_all(struct target *target);
|
2009-11-13 15:25:47 -06:00
|
|
|
int gdb_register_commands(struct command_context *command_context);
|
2006-06-02 05:36:31 -05:00
|
|
|
|
2011-04-14 03:25:01 -05:00
|
|
|
int gdb_put_packet(struct connection *connection, char *buffer, int len);
|
|
|
|
|
2011-08-24 10:23:04 -05: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 05:36:31 -05:00
|
|
|
#define ERROR_GDB_BUFFER_TOO_SMALL (-800)
|
2008-02-16 09:21:13 -06:00
|
|
|
#define ERROR_GDB_TIMEOUT (-801)
|
2006-06-02 05:36:31 -05:00
|
|
|
|
2012-01-30 06:05:19 -06:00
|
|
|
#endif /* GDB_SERVER_H */
|