Add DRD suppression patterns for races triggered by std::ostream
[valgrind.git] / coregrind / m_gdbserver / regcache.h
blobcb6fef799005a7994045298ba6045fff3f05da50
1 /* Register support routines for the remote server for GDB.
2 Copyright (C) 2001, 2002, 2012 Free Software Foundation, Inc.
4 This file is part of GDB.
5 It has been modified to integrate it in valgrind
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA. */
22 #ifndef REGCACHE_H
23 #define REGCACHE_H
25 #include "pub_core_basics.h" // Bool
27 struct inferior_list_entry;
29 /* Create a new register cache for INFERIOR. */
31 void *new_register_cache (void);
33 /* Release all memory associated with the register cache for INFERIOR. */
35 void free_register_cache (void *regcache);
37 /* Invalidate cached registers for one or all threads. */
39 void regcache_invalidate_one (struct inferior_list_entry *);
40 void regcache_invalidate (void);
42 /* Convert all registers to a string in the currently specified remote
43 format. */
45 void registers_to_string (char *buf);
47 /* Convert a string to register values and fill our register cache. */
49 void registers_from_string (const char *buf);
51 /* Return the size in bytes of a string-encoded register packet. */
53 int registers_length (void);
55 /* Return a pointer to the description of register ``n''. */
57 struct reg *find_register_by_number (int n);
59 int register_size (int n);
61 int find_regno (const char *name);
63 extern const char **gdbserver_expedite_regs;
65 /* *mod set to True if *buf provides a new value. */
66 void supply_register (int n, const void *buf, Bool *mod);
68 /* Reads register data from buf (hex string in target byte order)
69 and stores it in the register cache.
70 *mod set to True if *buf provides a new value. */
71 void supply_register_from_string (int n, const char *buf, Bool *mod);
73 /* *mod set to True if *buf provides a new value. */
74 void supply_register_by_name (const char *name, const void *buf, Bool *mod);
76 void collect_register (int n, void *buf);
78 void collect_register_as_string (int n, char *buf);
80 void collect_register_by_name (const char *name, void *buf);
82 #endif /* REGCACHE_H */