diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-06-08 16:09:46 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-06-08 16:09:46 +0000 |
commit | a0f267c7018fd53d9b52f8eb81507ff104329f89 (patch) | |
tree | dd61def38f930fbea2fa7ef868a8cbeb5c0434aa /gdb/trad-frame.h | |
parent | 0b9a4d73a80fc35f12f3e081adf52f293947c3f0 (diff) | |
download | gdb-a0f267c7018fd53d9b52f8eb81507ff104329f89.zip gdb-a0f267c7018fd53d9b52f8eb81507ff104329f89.tar.gz gdb-a0f267c7018fd53d9b52f8eb81507ff104329f89.tar.bz2 |
2003-06-08 Andrew Cagney <cagney@redhat.com>
* Makefile.in (d10v-tdep.o): Update dependencies.
(SFILES): Add trad-frame.c.
(trad_frame_h): Define.
(COMMON_OBS): Add trad-frame.o.
(trad-frame.o): Specify dependencies.
* d10v-tdep.c: Include "trad-frame.h".
(saved_regs_unwinder): Delete function.
(d10v_frame_prev_register): Use trad_frame_prev_register.
(struct d10v_unwind_cache): Change type of "saved_regs" to "struct
trad_frame", delete "regs" and "prev_sp".
(prologue_find_regs): Use trad-frame.
* trad-frame.h, trad-frame.c: New files.
Diffstat (limited to 'gdb/trad-frame.h')
-rw-r--r-- | gdb/trad-frame.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/gdb/trad-frame.h b/gdb/trad-frame.h new file mode 100644 index 0000000..ab58e35 --- /dev/null +++ b/gdb/trad-frame.h @@ -0,0 +1,56 @@ +/* Traditional frame unwind support, for GDB the GNU Debugger. + + Copyright 2003 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef TRAD_FRAME_H +#define TRAD_FRAME_H + +struct trad_frame +{ + /* If non-zero (and regnum >= 0), the stack address at which the + register is saved. By default, it is assumed that the register + was not saved (addr == 0). Remember, a LONGEST can always fit a + CORE_ADDR. */ + LONGEST addr; + /* else, if regnum >=0 (and addr == 0), the REGNUM that contains + this registers value. By default, it is assumed that the + registers are not moved (the register's value is still in that + register and regnum == the index). */ + int regnum; + /* else, if regnum < 0, ADDR is the registers value. */ +}; + +/* Convenience function, encode the register's value in the + trad-frame. */ +void trad_frame_register_value (struct trad_frame this_saved_regs[], + int regnum, LONGEST val); + +/* Return a freshly allocated (and initialized) trad_frame array. */ +struct trad_frame *trad_frame_alloc_saved_regs (struct frame_info *next_frame); + +/* Given the trad_frame info, return the location of the specified + register. */ +void trad_frame_prev_register (struct frame_info *next_frame, + struct trad_frame this_saved_regs[], + int regnum, int *optimizedp, + enum lval_type *lvalp, CORE_ADDR *addrp, + int *realnump, void *bufferp); + +#endif |