Target FP: Add conversion routines to target-float.{c,h}
[deliverable/binutils-gdb.git] / gdb / target-float.h
1 /* Floating point definitions for GDB.
2
3 Copyright (C) 1986-2017 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
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 3 of the License, or
10 (at your option) any later version.
11
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.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20 #ifndef TYPED_FLOAT_H
21 #define TYPED_FLOAT_H
22
23 extern bool target_float_is_valid (const gdb_byte *addr,
24 const struct type *type);
25 extern bool target_float_is_zero (const gdb_byte *addr,
26 const struct type *type);
27
28 extern std::string target_float_to_string (const gdb_byte *addr,
29 const struct type *type,
30 const char *format = nullptr);
31 extern bool target_float_from_string (gdb_byte *addr,
32 const struct type *type,
33 const std::string &string);
34
35 extern LONGEST target_float_to_longest (const gdb_byte *addr,
36 const struct type *type);
37 extern void target_float_from_longest (gdb_byte *addr,
38 const struct type *type,
39 LONGEST val);
40 extern void target_float_from_ulongest (gdb_byte *addr,
41 const struct type *type,
42 ULONGEST val);
43 extern void target_float_convert (const gdb_byte *from,
44 const struct type *from_type,
45 gdb_byte *to, const struct type *to_type);
46
47 #endif
This page took 0.03122 seconds and 5 git commands to generate.