2006-06-02 05:36:31 -05:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2005 by Dominic Rath *
|
|
|
|
* Dominic.Rath@gmx.de *
|
|
|
|
* *
|
2009-07-17 14:54:25 -05:00
|
|
|
* Copyright (C) 2007,2008 Ø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 *
|
|
|
|
* *
|
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., *
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
***************************************************************************/
|
|
|
|
#ifndef GDB_SERVER_H
|
|
|
|
#define GDB_SERVER_H
|
|
|
|
|
|
|
|
#include "target.h"
|
2009-05-10 23:22:15 -05:00
|
|
|
|
2009-11-13 11:46:21 -06:00
|
|
|
struct image;
|
2006-06-02 05:36:31 -05:00
|
|
|
|
2008-05-07 07:14:26 -05:00
|
|
|
#define GDB_BUFFER_SIZE 16384
|
2006-06-02 05:36:31 -05:00
|
|
|
|
2009-11-13 10:06:49 -06:00
|
|
|
struct gdb_connection
|
2006-06-02 05:36:31 -05:00
|
|
|
{
|
|
|
|
char buffer[GDB_BUFFER_SIZE];
|
|
|
|
char *buf_p;
|
|
|
|
int buf_cnt;
|
|
|
|
int ctrl_c;
|
|
|
|
enum target_state frontend_state;
|
2009-11-13 11:46:21 -06:00
|
|
|
struct image *vflash_image;
|
2008-02-16 09:21:13 -06:00
|
|
|
int closed;
|
|
|
|
int busy;
|
2008-08-22 14:58:19 -05:00
|
|
|
int noack_mode;
|
2009-09-24 01:34:23 -05: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 10:06:49 -06:00
|
|
|
};
|
2006-06-02 05:36:31 -05:00
|
|
|
|
2009-11-13 10:06:52 -06:00
|
|
|
struct gdb_service
|
2006-06-02 05:36:31 -05:00
|
|
|
{
|
2009-11-13 12:11:13 -06:00
|
|
|
struct target *target;
|
2009-11-13 10:06:52 -06:00
|
|
|
};
|
2006-06-02 05:36:31 -05:00
|
|
|
|
2009-11-09 05:38:34 -06:00
|
|
|
int gdb_init(void);
|
|
|
|
int gdb_register_commands(command_context_t *command_context);
|
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
|
|
|
|
|
|
|
#endif /* GDB_SERVER_H */
|