GNU Binutils with patches for OS216
修訂 | e3ecf7c8474926a46815f21edb56270b594fe7e6 (tree) |
---|---|
時間 | 2003-03-27 05:33:47 |
作者 | Andrew Cagney <cagney@redh...> |
Commiter | Andrew Cagney |
2003-03-26 Andrew Cagney <cagney@redhat.com>
Add frame debug info addresses:
* frame-base.c: New file.
* frame-base.h: New file.
* frame.h (struct frame_base): Add opaque declaration.
(get_frame_base): Update comment.
(get_frame_base_address): Declare.
(get_frame_locals_address): Declare.
(get_frame_args_address): Declare.
(struct frame_info): Add "base" and "base_cache". Update
comments on the unwinder.
* frame.c: Include "frame-base.h".
(get_frame_locals_address): New function.
(get_frame_base_address): New function.
(get_frame_args_address): New function.
* findvar.c (read_var_value): Use get_frame_locals_address.
* stack.c (frame_info): Use get_frame_locals_address and
get_frame_args_address.
(FRAME_ARGS_ADDRESS_CORRECT): Delete conditionally defined macro,
moved to "frame-base.c".
* Makefile.in (frame_base_h): Define.
(frame.o): Update dependencies.
(d10v-tdep.o): Update dependencies.
(frame-base.o): Add dependencies.
(SFILES): Add frame-base.c.
(COMMON_OBS): Add frame-base.o.
* printcmd.c (print_frame_nameless_args): Ditto.
* symtab.h (address_class): Update comments.
* dwarf2loc.c (dwarf_expr_frame_base): Add note about
get_frame_base_address.
* dwarf2expr.c (execute_stack_op): Ditto.
* d10v-tdep.c: Include "frame-base.h".
(d10v_frame_unwind): Make constant.
(d10v_frame_base_address): New function.
(d10v_frame_base): New variable.
(d10v_gdbarch_init): Set frame_base default.
@@ -1,3 +1,41 @@ | ||
1 | +2003-03-26 Andrew Cagney <cagney@redhat.com> | |
2 | + | |
3 | + Add frame debug info addresses: | |
4 | + * frame-base.c: New file. | |
5 | + * frame-base.h: New file. | |
6 | + * frame.h (struct frame_base): Add opaque declaration. | |
7 | + (get_frame_base): Update comment. | |
8 | + (get_frame_base_address): Declare. | |
9 | + (get_frame_locals_address): Declare. | |
10 | + (get_frame_args_address): Declare. | |
11 | + (struct frame_info): Add "base" and "base_cache". Update | |
12 | + comments on the unwinder. | |
13 | + * frame.c: Include "frame-base.h". | |
14 | + (get_frame_locals_address): New function. | |
15 | + (get_frame_base_address): New function. | |
16 | + (get_frame_args_address): New function. | |
17 | + * findvar.c (read_var_value): Use get_frame_locals_address. | |
18 | + * stack.c (frame_info): Use get_frame_locals_address and | |
19 | + get_frame_args_address. | |
20 | + (FRAME_ARGS_ADDRESS_CORRECT): Delete conditionally defined macro, | |
21 | + moved to "frame-base.c". | |
22 | + * Makefile.in (frame_base_h): Define. | |
23 | + (frame.o): Update dependencies. | |
24 | + (d10v-tdep.o): Update dependencies. | |
25 | + (frame-base.o): Add dependencies. | |
26 | + (SFILES): Add frame-base.c. | |
27 | + (COMMON_OBS): Add frame-base.o. | |
28 | + * printcmd.c (print_frame_nameless_args): Ditto. | |
29 | + * symtab.h (address_class): Update comments. | |
30 | + * dwarf2loc.c (dwarf_expr_frame_base): Add note about | |
31 | + get_frame_base_address. | |
32 | + * dwarf2expr.c (execute_stack_op): Ditto. | |
33 | + * d10v-tdep.c: Include "frame-base.h". | |
34 | + (d10v_frame_unwind): Make constant. | |
35 | + (d10v_frame_base_address): New function. | |
36 | + (d10v_frame_base): New variable. | |
37 | + (d10v_gdbarch_init): Set frame_base default. | |
38 | + | |
1 | 39 | 2003-03-26 Daniel Jacobowitz <drow@mvista.com> |
2 | 40 | |
3 | 41 | * breakpoint.c (handle_gnu_4_16_catch_command, get_catch_sals) |
@@ -517,6 +517,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \ | ||
517 | 517 | dummy-frame.c dwarfread.c dwarf2expr.c dwarf2loc.c dwarf2read.c \ |
518 | 518 | elfread.c environ.c eval.c event-loop.c event-top.c expprint.c \ |
519 | 519 | f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c frame.c \ |
520 | + frame-base.c \ | |
520 | 521 | frame-unwind.c \ |
521 | 522 | gdbarch.c arch-utils.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \ |
522 | 523 | hpacc-abi.c \ |
@@ -641,6 +642,7 @@ expression_h = expression.h $(symtab_h) $(doublest_h) | ||
641 | 642 | f_lang_h = f-lang.h |
642 | 643 | frame_h = frame.h |
643 | 644 | frame_unwind_h = frame-unwind.h |
645 | +frame_base_h = frame-base.h | |
644 | 646 | gdb_events_h = gdb-events.h |
645 | 647 | gdb_stabs_h = gdb-stabs.h |
646 | 648 | gdb_h = gdb.h |
@@ -858,6 +860,7 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o regcache.o \ | ||
858 | 860 | nlmread.o serial.o mdebugread.o top.o utils.o \ |
859 | 861 | ui-file.o \ |
860 | 862 | frame.o frame-unwind.o doublest.o \ |
863 | + frame-base.o \ | |
861 | 864 | gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o \ |
862 | 865 | reggroups.o |
863 | 866 |
@@ -1618,11 +1621,11 @@ cris-tdep.o: cris-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(inferior_h) \ | ||
1618 | 1621 | $(gdbtypes_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(value_h) \ |
1619 | 1622 | $(opcode_cris_h) $(arch_utils_h) $(regcache_h) $(symfile_h) \ |
1620 | 1623 | $(solib_h) $(solib_svr4_h) $(gdb_string_h) |
1621 | -d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \ | |
1622 | - $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) $(inferior_h) \ | |
1623 | - $(dis_asm_h) $(symfile_h) $(objfiles_h) $(language_h) $(arch_utils_h) \ | |
1624 | - $(regcache_h) $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) \ | |
1625 | - $(gdb_assert_h) | |
1624 | +d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ | |
1625 | + $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ | |
1626 | + $(gdb_string_h) $(value_h) $(inferior_h) $(dis_asm_h) $(symfile_h) \ | |
1627 | + $(objfiles_h) $(language_h) $(arch_utils_h) $(regcache_h) \ | |
1628 | + $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) $(gdb_assert_h) | |
1626 | 1629 | dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ |
1627 | 1630 | $(serial_h) $(regcache_h) $(m68k_tdep_h) |
1628 | 1631 | dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \ |
@@ -1702,9 +1705,10 @@ fork-child.o: fork-child.c $(defs_h) $(gdb_string_h) $(frame_h) \ | ||
1702 | 1705 | $(terminal_h) $(gdbthread_h) $(command_h) |
1703 | 1706 | frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \ |
1704 | 1707 | $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(builtin_regs_h) \ |
1705 | - $(gdb_obstack_h) $(dummy_frame_h) $(gdbcore_h) $(annotate_h) \ | |
1706 | - $(language_h) $(frame_unwind_h) $(command_h) $(gdbcmd_h) \ | |
1707 | - $(sentinel_frame_h) | |
1708 | + $(gdb_obstack_h) $(dummy_frame_h) $(sentinel_frame_h) $(gdbcore_h) \ | |
1709 | + $(annotate_h) $(language_h) $(frame_unwind_h) $(frame_base_h) \ | |
1710 | + $(command_h) $(gdbcmd_h) | |
1711 | +frame-base.o: frame-base.c $(defs_h) $(frame_base_h) | |
1708 | 1712 | frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \ |
1709 | 1713 | $(gdb_assert_h) $(dummy_frame_h) $(legacy_frame_h) |
1710 | 1714 | frv-tdep.o: frv-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \ |
@@ -25,6 +25,7 @@ | ||
25 | 25 | #include "defs.h" |
26 | 26 | #include "frame.h" |
27 | 27 | #include "frame-unwind.h" |
28 | +#include "frame-base.h" | |
28 | 29 | #include "symtab.h" |
29 | 30 | #include "gdbtypes.h" |
30 | 31 | #include "gdbcmd.h" |
@@ -1558,8 +1559,7 @@ d10v_frame_prev_register (struct frame_info *next_frame, | ||
1558 | 1559 | } |
1559 | 1560 | } |
1560 | 1561 | |
1561 | - | |
1562 | -static struct frame_unwind d10v_frame_unwind = { | |
1562 | +static const struct frame_unwind d10v_frame_unwind = { | |
1563 | 1563 | d10v_frame_this_id, |
1564 | 1564 | d10v_frame_prev_register |
1565 | 1565 | }; |
@@ -1570,6 +1570,21 @@ d10v_frame_p (CORE_ADDR pc) | ||
1570 | 1570 | return &d10v_frame_unwind; |
1571 | 1571 | } |
1572 | 1572 | |
1573 | +static CORE_ADDR | |
1574 | +d10v_frame_base_address (struct frame_info *next_frame, void **this_cache) | |
1575 | +{ | |
1576 | + struct d10v_unwind_cache *info | |
1577 | + = d10v_frame_unwind_cache (next_frame, this_cache); | |
1578 | + return info->base; | |
1579 | +} | |
1580 | + | |
1581 | +static const struct frame_base d10v_frame_base = { | |
1582 | + &d10v_frame_unwind, | |
1583 | + d10v_frame_base_address, | |
1584 | + d10v_frame_base_address, | |
1585 | + d10v_frame_base_address | |
1586 | +}; | |
1587 | + | |
1573 | 1588 | /* Assuming NEXT_FRAME->prev is a dummy, return the frame ID of that |
1574 | 1589 | dummy frame. The frame ID's base needs to match the TOS value |
1575 | 1590 | saved by save_dummy_frame_tos(), and the PC match the dummy frame's |
@@ -1719,6 +1734,7 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1719 | 1734 | set_gdbarch_print_registers_info (gdbarch, d10v_print_registers_info); |
1720 | 1735 | |
1721 | 1736 | frame_unwind_append_predicate (gdbarch, d10v_frame_p); |
1737 | + frame_base_set_default (gdbarch, &d10v_frame_base); | |
1722 | 1738 | |
1723 | 1739 | /* Methods for saving / extracting a dummy frame's ID. */ |
1724 | 1740 | set_gdbarch_unwind_dummy_id (gdbarch, d10v_unwind_dummy_id); |
@@ -454,6 +454,9 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr, | ||
454 | 454 | afterwards, effectively erasing whatever the recursive |
455 | 455 | call put there. */ |
456 | 456 | before_stack_len = ctx->stack_len; |
457 | + /* FIXME: cagney/2003-03-26: This code should be using | |
458 | + get_frame_base_address(), and then implement a dwarf2 | |
459 | + specific this_base method. */ | |
457 | 460 | (ctx->get_frame_base) (ctx->baton, &datastart, &datalen); |
458 | 461 | dwarf_expr_eval (ctx, datastart, datalen); |
459 | 462 | result = dwarf_expr_fetch (ctx, 0); |
@@ -87,6 +87,9 @@ dwarf_expr_read_mem (void *baton, char *buf, CORE_ADDR addr, size_t len) | ||
87 | 87 | static void |
88 | 88 | dwarf_expr_frame_base (void *baton, unsigned char **start, size_t * length) |
89 | 89 | { |
90 | + /* FIXME: cagney/2003-03-26: This code should be using | |
91 | + get_frame_base_address(), and then implement a dwarf2 specific | |
92 | + this_base method. */ | |
90 | 93 | struct symbol *framefunc; |
91 | 94 | struct dwarf2_locexpr_baton *symbaton; |
92 | 95 | struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton; |
@@ -533,7 +533,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i | ||
533 | 533 | case LOC_LOCAL_ARG: |
534 | 534 | if (frame == NULL) |
535 | 535 | return 0; |
536 | - addr = FRAME_LOCALS_ADDRESS (frame); | |
536 | + addr = get_frame_locals_address (frame); | |
537 | 537 | addr += SYMBOL_VALUE (var); |
538 | 538 | break; |
539 | 539 |
@@ -36,6 +36,7 @@ | ||
36 | 36 | #include "annotate.h" |
37 | 37 | #include "language.h" |
38 | 38 | #include "frame-unwind.h" |
39 | +#include "frame-base.h" | |
39 | 40 | #include "command.h" |
40 | 41 | #include "gdbcmd.h" |
41 | 42 |
@@ -1627,6 +1628,58 @@ get_frame_base (struct frame_info *fi) | ||
1627 | 1628 | return fi->frame; |
1628 | 1629 | } |
1629 | 1630 | |
1631 | +/* High-level offsets into the frame. Used by the debug info. */ | |
1632 | + | |
1633 | +CORE_ADDR | |
1634 | +get_frame_base_address (struct frame_info *fi) | |
1635 | +{ | |
1636 | + if (fi->type != NORMAL_FRAME) | |
1637 | + return 0; | |
1638 | + if (fi->base == NULL) | |
1639 | + fi->base = frame_base_find_by_pc (current_gdbarch, get_frame_pc (fi)); | |
1640 | + /* Sneaky: If the low-level unwind and high-level base code share a | |
1641 | + common unwinder, let them share the prologue cache. */ | |
1642 | + if (fi->base->unwind == fi->unwind) | |
1643 | + return fi->base->this_base (fi->next, &fi->prologue_cache); | |
1644 | + return fi->base->this_base (fi->next, &fi->base_cache); | |
1645 | +} | |
1646 | + | |
1647 | +CORE_ADDR | |
1648 | +get_frame_locals_address (struct frame_info *fi) | |
1649 | +{ | |
1650 | + void **cache; | |
1651 | + if (fi->type != NORMAL_FRAME) | |
1652 | + return 0; | |
1653 | + /* If there isn't a frame address method, find it. */ | |
1654 | + if (fi->base == NULL) | |
1655 | + fi->base = frame_base_find_by_pc (current_gdbarch, get_frame_pc (fi)); | |
1656 | + /* Sneaky: If the low-level unwind and high-level base code share a | |
1657 | + common unwinder, let them share the prologue cache. */ | |
1658 | + if (fi->base->unwind == fi->unwind) | |
1659 | + cache = &fi->prologue_cache; | |
1660 | + else | |
1661 | + cache = &fi->base_cache; | |
1662 | + return fi->base->this_locals (fi->next, cache); | |
1663 | +} | |
1664 | + | |
1665 | +CORE_ADDR | |
1666 | +get_frame_args_address (struct frame_info *fi) | |
1667 | +{ | |
1668 | + void **cache; | |
1669 | + if (fi->type != NORMAL_FRAME) | |
1670 | + return 0; | |
1671 | + /* If there isn't a frame address method, find it. */ | |
1672 | + if (fi->base == NULL) | |
1673 | + fi->base = frame_base_find_by_pc (current_gdbarch, get_frame_pc (fi)); | |
1674 | + /* Sneaky: If the low-level unwind and high-level base code share a | |
1675 | + common unwinder, let them share the prologue cache. */ | |
1676 | + if (fi->base->unwind == fi->unwind) | |
1677 | + cache = &fi->prologue_cache; | |
1678 | + else | |
1679 | + cache = &fi->base_cache; | |
1680 | + return fi->base->this_args (fi->next, cache); | |
1681 | +} | |
1682 | + | |
1630 | 1683 | /* Level of the selected frame: 0 for innermost, 1 for its caller, ... |
1631 | 1684 | or -1 for a NULL frame. */ |
1632 | 1685 |
@@ -25,6 +25,7 @@ | ||
25 | 25 | |
26 | 26 | struct symtab_and_line; |
27 | 27 | struct frame_unwind; |
28 | +struct frame_base; | |
28 | 29 | struct block; |
29 | 30 | |
30 | 31 | /* A legacy unwinder to prop up architectures using the old style |
@@ -169,47 +170,25 @@ extern CORE_ADDR get_frame_pc (struct frame_info *); | ||
169 | 170 | extern void find_frame_sal (struct frame_info *frame, |
170 | 171 | struct symtab_and_line *sal); |
171 | 172 | |
172 | -/* Return the frame address from FI. Except in the machine-dependent | |
173 | - *FRAME* macros, a frame address has no defined meaning other than | |
174 | - as a magic cookie which identifies a frame over calls to the | |
175 | - inferior (um, SEE NOTE BELOW). The only known exception is | |
176 | - inferior.h (DEPRECATED_PC_IN_CALL_DUMMY) [ON_STACK]; see comments | |
177 | - there. You cannot assume that a frame address contains enough | |
178 | - information to reconstruct the frame; if you want more than just to | |
179 | - identify the frame (e.g. be able to fetch variables relative to | |
180 | - that frame), then save the whole struct frame_info (and the next | |
181 | - struct frame_info, since the latter is used for fetching variables | |
182 | - on some machines) (um, again SEE NOTE BELOW). | |
183 | - | |
184 | - NOTE: cagney/2002-11-18: Actually, the frame address isn't | |
185 | - sufficient for identifying a frame, and the counter examples are | |
186 | - wrong! | |
187 | - | |
188 | - Code that needs to (re)identify a frame must use get_frame_id() and | |
189 | - frame_find_by_id() (and in the future, a frame_compare() function | |
190 | - instead of INNER_THAN()). Two reasons: an architecture (e.g., | |
191 | - ia64) can have more than one frame address (due to multiple stack | |
192 | - pointers) (frame ID is going to be expanded to accomodate this); | |
193 | - successive frameless function calls can only be differientated by | |
194 | - comparing both the frame's base and the frame's enclosing function | |
195 | - (frame_find_by_id() is going to be modified to perform this test). | |
196 | - | |
197 | - The generic dummy frame version of DEPRECATED_PC_IN_CALL_DUMMY() is | |
198 | - able to identify a dummy frame using only the PC value. So the | |
199 | - frame address is not needed. In fact, most | |
200 | - DEPRECATED_PC_IN_CALL_DUMMY() calls now pass zero as the frame/sp | |
201 | - values as the caller knows that those values won't be used. Once | |
202 | - all architectures are using generic dummy frames, | |
203 | - DEPRECATED_PC_IN_CALL_DUMMY() can drop the sp/frame parameters. | |
204 | - When it comes to finding a dummy frame, the next frame's frame ID | |
205 | - (with out duing an unwind) can be used (ok, could if it wasn't for | |
206 | - the need to change the way the PPC defined frame base in a strange | |
207 | - way). | |
208 | - | |
209 | - Modern architectures should be using something like dwarf2's | |
210 | - location expression to describe where a variable lives. Such | |
211 | - expressions specify their own debug info centric frame address. | |
212 | - Consequently, a generic frame address is pretty meaningless. */ | |
173 | +/* Return the frame base (what ever that is) (DEPRECATED). | |
174 | + | |
175 | + Old code was trying to use this single method for two conflicting | |
176 | + purposes. Such code needs to be updated to use either of: | |
177 | + | |
178 | + get_frame_id: A low level frame unique identifier, that consists of | |
179 | + both a stack and a function address, that can be used to uniquely | |
180 | + identify a frame. This value is determined by the frame's | |
181 | + low-level unwinder, the stack part [typically] being the | |
182 | + top-of-stack of the previous frame, and the function part being the | |
183 | + function's start address. Since the correct identification of a | |
184 | + frameless function requires both the a stack and function address, | |
185 | + the old get_frame_base method was not sufficient. | |
186 | + | |
187 | + get_frame_base_address: get_frame_locals_address: | |
188 | + get_frame_args_address: A set of high-level debug-info dependant | |
189 | + addresses that fall within the frame. These addresses almost | |
190 | + certainly will not match the stack address part of a frame ID (as | |
191 | + returned by get_frame_base). */ | |
213 | 192 | |
214 | 193 | extern CORE_ADDR get_frame_base (struct frame_info *); |
215 | 194 |
@@ -218,6 +197,25 @@ extern CORE_ADDR get_frame_base (struct frame_info *); | ||
218 | 197 | FI is NULL, return the null_frame_id. */ |
219 | 198 | extern struct frame_id get_frame_id (struct frame_info *fi); |
220 | 199 | |
200 | +/* Assuming that a frame is `normal', return its base-address, or 0 if | |
201 | + the information isn't available. NOTE: This address is really only | |
202 | + meaningful to the frame's high-level debug info. */ | |
203 | +extern CORE_ADDR get_frame_base_address (struct frame_info *); | |
204 | + | |
205 | +/* Assuming that a frame is `normal', return the address of the first | |
206 | + local variable, or 0 if the information isn't available. NOTE: | |
207 | + This address is really only meaningful to the frame's high-level | |
208 | + debug info. Typically, the argument and locals share a single | |
209 | + base-address. */ | |
210 | +extern CORE_ADDR get_frame_locals_address (struct frame_info *); | |
211 | + | |
212 | +/* Assuming that a frame is `normal', return the address of the first | |
213 | + parameter, or 0 if that information isn't available. NOTE: This | |
214 | + address is really only meaningful to the frame's high-level debug | |
215 | + info. Typically, the argument and locals share a single | |
216 | + base-address. */ | |
217 | +extern CORE_ADDR get_frame_args_address (struct frame_info *); | |
218 | + | |
221 | 219 | /* The frame's level: 0 for innermost, 1 for its caller, ...; or -1 |
222 | 220 | for an invalid frame). */ |
223 | 221 | extern int frame_relative_level (struct frame_info *fi); |
@@ -398,11 +396,12 @@ struct frame_info | ||
398 | 396 | related unwind data. */ |
399 | 397 | struct context *context; |
400 | 398 | |
401 | - /* Prologue cache shared between the unwind functions. See | |
402 | - "frame-unwind.h" for more information. */ | |
399 | + /* The frame's low-level unwinder and corresponding cache. The | |
400 | + low-level unwinder is responsible for unwinding register values | |
401 | + for the previous frame. The low-level unwind methods are | |
402 | + selected based on the presence, or otherwize, of register | |
403 | + unwind information such as CFI. */ | |
403 | 404 | void *prologue_cache; |
404 | - | |
405 | - /* The frame's unwinder. */ | |
406 | 405 | const struct frame_unwind *unwind; |
407 | 406 | |
408 | 407 | /* Cached copy of the previous frame's resume address. */ |
@@ -413,6 +412,12 @@ struct frame_info | ||
413 | 412 | redundant information. */ |
414 | 413 | struct frame_id id; |
415 | 414 | |
415 | + /* The frame's high-level base methods, and corresponding cache. | |
416 | + The high level base methods are selected based on the frame's | |
417 | + debug info. */ | |
418 | + const struct frame_base *base; | |
419 | + void *base_cache; | |
420 | + | |
416 | 421 | /* Pointers to the next (down, inner, younger) and previous (up, |
417 | 422 | outer, older) frame_info's in the frame cache. */ |
418 | 423 | struct frame_info *next; /* down, inner, younger */ |
@@ -1959,7 +1959,7 @@ print_frame_nameless_args (struct frame_info *fi, long start, int num, | ||
1959 | 1959 | #ifdef NAMELESS_ARG_VALUE |
1960 | 1960 | NAMELESS_ARG_VALUE (fi, start, &arg_value); |
1961 | 1961 | #else |
1962 | - argsaddr = FRAME_ARGS_ADDRESS (fi); | |
1962 | + argsaddr = get_frame_args_address (fi); | |
1963 | 1963 | if (!argsaddr) |
1964 | 1964 | return; |
1965 | 1965 |
@@ -600,16 +600,6 @@ parse_frame_specification (char *frame_exp) | ||
600 | 600 | /* NOTREACHED */ |
601 | 601 | } |
602 | 602 | |
603 | -/* FRAME_ARGS_ADDRESS_CORRECT is just like FRAME_ARGS_ADDRESS except | |
604 | - that if it is unsure about the answer, it returns 0 | |
605 | - instead of guessing (this happens on the VAX and i960, for example). | |
606 | - | |
607 | - On most machines, we never have to guess about the args address, | |
608 | - so FRAME_ARGS_ADDRESS{,_CORRECT} are the same. */ | |
609 | -#if !defined (FRAME_ARGS_ADDRESS_CORRECT) | |
610 | -#define FRAME_ARGS_ADDRESS_CORRECT FRAME_ARGS_ADDRESS | |
611 | -#endif | |
612 | - | |
613 | 603 | /* Print verbosely the selected frame or the frame at address ADDR. |
614 | 604 | This means absolutely all information in the frame is printed. */ |
615 | 605 |
@@ -743,7 +733,7 @@ frame_info (char *addr_exp, int from_tty) | ||
743 | 733 | |
744 | 734 | { |
745 | 735 | /* Address of the argument list for this frame, or 0. */ |
746 | - CORE_ADDR arg_list = FRAME_ARGS_ADDRESS_CORRECT (fi); | |
736 | + CORE_ADDR arg_list = get_frame_args_address (fi); | |
747 | 737 | /* Number of args for this frame, or -1 if unknown. */ |
748 | 738 | int numargs; |
749 | 739 |
@@ -770,7 +760,7 @@ frame_info (char *addr_exp, int from_tty) | ||
770 | 760 | } |
771 | 761 | { |
772 | 762 | /* Address of the local variables for this frame, or 0. */ |
773 | - CORE_ADDR arg_list = FRAME_LOCALS_ADDRESS (fi); | |
763 | + CORE_ADDR arg_list = get_frame_locals_address (fi); | |
774 | 764 | |
775 | 765 | if (arg_list == 0) |
776 | 766 | printf_filtered (" Locals at unknown address,"); |
@@ -402,8 +402,8 @@ enum address_class | ||
402 | 402 | /* Value is in register number SYMBOL_VALUE. Just like LOC_REGISTER |
403 | 403 | except this is an argument. Probably the cleaner way to handle |
404 | 404 | this would be to separate address_class (which would include |
405 | - separate ARG and LOCAL to deal with FRAME_ARGS_ADDRESS versus | |
406 | - FRAME_LOCALS_ADDRESS), and an is_argument flag. | |
405 | + separate ARG and LOCAL to deal with get_frame_args_address() | |
406 | + versus get_frame_locals_address()), and an is_argument flag. | |
407 | 407 | |
408 | 408 | For some symbol formats (stabs, for some compilers at least), |
409 | 409 | the compiler generates two symbols, an argument and a register. |
@@ -447,9 +447,9 @@ enum address_class | ||
447 | 447 | |
448 | 448 | /* Value is arg at SYMBOL_VALUE offset in stack frame. Differs from |
449 | 449 | LOC_LOCAL in that symbol is an argument; differs from LOC_ARG in |
450 | - that we find it in the frame (FRAME_LOCALS_ADDRESS), not in the | |
451 | - arglist (FRAME_ARGS_ADDRESS). Added for i960, which passes args | |
452 | - in regs then copies to frame. */ | |
450 | + that we find it in the frame (get_frame_locals_address()), not in | |
451 | + the arglist (get_frame_args_address()). Added for i960, which | |
452 | + passes args in regs then copies to frame. */ | |
453 | 453 | |
454 | 454 | LOC_LOCAL_ARG, |
455 | 455 |