198944Sobrien/* Register support routines for the remote server for GDB.
298944Sobrien   Copyright 2001, 2002 Free Software Foundation, Inc.
398944Sobrien
498944Sobrien   This file is part of GDB.
598944Sobrien
698944Sobrien   This program is free software; you can redistribute it and/or modify
798944Sobrien   it under the terms of the GNU General Public License as published by
898944Sobrien   the Free Software Foundation; either version 2 of the License, or
998944Sobrien   (at your option) any later version.
1098944Sobrien
1198944Sobrien   This program is distributed in the hope that it will be useful,
1298944Sobrien   but WITHOUT ANY WARRANTY; without even the implied warranty of
1398944Sobrien   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1498944Sobrien   GNU General Public License for more details.
1598944Sobrien
1698944Sobrien   You should have received a copy of the GNU General Public License
1798944Sobrien   along with this program; if not, write to the Free Software
1898944Sobrien   Foundation, Inc., 59 Temple Place - Suite 330,
1998944Sobrien   Boston, MA 02111-1307, USA.  */
2098944Sobrien
2198944Sobrien#ifndef REGCACHE_H
2298944Sobrien#define REGCACHE_H
2398944Sobrien
24130803Smarcelstruct inferior_list_entry;
25130803Smarcel
26130803Smarcel/* Create a new register cache for INFERIOR.  */
27130803Smarcel
28130803Smarcelvoid *new_register_cache (void);
29130803Smarcel
30130803Smarcel/* Release all memory associated with the register cache for INFERIOR.  */
31130803Smarcel
32130803Smarcelvoid free_register_cache (void *regcache);
33130803Smarcel
34130803Smarcel/* Invalidate cached registers for one or all threads.  */
35130803Smarcel
36130803Smarcelvoid regcache_invalidate_one (struct inferior_list_entry *);
37130803Smarcelvoid regcache_invalidate (void);
38130803Smarcel
3998944Sobrien/* Convert all registers to a string in the currently specified remote
4098944Sobrien   format.  */
4198944Sobrien
4298944Sobrienvoid registers_to_string (char *buf);
4398944Sobrien
4498944Sobrien/* Convert a string to register values and fill our register cache.  */
4598944Sobrien
4698944Sobrienvoid registers_from_string (char *buf);
4798944Sobrien
4898944Sobrien/* Return the size in bytes of a string-encoded register packet.  */
4998944Sobrien
5098944Sobrienint registers_length (void);
5198944Sobrien
5298944Sobrien/* Return a pointer to the description of register ``n''.  */
5398944Sobrien
5498944Sobrienstruct reg *find_register_by_number (int n);
5598944Sobrien
5698944Sobrienint register_size (int n);
5798944Sobrien
5898944Sobrienint find_regno (const char *name);
5998944Sobrien
6098944Sobrienextern const char **gdbserver_expedite_regs;
6198944Sobrien
62130803Smarcelvoid supply_register (int n, const void *buf);
63130803Smarcel
64130803Smarcelvoid supply_register_by_name (const char *name, const void *buf);
65130803Smarcel
66130803Smarcelvoid collect_register (int n, void *buf);
67130803Smarcel
68130803Smarcelvoid collect_register_as_string (int n, char *buf);
69130803Smarcel
70130803Smarcelvoid collect_register_by_name (const char *name, void *buf);
71130803Smarcel
7298944Sobrien#endif /* REGCACHE_H */
73