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