GNU Binutils with patches for OS216
Revisión | 1aef2af9e5d477c078495d2fa36a3d57d17eba5e (tree) |
---|---|
Tiempo | 2004-03-22 12:15:23 |
Autor | Andrew Cagney <cagney@redh...> |
Commiter | Andrew Cagney |
Final tramp-frame code.
@@ -1,5 +1,15 @@ | ||
1 | 1 | 2004-03-21 Andrew Cagney <cagney@redhat.com> |
2 | 2 | |
3 | + * tramp-frame.h, tramp-frame.h: New files. | |
4 | + * Makefile.in (SFILES, tramp_frame_h, COMMON_OBS, tramp-frame.o): | |
5 | + Update rules to include "tramp-frame.h" and "tramp-frame.c". | |
6 | + | |
7 | + * Makefile.in (ppcnbsd-tdep.o): Update dependencies. | |
8 | + * ppcnbsd-tdep.c: Include "tramp-frame.h" and "trad-frame.h". | |
9 | + (ppcnbsd_sigtramp_cache_init, ppcnbsd_sigtramp): Handle signal | |
10 | + trampoline. | |
11 | + (ppcnbsd_init_abi): Call tramp_frame_append with ppcnbsd_sigtramp. | |
12 | + | |
3 | 13 | * infrun.c (handle_inferior_event): For non legacy frames, use the |
4 | 14 | frame ID and frame type to identify a signal trampoline. Update |
5 | 15 | comments. |
@@ -757,7 +757,8 @@ target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h) | ||
757 | 757 | terminal_h = terminal.h |
758 | 758 | top_h = top.h |
759 | 759 | tracepoint_h = tracepoint.h |
760 | -trad_frame_h = trad-frame.h | |
760 | +trad_frame_h = trad-frame.h $(frame_h) | |
761 | +tramp_frame_h = tramp-frame.h | |
761 | 762 | typeprint_h = typeprint.h |
762 | 763 | ui_file_h = ui-file.h |
763 | 764 | ui_out_h = ui-out.h |
@@ -1535,7 +1536,7 @@ amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \ | ||
1535 | 1536 | $(regcache_h) $(osabi_h) $(gdb_string_h) $(amd64_tdep_h) \ |
1536 | 1537 | $(solib_svr4_h) |
1537 | 1538 | amd64-nat.o: amd64-nat.c $(defs_h) $(gdbarch_h) $(regcache_h) \ |
1538 | - $(gdb_assert_h) $(i386_tdep_h) $(amd64_tdep_h) | |
1539 | + $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(amd64_tdep_h) | |
1539 | 1540 | amd64nbsd-nat.o: amd64nbsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \ |
1540 | 1541 | $(amd64_nat_h) |
1541 | 1542 | amd64nbsd-tdep.o: amd64nbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ |
@@ -1769,8 +1770,8 @@ frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \ | ||
1769 | 1770 | $(command_h) $(gdbcmd_h) |
1770 | 1771 | frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \ |
1771 | 1772 | $(gdb_assert_h) $(dummy_frame_h) $(gdb_obstack_h) |
1772 | -frv-linux-tdep.o: frv-linux-tdep.c $(defs_h) $(target_h) $(osabi_h) \ | |
1773 | - $(elf_bfd_h) $(elf_frv_h) $(frv_tdep_h) | |
1773 | +frv-linux-tdep.o: frv-linux-tdep.c $(defs_h) $(target_h) $(frame_h) \ | |
1774 | + $(osabi_h) $(elf_bfd_h) $(elf_frv_h) $(frv_tdep_h) | |
1774 | 1775 | frv-tdep.o: frv-tdep.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \ |
1775 | 1776 | $(arch_utils_h) $(regcache_h) $(frame_h) $(frame_unwind_h) \ |
1776 | 1777 | $(frame_base_h) $(trad_frame_h) $(dis_asm_h) $(gdb_assert_h) \ |
@@ -1857,8 +1858,8 @@ i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ | ||
1857 | 1858 | $(gdb_proc_service_h) |
1858 | 1859 | i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \ |
1859 | 1860 | $(value_h) $(regcache_h) $(inferior_h) $(osabi_h) $(reggroups_h) \ |
1860 | - $(solib_svr4_h) $(gdb_string_h) $(i386_tdep_h) $(i386_linux_tdep_h) \ | |
1861 | - $(glibc_tdep_h) | |
1861 | + $(gdb_string_h) $(i386_tdep_h) $(i386_linux_tdep_h) $(glibc_tdep_h) \ | |
1862 | + $(solib_svr4_h) | |
1862 | 1863 | i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ |
1863 | 1864 | $(regcache_h) $(target_h) $(osabi_h) $(i386_tdep_h) |
1864 | 1865 | i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h) |
@@ -2139,13 +2140,15 @@ ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(gdb_string_h) $(frame_h) \ | ||
2139 | 2140 | $(ppc_tdep_h) |
2140 | 2141 | ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \ |
2141 | 2142 | $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \ |
2142 | - $(objfiles_h) $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) \ | |
2143 | - $(ppc_tdep_h) | |
2143 | + $(objfiles_h) $(regcache_h) $(value_h) $(osabi_h) $(trad_frame_h) \ | |
2144 | + $(tramp_frame_h) $(regset_h) $(solib_svr4_h) $(ppc_tdep_h) \ | |
2145 | + $(trad_frame_h) $(frame_unwind_h) | |
2144 | 2146 | ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \ |
2145 | 2147 | $(ppcnbsd_tdep_h) |
2146 | 2148 | ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \ |
2147 | 2149 | $(target_h) $(breakpoint_h) $(value_h) $(osabi_h) $(ppc_tdep_h) \ |
2148 | - $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) | |
2150 | + $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(tramp_frame_h) $(trad_frame_h) \ | |
2151 | + $(solib_svr4_h) | |
2149 | 2152 | ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ |
2150 | 2153 | $(regcache_h) $(value_h) $(gdb_string_h) $(gdb_assert_h) \ |
2151 | 2154 | $(ppc_tdep_h) $(target_h) $(objfiles_h) |
@@ -2246,7 +2249,8 @@ rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \ | ||
2246 | 2249 | $(regcache_h) $(doublest_h) $(value_h) $(parser_defs_h) $(osabi_h) \ |
2247 | 2250 | $(libbfd_h) $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) \ |
2248 | 2251 | $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) $(ppc_tdep_h) \ |
2249 | - $(gdb_assert_h) $(dis_asm_h) | |
2252 | + $(gdb_assert_h) $(dis_asm_h) $(trad_frame_h) $(frame_unwind_h) \ | |
2253 | + $(frame_base_h) | |
2250 | 2254 | s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h) $(inferior_h) \ |
2251 | 2255 | $(s390_tdep_h) |
2252 | 2256 | s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \ |
@@ -2302,9 +2306,9 @@ solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \ | ||
2302 | 2306 | $(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \ |
2303 | 2307 | $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \ |
2304 | 2308 | $(completer_h) $(filenames_h) $(exec_h) $(solist_h) $(readline_h) |
2305 | -solib-frv.o: solib-frv.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \ | |
2306 | - $(solist_h) $(frv_tdep_h) $(objfiles_h) $(symtab_h) $(language_h) \ | |
2307 | - $(command_h) $(gdbcmd_h) $(elf_frv_h) | |
2309 | +solib-frv.o: solib-frv.c $(defs_h) $(gdb_string_h) $(inferior_h) \ | |
2310 | + $(gdbcore_h) $(solist_h) $(frv_tdep_h) $(objfiles_h) $(symtab_h) \ | |
2311 | + $(language_h) $(command_h) $(gdbcmd_h) $(elf_frv_h) | |
2308 | 2312 | solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \ |
2309 | 2313 | $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) |
2310 | 2314 | solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h) |
@@ -2414,7 +2418,7 @@ symfile.o: symfile.c $(defs_h) $(bfdlink_h) $(symtab_h) $(gdbtypes_h) \ | ||
2414 | 2418 | symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \ |
2415 | 2419 | $(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \ |
2416 | 2420 | $(gdb_obstack_h) $(language_h) $(bcache_h) $(block_h) $(gdb_regex_h) \ |
2417 | - $(dictionary_h) $(gdb_string_h) | |
2421 | + $(dictionary_h) $(gdb_string_h) $(readline_h) | |
2418 | 2422 | symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \ |
2419 | 2423 | $(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \ |
2420 | 2424 | $(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \ |
@@ -2445,6 +2449,9 @@ tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \ | ||
2445 | 2449 | $(readline_history_h) |
2446 | 2450 | trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) \ |
2447 | 2451 | $(regcache_h) |
2452 | +tramp-frame.o: tramp-frame.c $(defs_h) $(tramp_frame_h) $(frame_unwind_h) \ | |
2453 | + $(gdbcore_h) $(symtab_h) $(objfiles_h) $(target_h) $(trad_frame_h) \ | |
2454 | + $(frame_base_h) | |
2448 | 2455 | typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ |
2449 | 2456 | $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \ |
2450 | 2457 | $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(typeprint_h) \ |
@@ -2838,7 +2845,7 @@ tui-regs.o: $(srcdir)/tui/tui-regs.c $(defs_h) $(tui_h) $(tui_data_h) \ | ||
2838 | 2845 | $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(frame_h) $(regcache_h) \ |
2839 | 2846 | $(inferior_h) $(target_h) $(gdb_string_h) $(tui_layout_h) \ |
2840 | 2847 | $(tui_win_h) $(tui_windata_h) $(tui_wingeneral_h) $(tui_file_h) \ |
2841 | - $(gdb_curses_h) | |
2848 | + $(reggroups_h) $(gdb_curses_h) | |
2842 | 2849 | $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-regs.c |
2843 | 2850 | tui-source.o: $(srcdir)/tui/tui-source.c $(defs_h) $(symtab_h) $(frame_h) \ |
2844 | 2851 | $(breakpoint_h) $(source_h) $(symtab_h) $(tui_h) $(tui_data_h) \ |
@@ -111,10 +111,7 @@ frame_base_set_default (struct gdbarch *gdbarch, | ||
111 | 111 | } |
112 | 112 | |
113 | 113 | const struct frame_base * |
114 | -frame_base_find_by_frame (struct frame_info *next_frame, | |
115 | - void **this_base_cache, | |
116 | - const struct frame_unwind *unwinder, | |
117 | - void **this_prologue_cache) | |
114 | +frame_base_find_by_frame (struct frame_info *next_frame) | |
118 | 115 | { |
119 | 116 | struct gdbarch *gdbarch = get_frame_arch (next_frame); |
120 | 117 | struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data); |
@@ -29,18 +29,6 @@ struct frame_base; | ||
29 | 29 | struct gdbarch; |
30 | 30 | struct regcache; |
31 | 31 | |
32 | -/* Given the NEXT frame, take a wiff of THIS frame's registers (namely | |
33 | - the PC and attributes) and if SELF is the applicable frame-base | |
34 | - handler return non-zero. Optionally also initialize | |
35 | - THIS_BASE_CACHE. | |
36 | - | |
37 | - If THIS frame's unwinder is the same as frame-base.unwind, THIS | |
38 | - frame's prologue-cache will be passed as THIS_BASE_CACHE. */ | |
39 | - | |
40 | -typedef int (frame_base_sniffer) (const struct frame_base *self, | |
41 | - struct frame_info *next_frame, | |
42 | - void **this_base_cache); | |
43 | - | |
44 | 32 | /* Assuming the frame chain: (outer) prev <-> this <-> next (inner); |
45 | 33 | and that this is a `normal frame'; use the NEXT frame, and its |
46 | 34 | register unwind method, to determine the address of THIS frame's |
@@ -52,10 +40,7 @@ typedef int (frame_base_sniffer) (const struct frame_base *self, | ||
52 | 40 | |
53 | 41 | A typical implmentation will return the same value for base, |
54 | 42 | locals-base and args-base. That value, however, will likely be |
55 | - different to the frame ID's stack address. | |
56 | - | |
57 | - If THIS frame's unwinder is the same as frame-base.unwind, THIS | |
58 | - frame's prologue-cache will be passed as THIS_BASE_CACHE. */ | |
43 | + different to the frame ID's stack address. */ | |
59 | 44 | |
60 | 45 | /* A generic base address. */ |
61 | 46 |
@@ -80,8 +65,6 @@ struct frame_base | ||
80 | 65 | frame_this_base_ftype *this_base; |
81 | 66 | frame_this_locals_ftype *this_locals; |
82 | 67 | frame_this_args_ftype *this_args; |
83 | - const struct frame_data *base_data; | |
84 | - frame_base_sniffer *sniffer; | |
85 | 68 | }; |
86 | 69 | |
87 | 70 | /* Given the NEXT frame, return the frame base methods for THIS frame, |
@@ -95,12 +78,6 @@ typedef const struct frame_base *(frame_base_sniffer_ftype) (struct frame_info * | ||
95 | 78 | extern void frame_base_append_sniffer (struct gdbarch *gdbarch, |
96 | 79 | frame_base_sniffer_ftype *sniffer); |
97 | 80 | |
98 | -/* Register a frame base, appending it to the list that need to be | |
99 | - searched. */ | |
100 | -extern void frame_base_register_base (struct gdbarch *gdbarch, | |
101 | - const struct frame_base *base); | |
102 | - | |
103 | - | |
104 | 81 | /* Set the default frame base. If all else fails, this one is |
105 | 82 | returned. If this isn't set, the default is to use legacy code |
106 | 83 | that uses things like the frame ID's base (ulgh!). */ |
@@ -111,9 +88,6 @@ extern void frame_base_set_default (struct gdbarch *gdbarch, | ||
111 | 88 | /* Iterate through the list of frame base handlers until one returns |
112 | 89 | an implementation. */ |
113 | 90 | |
114 | -extern const struct frame_base *frame_base_find_by_frame (struct frame_info *next_frame, | |
115 | - void **this_base_cache, | |
116 | - const struct frame_unwind *unwinder, | |
117 | - void **this_prologue_cache); | |
91 | +extern const struct frame_base *frame_base_find_by_frame (struct frame_info *next_frame); | |
118 | 92 | |
119 | 93 | #endif |
@@ -2056,8 +2056,7 @@ get_frame_base_address (struct frame_info *fi) | ||
2056 | 2056 | if (get_frame_type (fi) != NORMAL_FRAME) |
2057 | 2057 | return 0; |
2058 | 2058 | if (fi->base == NULL) |
2059 | - fi->base = frame_base_find_by_frame (fi->next, &fi->base_cache, | |
2060 | - fi->unwind, &fi->prologue_cache); | |
2059 | + fi->base = frame_base_find_by_frame (fi->next); | |
2061 | 2060 | /* Sneaky: If the low-level unwind and high-level base code share a |
2062 | 2061 | common unwinder, let them share the prologue cache. */ |
2063 | 2062 | if (fi->base->unwind == fi->unwind) |
@@ -2073,8 +2072,7 @@ get_frame_locals_address (struct frame_info *fi) | ||
2073 | 2072 | return 0; |
2074 | 2073 | /* If there isn't a frame address method, find it. */ |
2075 | 2074 | if (fi->base == NULL) |
2076 | - fi->base = frame_base_find_by_frame (fi->next, &fi->base_cache, | |
2077 | - fi->unwind, &fi->prologue_cache); | |
2075 | + fi->base = frame_base_find_by_frame (fi->next); | |
2078 | 2076 | /* Sneaky: If the low-level unwind and high-level base code share a |
2079 | 2077 | common unwinder, let them share the prologue cache. */ |
2080 | 2078 | if (fi->base->unwind == fi->unwind) |
@@ -2092,8 +2090,7 @@ get_frame_args_address (struct frame_info *fi) | ||
2092 | 2090 | return 0; |
2093 | 2091 | /* If there isn't a frame address method, find it. */ |
2094 | 2092 | if (fi->base == NULL) |
2095 | - fi->base = frame_base_find_by_frame (fi->next, &fi->base_cache, | |
2096 | - fi->unwind, &fi->prologue_cache); | |
2093 | + fi->base = frame_base_find_by_frame (fi->next); | |
2097 | 2094 | /* Sneaky: If the low-level unwind and high-level base code share a |
2098 | 2095 | common unwinder, let them share the prologue cache. */ |
2099 | 2096 | if (fi->base->unwind == fi->unwind) |
@@ -235,32 +235,33 @@ ppcnbsd_sigtramp_cache_init (const struct tramp_frame *self, | ||
235 | 235 | struct trad_frame_cache *this_cache, |
236 | 236 | CORE_ADDR func) |
237 | 237 | { |
238 | + CORE_ADDR base; | |
238 | 239 | CORE_ADDR offset; |
239 | 240 | int i; |
240 | 241 | struct gdbarch *gdbarch = get_frame_arch (next_frame); |
241 | 242 | struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); |
242 | 243 | |
243 | - this_cache->this_base = frame_unwind_register_unsigned (next_frame, SP_REGNUM); | |
244 | - offset = this_cache->this_base + 0x18 + 2 * tdep->wordsize; | |
244 | + base = frame_unwind_register_unsigned (next_frame, SP_REGNUM); | |
245 | + offset = base + 0x18 + 2 * tdep->wordsize; | |
245 | 246 | for (i = 0; i < 32; i++) |
246 | 247 | { |
247 | 248 | int regnum = i + tdep->ppc_gp0_regnum; |
248 | - this_cache->prev_regs[regnum].addr = offset; | |
249 | + trad_frame_set_reg_addr (this_cache, regnum, offset); | |
249 | 250 | offset += tdep->wordsize; |
250 | 251 | } |
251 | - this_cache->prev_regs[tdep->ppc_lr_regnum].addr = offset; | |
252 | + trad_frame_set_reg_addr (this_cache, tdep->ppc_lr_regnum, offset); | |
252 | 253 | offset += tdep->wordsize; |
253 | - this_cache->prev_regs[tdep->ppc_cr_regnum].addr = offset; | |
254 | + trad_frame_set_reg_addr (this_cache, tdep->ppc_cr_regnum, offset); | |
254 | 255 | offset += tdep->wordsize; |
255 | - this_cache->prev_regs[tdep->ppc_xer_regnum].addr = offset; | |
256 | + trad_frame_set_reg_addr (this_cache, tdep->ppc_xer_regnum, offset); | |
256 | 257 | offset += tdep->wordsize; |
257 | - this_cache->prev_regs[tdep->ppc_ctr_regnum].addr = offset; | |
258 | + trad_frame_set_reg_addr (this_cache, tdep->ppc_ctr_regnum, offset); | |
258 | 259 | offset += tdep->wordsize; |
259 | - this_cache->prev_regs[PC_REGNUM].addr = offset; /* SRR0? */ | |
260 | + trad_frame_set_reg_addr (this_cache, PC_REGNUM, offset); /* SRR0? */ | |
260 | 261 | offset += tdep->wordsize; |
261 | 262 | |
262 | 263 | /* Construct the frame ID using the function start. */ |
263 | - this_cache->this_id = frame_id_build (this_cache->this_base, func); | |
264 | + trad_frame_set_id (this_cache, frame_id_build (base, func)); | |
264 | 265 | } |
265 | 266 | |
266 | 267 | /* Given the NEXT frame, examine the instructions at and around this |
@@ -24,6 +24,14 @@ | ||
24 | 24 | #include "trad-frame.h" |
25 | 25 | #include "regcache.h" |
26 | 26 | |
27 | +struct trad_frame_cache | |
28 | +{ | |
29 | + struct frame_info *next_frame; | |
30 | + CORE_ADDR this_base; | |
31 | + struct trad_frame_saved_reg *prev_regs; | |
32 | + struct frame_id this_id; | |
33 | +}; | |
34 | + | |
27 | 35 | struct trad_frame_cache * |
28 | 36 | trad_frame_cache_zalloc (struct frame_info *next_frame) |
29 | 37 | { |
@@ -31,6 +39,7 @@ trad_frame_cache_zalloc (struct frame_info *next_frame) | ||
31 | 39 | |
32 | 40 | this_trad_cache = FRAME_OBSTACK_ZALLOC (struct trad_frame_cache); |
33 | 41 | this_trad_cache->prev_regs = trad_frame_alloc_saved_regs (next_frame); |
42 | + this_trad_cache->next_frame = next_frame; | |
34 | 43 | return this_trad_cache; |
35 | 44 | } |
36 | 45 |
@@ -89,6 +98,13 @@ trad_frame_set_value (struct trad_frame_saved_reg this_saved_regs[], | ||
89 | 98 | } |
90 | 99 | |
91 | 100 | void |
101 | +trad_frame_set_reg_addr (struct trad_frame_cache *this_trad_cache, | |
102 | + int regnum, CORE_ADDR addr) | |
103 | +{ | |
104 | + this_trad_cache->prev_regs[regnum].addr = addr; | |
105 | +} | |
106 | + | |
107 | +void | |
92 | 108 | trad_frame_set_unknown (struct trad_frame_saved_reg this_saved_regs[], |
93 | 109 | int regnum) |
94 | 110 | { |
@@ -142,3 +158,29 @@ trad_frame_prev_register (struct frame_info *next_frame, | ||
142 | 158 | gdbarch_register_name (gdbarch, regnum)); |
143 | 159 | } |
144 | 160 | } |
161 | + | |
162 | +void | |
163 | +trad_frame_get_register (struct trad_frame_cache *this_trad_cache, | |
164 | + struct frame_info *next_frame, | |
165 | + int regnum, int *optimizedp, | |
166 | + enum lval_type *lvalp, CORE_ADDR *addrp, | |
167 | + int *realregp, void *bufferp) | |
168 | +{ | |
169 | + trad_frame_prev_register (next_frame, this_trad_cache->prev_regs, | |
170 | + regnum, optimizedp, lvalp, addrp, realregp, | |
171 | + bufferp); | |
172 | +} | |
173 | + | |
174 | +void | |
175 | +trad_frame_set_id (struct trad_frame_cache *this_trad_cache, | |
176 | + struct frame_id this_id) | |
177 | +{ | |
178 | + this_trad_cache->this_id = this_id; | |
179 | +} | |
180 | + | |
181 | +void | |
182 | +trad_frame_get_id (struct trad_frame_cache *this_trad_cache, | |
183 | + struct frame_id *this_id) | |
184 | +{ | |
185 | + (*this_id) = this_trad_cache->this_id; | |
186 | +} |
@@ -26,15 +26,23 @@ | ||
26 | 26 | |
27 | 27 | struct frame_info; |
28 | 28 | |
29 | -struct trad_frame_cache | |
30 | -{ | |
31 | - CORE_ADDR this_base; | |
32 | - struct trad_frame_saved_reg *prev_regs; | |
33 | - struct frame_id this_id; | |
34 | -}; | |
29 | +struct trad_frame_cache; | |
35 | 30 | |
36 | 31 | struct trad_frame_cache *trad_frame_cache_zalloc (struct frame_info *next_frame); |
37 | 32 | |
33 | +void trad_frame_set_id (struct trad_frame_cache *this_trad_cache, | |
34 | + struct frame_id this_id); | |
35 | +void trad_frame_get_id (struct trad_frame_cache *this_trad_cache, | |
36 | + struct frame_id *this_id); | |
37 | + | |
38 | +void trad_frame_set_reg_addr (struct trad_frame_cache *this_trad_cache, | |
39 | + int regnum, CORE_ADDR addr); | |
40 | +void trad_frame_get_register (struct trad_frame_cache *this_trad_cache, | |
41 | + struct frame_info *next_frame, | |
42 | + int regnum, int *optimizedp, | |
43 | + enum lval_type *lvalp, CORE_ADDR *addrp, | |
44 | + int *realregp, void *bufferp); | |
45 | + | |
38 | 46 | /* A traditional saved regs table, indexed by REGNUM, encoding where |
39 | 47 | the value of REGNUM for the previous frame can be found in this |
40 | 48 | frame. |
@@ -65,7 +65,7 @@ tramp_frame_this_id (struct frame_info *next_frame, | ||
65 | 65 | { |
66 | 66 | struct trad_frame_cache *trad_cache |
67 | 67 | = tramp_frame_cache (next_frame, this_cache); |
68 | - (*this_id) = trad_cache->this_id; | |
68 | + trad_frame_get_id (trad_cache, this_id); | |
69 | 69 | } |
70 | 70 | |
71 | 71 | static void |
@@ -79,8 +79,8 @@ tramp_frame_prev_register (struct frame_info *next_frame, | ||
79 | 79 | { |
80 | 80 | struct trad_frame_cache *trad_cache |
81 | 81 | = tramp_frame_cache (next_frame, this_cache); |
82 | - trad_frame_prev_register (next_frame, trad_cache->prev_regs, prev_regnum, | |
83 | - optimizedp, lvalp, addrp, realnump, valuep); | |
82 | + trad_frame_get_register (trad_cache, next_frame, prev_regnum, optimizedp, | |
83 | + lvalp, addrp, realnump, valuep); | |
84 | 84 | } |
85 | 85 | |
86 | 86 | static CORE_ADDR |