* gdbtypes.h (TYPE_FLAG_VARARGS): Update comment.
(struct main_type): Remove arg_types member. Update comments for
struct field.
(TYPE_ARG_TYPES): Remove.
(TYPE_FN_FIELD_ARGS): Update.
(smash_to_method_type): Update prototype.
* c-typeprint.c (cp_type_print_method_args): Take method type
instead of argument list. Use new argument layout. Simplify.
(c_type_print_args): Use new argument layout. Simplify.
(c_type_print_base): Update call to cp_type_print_method_args.
* dwarf2read.c (dwarf2_add_member_fn): Remove unneeded type
argument; use die->type instead. Update call to
smash_to_method_type.
(read_structure_scope): Update call to dwarf2_add_member_fn.
* gdbtypes.c (allocate_stub_method): Update comment.
(smash_to_method_type): Take new NARGS and VARARGS arguments.
Use new argument layout.
(check_stub_method): Use new argument layout. Don't count
void as an argument.
(print_arg_types): Update comments. Use new argument layout.
(recursive_dump_type): Don't print arg_types member.
* hpread.c (hpread_read_struct_type): Use new argument layout.
(fixup_class_method_type): Likewise.
(hpread_type_lookup): Likewise.
* stabsread.c (read_type): Update calls to read_args and
smash_to_method_type.
(read_args): Use new argument layout. Simplify.
* valops.c (typecmp): Use new argument layout. Update parameters
and comments. Simplify.
(hand_function_call): Use new argument layout.
(search_struct_method): Update call to typecmp.
(find_overload_match): Use new argument layout.
* dwarf2read.c: #include "macrotab.h".
(dwarf_macinfo_buffer): New variable.
(struct dwarf2_pinfo): New members: dwarf_macinfo_buffer, and
dwarf_macinfo_size.
(DWARF_MACINFO_BUFFER, DWARF_MACINFO_SIZE): New macros.
(dwarf2_missing_macinfo_section, dwarf2_macros_too_long,
dwarf2_macros_not_terminated, dwarf2_macro_outside_file,
dwarf2_macro_unmatched_end_file, dwarf2_macro_malformed_definition,
dwarf2_macro_spaces_in_definition): New complaints.
(dwarf2_has_info): Initialize dwarf_macinfo_offset.
(dwarf2_build_psymtabs): Read the .dwarf_macinfo section.
(dwarf2_build_psymtabs_hard): Record the buffer and its size in
the partial symbol table.
(psymtab_to_symtab_1): Set the macinfo buffer and size globals
from what's recorded in the partial symbol table.
(read_file_scope): If the compilation unit has a
`DW_AT_macro_info' attribute, read its macro information.
* Makefile.in (dwarf2read.o): Depend on macrotab.h.
* dwarf2read.c (struct dwarf2_pinfo): New member: dwarf_line_size.
(DWARF_LINE_SIZE): New macro.
(dwarf2_build_psymtabs_hard): Record the line section's size in
the partial symbol table.
(psymtab_to_symtab_1): Restore dwarf_line_size from the partial
symbol table.
header (...expialidocious) out into its own function.
* dwarf2read.c (struct line_head, struct filenames, struct
directories): Replace with...
(struct line_header): New structure, containing the full
contents of the statement program header, including the
include directory and file name tables.
(read_file_scope): If we have line number info, instead of just
calling dwarf_decode_lines to do all the work, call
dwarf_decode_line_header first to get a `struct line_header'
containing the data in the statement program header, and then
pass that to dwarf_decode_lines, which will pick up where that
left off. Be sure to clean up the `struct line_header' object.
(dwarf_decode_line_header, free_line_header, add_include_dir,
add_file_name): New functions.
(dwarf_decode_lines): Move all the code to read the statement
program header into dwarf_decode_line_header. Take the line
header it built as the first argument, instead of the offset to
the compilation unit's line number info. Use the new `struct
line_header' type instead of the old structures. No need to do
cleanups here now, since we don't allocate anything.
(dwarf2_statement_list_fits_in_line_number_section,
dwarf2_line_header_too_long): New complaints.
* gdbtypes.h (TYPE_FLAG_VECTOR, TYPE_VECTOR): Define.
* gdbtypes.c (recursive_dump_type): Output the vector flag.
* dwarf2read.c (dwarf_attr_name): Handle new attribute for
vectors.
(read_array_type): Record the fact that this array type is really a
vector (i.e. are passed in by value).
* dwarf2read.c (struct function_range): New.
(cu_first_fn, cu_last_fn, cu_cached_fn): New.
(check_cu_functions): New.
(read_file_scope): Initialize global function lists.
Call dwarf_decode_line after processing children.
(read_func_scope): Add to global function list.
(dwarf_decode_lines): Call check_cu_functions everywhere
record_line is called. Call record_line with a linenumber
of 0 to mark sequence ends.
DW_TAG_string_type (this is acceptable under the current DWARF 2.1/3.0
standard.)
2) In read_tag_string_type(), a fix for FORTRAN that propagates the
first string length to all string types. This is important as FORTRAN
strings are not delimited as in C/C++.
3) Handling of the DW_LANG_Fortran95.
2001-12-08 Fred Fish <fnf@redhat.com>
* dwarf2read.c (read_typedef): Replace hand crafted type
initialization with a call to the init_type() function, which
is how the rest of gdb creates types.
2001-12-08 Fred Fish <fnf@redhat.com>
* dwarf2read.c (TYPE_FLAG_VARARGS): Remove from here.
* gdbtypes.h (TYPE_FLAG_VARARGS): Add here and change value to
not collide with other flag bits.
2001-12-08 Fred Fish <fnf@redhat.com>
* dwarf2read.c (read_base_type): Rename is_unsigned to type_flags.
For unsigned types set TYPE_FLAG_UNSIGNED and pass it to
init_type().
From Daniel Jacobowitz <drow@mvista.com>
* dbxread.c (dbx_symfile_read): Only reinitialize
the psymbol list if mainline or if both static
and global lists are empty.
* dwarf2read.c (dwarf2_build_psymtabs): Likewise.
* dwarfread.c (dwarf_build_psymtabs): Likewise.
* xcoffread.c (xcoff_initial_scan): Likewise.
* os9kread.c (os9k_symfile_read): Likewise.
(read_partial_die): Delete fourth argument; we return this info in
the struct partial_die_info object itself now.
(dwarf2_build_psymtabs_hard, scan_partial_symbols): Use the
has_pc_info field of the partial die struct, rather than passing a
variable by reference to read_partial_die.
code in loop condition. This seemed to be trying to round
info_ptr up to the next four-byte boundary, but that's not what it
actually did. If we discover the problem the old code was really
trying to address, we can fix it properly.
(top-level): #include filenames.h.
* dwarf2read.c (dwarf2_start_subfile): Use IS_ABSOLUTE_PATH and
FILENAME_CMP, to DTRT on non-Posix platforms.
(top-level): #include filenames.h.
* dwarf2read.c (DWARF2_REG_TO_REGNUM): New macro. Provide default
definition. Will be used to translate between the compiler's
register numbering and GDB's (for register variables etc).
(new_symbol): Use DWARF2_REG_TO_REGNUM to translate register ids.
read_comp_unit_head() and ``struct compu_unit_head'' parameter.
Include support for signed address case.
Fixes problem of global address size / sign being out-of-sync with
with current section.
* dwarf2read.c (dump_die): Use the proper printf format for
printing DW_UNSND values; they're longs now.
* dwarf2read.c (dump_die): We can read DW_FORM_data8 now, on
at least some platforms, so print it out too.
2000-06-14 James E. Wilson <wilson@bletchleypark.cygnus.com>
* dwarf2read.c (struct attribute): Change unsnd and snd field types
to long.
(read_8_bytes): Change return type to long.
(read_unsigned_leb128): Change return type to long. Change type of
local result to long. Cast argument of left shift to long.
(read_signed_leb128): Likewise.