2006-06-02 10:36:31 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2005 by Dominic Rath *
|
|
|
|
* Dominic.Rath@gmx.de *
|
|
|
|
* *
|
2009-07-17 19:54:25 +00:00
|
|
|
* Copyright (C) 2007,2008 Ø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 *
|
|
|
|
* *
|
2006-06-02 10:36:31 +00: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., *
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
***************************************************************************/
|
|
|
|
#ifndef GDB_SERVER_H
|
|
|
|
#define GDB_SERVER_H
|
|
|
|
|
2009-11-13 17:46:21 +00:00
|
|
|
struct image;
|
2009-12-04 22:06:20 +00:00
|
|
|
#include <target/target.h>
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2008-05-07 12:14:26 +00:00
|
|
|
#define GDB_BUFFER_SIZE 16384
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2009-11-13 16:06:49 +00:00
|
|
|
struct gdb_connection
|
2006-06-02 10:36:31 +00:00
|
|
|
{
|
|
|
|
char buffer[GDB_BUFFER_SIZE];
|
|
|
|
char *buf_p;
|
|
|
|
int buf_cnt;
|
|
|
|
int ctrl_c;
|
|
|
|
enum target_state frontend_state;
|
2009-11-13 17:46:21 +00:00
|
|
|
struct image *vflash_image;
|
2008-02-16 15:21:13 +00:00
|
|
|
int closed;
|
|
|
|
int busy;
|
2008-08-22 19:58:19 +00:00
|
|
|
int noack_mode;
|
2009-09-24 06:34:23 +00:00
|
|
|
bool sync; /* set flag to true if you want the next stepi to return immediately.
|
|
|
|
allowing GDB to pick up a fresh set of register values from the target
|
|
|
|
without modifying the target state. */
|
|
|
|
|
2009-11-13 16:06:49 +00:00
|
|
|
};
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2009-11-13 16:06:52 +00:00
|
|
|
struct gdb_service
|
2006-06-02 10:36:31 +00:00
|
|
|
{
|
2009-11-13 18:11:13 +00:00
|
|
|
struct target *target;
|
2009-11-13 16:06:52 +00:00
|
|
|
};
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2009-11-29 02:56:23 +00:00
|
|
|
int gdb_target_add_one(struct target *target);
|
|
|
|
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);
|
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
|
|
|
|
|
|
|
#endif /* GDB_SERVER_H */
|