xref: /dflybsd-src/contrib/gdb-7/gdb/dcache.h (revision de8e141f24382815c10a4012d209bbbf7abf1112)
15796c8dcSSimon Schubert /* Declarations for caching.  Typically used by remote back ends for
25796c8dcSSimon Schubert    caching remote memory.
35796c8dcSSimon Schubert 
4*ef5ccd6cSJohn Marino    Copyright (C) 1992-2013 Free Software Foundation, Inc.
55796c8dcSSimon Schubert 
65796c8dcSSimon Schubert    This file is part of GDB.
75796c8dcSSimon Schubert 
85796c8dcSSimon Schubert    This program is free software; you can redistribute it and/or modify
95796c8dcSSimon Schubert    it under the terms of the GNU General Public License as published by
105796c8dcSSimon Schubert    the Free Software Foundation; either version 3 of the License, or
115796c8dcSSimon Schubert    (at your option) any later version.
125796c8dcSSimon Schubert 
135796c8dcSSimon Schubert    This program is distributed in the hope that it will be useful,
145796c8dcSSimon Schubert    but WITHOUT ANY WARRANTY; without even the implied warranty of
155796c8dcSSimon Schubert    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
165796c8dcSSimon Schubert    GNU General Public License for more details.
175796c8dcSSimon Schubert 
185796c8dcSSimon Schubert    You should have received a copy of the GNU General Public License
195796c8dcSSimon Schubert    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
205796c8dcSSimon Schubert 
215796c8dcSSimon Schubert #ifndef DCACHE_H
225796c8dcSSimon Schubert #define DCACHE_H
235796c8dcSSimon Schubert 
245796c8dcSSimon Schubert typedef struct dcache_struct DCACHE;
255796c8dcSSimon Schubert 
265796c8dcSSimon Schubert /* Invalidate DCACHE.  */
275796c8dcSSimon Schubert void dcache_invalidate (DCACHE *dcache);
285796c8dcSSimon Schubert 
295796c8dcSSimon Schubert /* Initialize DCACHE.  */
305796c8dcSSimon Schubert DCACHE *dcache_init (void);
315796c8dcSSimon Schubert 
32c50c785cSJohn Marino /* Free a DCACHE.  */
335796c8dcSSimon Schubert void dcache_free (DCACHE *);
345796c8dcSSimon Schubert 
35c50c785cSJohn Marino /* Simple to call from <remote>_xfer_memory.  */
365796c8dcSSimon Schubert 
375796c8dcSSimon Schubert int dcache_xfer_memory (struct target_ops *ops, DCACHE *cache, CORE_ADDR mem,
385796c8dcSSimon Schubert 			gdb_byte *my, int len, int should_write);
395796c8dcSSimon Schubert 
405796c8dcSSimon Schubert void dcache_update (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr,
415796c8dcSSimon Schubert 		    int len);
425796c8dcSSimon Schubert 
435796c8dcSSimon Schubert #endif /* DCACHE_H */
44