* frame.h (frame_unwinder_is): Declare.
* frame.c (frame_unwinder_is): New function.
* dwarf2loc.c: Include dwarf2-frame.h.
(dwarf_expr_frame_cfa): New function.
(dwarf2_evaluate_loc_desc): Use it.
(needs_frame_frame_cfa): New function.
(dwarf2_loc_desc_needs_frame): Use it.
* dwarf2expr.h (struct dwarf_expr_context) <get_frame_cfa>: New
field.
* dwarf2expr.c (execute_stack_op) <DW_OP_call_frame_cfa>: New
case.
* dwarf2-frame.h (dwarf2_frame_cfa): Declare.
* dwarf2-frame.c (no_get_frame_cfa): New function.
(execute_stack_op): Use it.
(dwarf2_frame_cfa): New function.
gdb/testsuite
* gdb.dwarf2/callframecfa.exp: New file.
* gdb.dwarf2/callframecfa.S: New file.
2009-06-30 Paul Pluzhnikov <ppluzhnikov@google.com>
gdb/10275
* dwarf2-frame.c (dwarf2_frame_state): Move cfa_offset, cfa_reg,
cfa_how and cfa_exp into regs and adjust users.
testsuite/ChangeLog:
2009-06-30 Paul Pluzhnikov <ppluzhnikov@google.com>
gdb/10275
* gdb.dwarf2/dw2-restore.{S,exp}: New test.
* dwarf2read.c
(new_symbol <DW_TAG_variable> <!DW_AT_location> <DW_AT_external>):
Create the symbol in local scope.
* symtab.h (cu->list_in_scope <LOC_UNRESOLVED>): New comment part.
gdb/testsuite/
* gdb.dwarf2/dw2-unresolved-main.c, gdb.dwarf2/dw2-unresolved.S,
gdb.dwarf2/dw2-unresolved.exp: New.
(find_partial_die,follow_die_ref): Use it.
* gdb.dwarf2/dw2-cu-size.exp: New file.
* gdb.dwarf2/dw2-cu-size.S: New file.
* gdb.dwarf2/dw2-intercu.S (.Ltype_int_in_cu2): Renamed from
.Ltype_int for clarity.
* Makefile.in: Update dependencies.
* dwarf2read.c: Include "addrmap.h"
(struct dwarf2_cu): New fields RANGES_OFFSET and HAS_RANGES_OFFSET.
(dwarf2_ranges_read): New prototype.
(dwarf2_build_psymtabs_hard): Initialize and prepare PSYMTABS_ADDRMAP.
Add discontiguous range to PSYMTABS_ADDRMAP by DWARF2_RANGES_READ on
HAS_RANGES_OFFSET, otherwise add there the contiguous range.
(dwarf2_ranges_read): New parameter RANGES_PST, update the function
comment for it. Add the found ranges to RANGES_PST. New variable
BASEADDR, initialize it the common way.
(dwarf2_get_pc_bounds): Update the caller for the new parameter.
(read_partial_die): `DW_AT_ranges' now only sets RANGES_OFFSET and
HAS_RANGES_OFFSET for the later processing.
* objfiles.h (struct objfile): New field PSYMTABS_ADDRMAP.
* symtab.c: Include "addrmap.h"
(find_pc_sect_psymtab): Support reading the field PSYMTABS_ADDRMAP.
Move the psymtab locator into ...
(find_pc_sect_psymtab_closer): ... a new function.
gdb/testsuite/
* gdb.dwarf2/dw2-ranges.S: Merge the secondary section with `.fini'.
* gdb.dwarf2/dw2-ranges.exp: Compile also `dw2-ranges2.S' and
`dw2-ranges3.S' and test also their MAIN2, FUNC2 and MAIN3 symbols.
* gdb.dwarf2/dw2-ranges2.S, gdb.dwarf2/dw2-ranges3.S: New files.
* config.in, configure: Regenerate.
* dwarf2read.c: Include zlib.h if present.
Modified *_SECTION macros.
(section_is_p): New.
(dwarf2_locate_sections): Use section_is_p instead of strcmp
(dwarf2_resize_section): New.
to determine whether a given section has a given name.
(zlib_decompress_section): New.
(dwarf2_read_section): Read the compressed section if present
in the binary.
* testsuite/gdb.dwarf2/dw2-compressed.S: New file.
* testsuite/gdb.dwarf2/dw2-compressed.exp: New file.
* MAINTAINERS: Added myself to section Write After Approval.
* dwarf2read.c (dwarf2_get_pc_bounds): Moved the `DW_AT_ranges' parsing
code with its variables OBJFILE, CU_HEADER and OBFD into ...
(dwarf2_ranges_read): ... a new function.
(read_partial_die): Implemented the parsing of `DW_AT_ranges'.
gdb/testsuite/
* gdb.dwarf2/dw2-ranges.S, gdb.dwarf2/dw2-ranges.exp: New files.
line.
* gdb.base/huge.exp: Loop over compilation to find a size that
is acceptable.
* gdb.base/remote.exp: Correct expected strings.
* gdb.dwarf2/mac-fileno.S: Avoid # comments.