1 /* Per-frame user registers, for GDB, the GNU debugger.
3 Copyright 2002, 2003 Free Software Foundation, Inc.
5 Contributed by Red Hat.
7 This file is part of GDB.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
27 /* Implement both builtin, and architecture specific, per-frame user
30 Builtin registers apply to all architectures, where as architecture
31 specific registers are present when the architecture is selected.
33 These registers are assigned register numbers outside the
34 architecture's register range [0 .. NUM_REGS + NUM_PSEUDO_REGS).
35 Their values should be constructed using per-frame information. */
37 /* TODO: cagney/2003-06-27: Need to think more about how these
38 registers are added, read, and modified. At present they are kind
39 of assumed to be read-only. Should it, for instance, return a
40 register descriptor that contains all the relvent access methods. */
45 /* Given an architecture, map a user visible register name onto its
48 extern int user_reg_map_name_to_regnum (struct gdbarch
*gdbarch
,
49 const char *str
, int len
);
51 extern const char *user_reg_map_regnum_to_name (struct gdbarch
*gdbarch
,
54 /* Return the value of the frame register in the specified frame.
56 Note; These methods return a "struct value" instead of the raw
57 bytes as, at the time the register is being added, the type needed
58 to describe the register has not bee initialized. */
60 typedef struct value
*(user_reg_read_ftype
) (struct frame_info
*frame
);
61 extern struct value
*value_of_user_reg (int regnum
, struct frame_info
*frame
);
63 /* Add a builtin register (present in all architectures). */
64 extern void user_reg_add_builtin (const char *name
,
65 user_reg_read_ftype
*read
);
67 /* Add a per-architecture frame register. */
68 extern void user_reg_add (struct gdbarch
*gdbarch
, const char *name
,
69 user_reg_read_ftype
*read
);
This page took 0.030056 seconds and 4 git commands to generate.