Lines 8754-8761
dwarf2_fundamental_type (struct objfile
Link Here
|
8754 |
callers will only want a very basic result and this can become a |
8754 |
callers will only want a very basic result and this can become a |
8755 |
complaint. |
8755 |
complaint. |
8756 |
|
8756 |
|
8757 |
Note that stack[0] is unused except as a default error return. |
8757 |
Note that stack[0] is unused except as a default error return. */ |
8758 |
Note that stack overflow is not yet handled. */ |
|
|
8759 |
|
8758 |
|
8760 |
static CORE_ADDR |
8759 |
static CORE_ADDR |
8761 |
decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) |
8760 |
decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) |
Lines 8772-8778
decode_locdesc (struct dwarf_block *blk,
Link Here
|
8772 |
|
8771 |
|
8773 |
i = 0; |
8772 |
i = 0; |
8774 |
stacki = 0; |
8773 |
stacki = 0; |
8775 |
stack[stacki] = 0; |
8774 |
stack[++stacki] = 0; |
8776 |
|
8775 |
|
8777 |
while (i < size) |
8776 |
while (i < size) |
8778 |
{ |
8777 |
{ |
Lines 8951-8956
decode_locdesc (struct dwarf_block *blk,
Link Here
|
8951 |
dwarf_stack_op_name (op)); |
8950 |
dwarf_stack_op_name (op)); |
8952 |
return (stack[stacki]); |
8951 |
return (stack[stacki]); |
8953 |
} |
8952 |
} |
|
|
8953 |
/* Enforce maximum stack depth of size-1 to avoid ++stacki writing |
8954 |
outside of the allocated space. Also enforce minimum > 0. |
8955 |
-- wad@google.com 14 Aug 2006 */ |
8956 |
if (stacki >= sizeof (stack) / sizeof (*stack) - 1) |
8957 |
internal_error (__FILE__, __LINE__, |
8958 |
_("location description stack too deep: %d"), |
8959 |
stacki); |
8960 |
if (stacki <= 0) |
8961 |
internal_error (__FILE__, __LINE__, |
8962 |
_("location description stack too shallow")); |
8954 |
} |
8963 |
} |
8955 |
return (stack[stacki]); |
8964 |
return (stack[stacki]); |
8956 |
} |
8965 |
} |