summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Expand preprocessor macros in C expressions.jimb-macro-020506-branchcvs/jimb-macro-020506-branchJim Blandy2002-05-107-11/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | * c-lang.h: #include "macroexp.h", for macro_lookup_ftype. (scan_macro_expansion, scanning_macro_expansion, finished_macro_expansion): New function declarations. (expression_macro_lookup_func, expression_macro_lookup_baton): New variable declarations. * parser-defs.h (expression_context_pc): New declaration. * parse.c (expression_context_pc): New variable. (parse_exp_1): Set expression_context_pc, as well as expression_context_block. * c-exp.y (yylex): If we're not already reading the result of a macro expansion, try to macro-expand the next token. When we're done scanning a macro expansion, switch back to the mainline text. Commas and `if's in a macro's expansion don't terminate the input. * c-lang.c: #include "macroscope.h" and "gdb_assert.h". (macro_original_text, macro_expanded_text, expression_macro_lookup_func, expression_macro_lookup_baton): New variables. (scan_macro_expansion, scanning_macro_expansion, finished_macro_expansion, scan_macro_cleanup, null_macro_lookup, c_preprocess_and_parse): New functions. (c_language_defn, cplus_language_defn, asm_language_defn): Call c_preprocess_and_parse, instead of c_parse. * Makefile.in (c_lang_h): Note that this #includes macroexp.h. (c-lang.o): Note dependency on macroscope.h and gdb_assert.h.
* * gdb.base/printcmds.exp (test_integer_literals_rejected):Jim Blandy2002-05-103-2/+17
| | | | | | Recognize more detailed error message produced by the macro expander's lexical analyzer. * lib/gdb.exp (test_print_reject): Same.
* Revert last reversion. The original was better.Jim Blandy2002-05-101-1/+1
|
* Add commands for manually expanding macros and showing theirJim Blandy2002-05-095-3/+475
| | | | | | | | | | definitions. * macrocmd.c, macroscope.c, macroscope.h: New files. * Makefile.in (SFILES): Add macrocmd.c, macroscope.c. (macroscope_h): New variable. (HFILES_NO_SRCDIR): Add macroscope.h. (COMMON_OBS): Add macrocmd.o, macroscope.o. (macroscope.o, macrocmd.o): New rules.
* Properly track the size of the current objfile's .debug_line section.Jim Blandy2002-05-092-0/+15
| | | | | | | | | * 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.
* Teach the Dwarf 2 reader to read macro information.Jim Blandy2002-05-093-3/+470
| | | | | | | | | | | | | | | | | | | | | * 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.
* * Makefile.in (buildsym.o): Fix variable reference.Jim Blandy2002-05-091-1/+1
|
* Add macro structures to GDB's symbol tables. Nobody puts anythingJim Blandy2002-05-0910-2/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | in them yet. * symtab.h (struct symtab): New member: `macro_table'. * buildsym.h (pending_macros): New global variable. * buildsym.c: #include "macrotab.h". (buildsym_init): Initialize `pending_macros'. (end_symtab): If we found macro information while reading a CU's debugging info, do build a symtab structure for it. Make the symtab point to the macro information, and clear the `pending_macros' pointer which held it while we were reading the debug info. (really_free_pendings): Free any pending macro table. * objfiles.h (struct objfile): New member: `macro_cache'. * objfiles.c (allocate_objfile): Set allocate and free functions for the macro cache's objstack. (free_objfile): Empty the macro cache's obstack. * symfile.c (reread_symbols): Empty the macro cache's obstack, and set new allocate and free functions for it. * solib-sunos.c (allocate_rt_common_objfile): Set allocate and free functions for the macro cache's objstack. (Why is this function building its own objfile?) * symmisc.c (print_objfile_statistics): Print statistics on the macro bcache. * Makefile.in: Note that buildsym.o depends on macrotab.h.
* Add first preprocessor macro-expansion files.Jim Blandy2002-05-096-0/+2437
| | | | | | | | | * macroexp.c, macroexp.h, macrotab.c, macrotab.h: New files. * Makefile.in (SFILES): Add macrotab.c, macroexp.c. (splay_tree_h, macroexp_h, macrotab_h): New variable. (HFILES_NO_SRCDIR): Add macrotab.h, macroexp.h. (COMMON_OBS): Add macrotab.o, macroexp.o. (macroexp.o, macrotab.o): New rules.
* Revert 8 May change; it's going to be revised.Jim Blandy2002-05-096-2437/+0
|
* Add first preprocessor macro-expansion files.Jim Blandy2002-05-08717-115531/+2437
| | | | | | | | | * macroexp.c, macroexp.h, macrotab.c, macrotab.h: New files. * Makefile.in (SFILES): Add macrotab.c, macroexp.c. (splay_tree_h, macroexp_h, macrotab_h): New variable. (HFILES_NO_SRCDIR): Add macrotab.h, macroexp.h. (COMMON_OBS): Add macrotab.o, macroexp.o. (macroexp.o, macrotab.o): New rules.
* Separate the job of reading the line number info statement programjimb-macro-020506-branchpointJim Blandy2002-05-062-179/+336
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 2002-05-06 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni2002-05-062-12/+63
| | | | | | | | | | | | * gdbtypes.c (init_vector_type): New function. (build_builtin_type_vec128): Simplify the representation of SIMD registers. (build_gdbtypes): Initialize new builtin vector types. (_initialize_gdbtypes): Register new vector types with gdbarch. (builtin_type_v4_float, builtin_type_v4_int32, builtin_type_v8_int16, builtin_type_v16_int8, builtin_type_v2_int32, builtin_type_v4_int16, builtin_type_v8_int8): New (renamed) SIMD types.
* Fix check for overflow of relocation for the Thumb BL instruction.Nick Clifton2002-05-062-1/+6
|
* * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offsetAlan Modra2002-05-061-0/+5
| | | | when not relocatable. Fix reloc_emitter call for K&R.
* 2002-05-06 Ben Elliston <bje@redhat.com>Ben Elliston2002-05-062-0/+9
| | | | | | From Graydon Hoare <graydon@redhat.com> * config/sid.exp: Include support for "rawsid" protocol.
* * i387-nat.c (i387_fill_fsave): Use regcache_collect.Mark Kettenis2002-05-062-10/+20
| | | | (i387_fill_fxsave): Likewise.
* * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offsetAlan Modra2002-05-061-2/+3
| | | | when not relocatable. Fix reloc_emitter call for K&R.
* *** empty log message ***gdbadmin2002-05-061-1/+1
|
* daily updateAlan Modra2002-05-061-1/+1
|
* * configure.in (noconfigdirs): Don't disable libgcj onAlexandre Oliva2002-05-052-1/+6
| | | | sparc64-*-solaris* and sparcv9-*-solaris*.
* * generic/gdbtk-register.c (get_register, register_changed_p):Alexandre Oliva2002-05-052-3/+8
| | | | Don't depend on variable-sized automatic arrays.
* * alpha-tdep.c (alpha_extract_return_value): Don't useAlexandre Oliva2002-05-052-1/+6
| | | | non-constant array size in prototype.
* From Brian Taylor <briant at model dot com>:Andrew Cagney2002-05-052-2/+16
| | | | | | | | * ui-out.c (ui_out_field_core_addr): Use the function longest_local_hex_string_custom'to format addresses > 32 bits wide. * ui-out.c (ui_out_field_core_addr): Update comment.
* * stack.c (select_and_print_frame): Make static. Delete theAndrew Cagney2002-05-053-20/+12
| | | | | | | parameter `level'. (func_command): Update call. (select_frame_command): Delete code computing the frame level. * frame.h (select_and_print_frame): Delete declaration.
* * sparc-tdep.c (sparc_get_saved_register): Comment whyAndrew Cagney2002-05-052-0/+15
| | | | get_prev_frame call is safe.
* * frame.h (select_frame): Delete level parameter.Andrew Cagney2002-05-0517-74/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stack.c (select_frame): Update. Use frame_relative_level to obtain the frame's level. (select_and_print_frame): Update call. (select_frame_command): Ditto. (up_silently_base): Ditto. (down_silently_base): Ditto. * ocd.c (ocd_start_remote): Ditto. * remote-rdp.c (remote_rdp_open): Ditto. * remote-mips.c (mips_initialize): Ditto. (common_open): Ditto. * remote-e7000.c (e7000_start_remote): Ditto. * m3-nat.c (select_thread): Ditto. * hppa-tdep.c (child_get_current_exception_event): Ditto. (child_get_current_exception_event): Ditto. * varobj.c (varobj_create): Ditto. (varobj_update): Ditto. (c_value_of_root): Ditto. * tracepoint.c (finish_tfind_command): Ditto. * corelow.c (core_open): Ditto. * arch-utils.c (generic_prepare_to_proceed): Ditto. * thread.c (info_threads_command): Ditto. (switch_to_thread): Ditto. * infrun.c (normal_stop): Ditto. (restore_selected_frame): Ditto. (restore_inferior_status): Ditto. * breakpoint.c (insert_breakpoints): Ditto. (watchpoint_check): Ditto. (bpstat_stop_status): Ditto. (do_enable_breakpoint): Ditto. * blockframe.c (flush_cached_frames): Ditto. (reinit_frame_cache): Ditto.
* daily updateAlan Modra2002-05-051-1/+1
|
* *** empty log message ***gdbadmin2002-05-051-1/+1
|
* Jason Thorpe as NetBSD maintainer.Andrew Cagney2002-05-042-0/+6
|
* * gdbtypes.c (replace_type): Doc fix.Jim Blandy2002-05-042-4/+14
|
* * valprint.c (strcat_longest): Delete commented out function.Andrew Cagney2002-05-042-106/+9
| | | | Update copyright.
* * gdb.c++/hang.exp: Check for corruption of the cv_type chain.Jim Blandy2002-05-043-4/+28
| | | | * gdb.c++/hang3.C: New file.
* * gdbint.texinfo (Releasing GDB): Revise `Create a Release'.Andrew Cagney2002-05-042-114/+265
|
* * generic/gdbtk-wrapper.h (GDB_select_frame): Delete declaration.Andrew Cagney2002-05-043-27/+6
| | | | | * generic/gdbtk-wrapper.c (GDB_select_frame): Delete function. (wrap_select_frame): Delete function.
* * gdb.texinfo: Delete obsolete references to a29k.Andrew Cagney2002-05-042-252/+4
|
* * MAINTAINERS: Mark a29k as deleted.Andrew Cagney2002-05-0435-8248/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS: Mention that a29k was removed. Add OBSOLETE section. Move new configurations to the top. * configure.tgt: Remove a29k. * config/a29k/tm-vx29k.h: Delete. * config/a29k/vx29k.mt: Delete. * config/a29k/tm-a29k.h: Delete. * config/a29k/a29k-udi.mt: Delete. * config/a29k/a29k.mt: Delete. * a29k-tdep.c: Delete. * remote-udi.c: Delete. * remote-mm.c: Delete. * remote-eb.c: Delete. * remote-adapt.c: Delete. * Makefile.in: Remove obsolete code. * gdbserver/Makefile.in: Ditto. * config/s390/s390x.mt: Ditto. * config/s390/s390.mt: Ditto. * config/sparc/sparclynx.mh: Ditto. * config/sparc/linux.mh: Ditto. * config/pa/hppaosf.mh: Ditto. * config/pa/hppabsd.mh: Ditto. * config/ns32k/nbsd.mt: Ditto. * config/mips/vr5000.mt: Ditto. * config/m68k/sun3os4.mh: Ditto. * config/m68k/nbsd.mt: Ditto. * config/m68k/m68klynx.mh: Ditto. * config/m32r/m32r.mt: Ditto. * config/i386/x86-64linux.mt: Ditto. * config/i386/nbsdelf.mt: Ditto. * config/i386/nbsd.mt: Ditto. * config/i386/i386lynx.mh: Ditto.
* * gdb.base/default.exp: Remove obsolete code.Andrew Cagney2002-05-0417-767/+34
| | | | | | | | | | | | | | | | | | * gdb.c++/misc.exp: Ditto. Update copyright. * gdb.c++/cplusfuncs.exp: Ditto. Update copyright. * gdb.base/whatis.exp: Ditto. Update copyright. * gdb.base/scope.exp: Ditto. Update copyright. * gdb.base/ptype.exp: Ditto. Update copyright. * gdb.base/printcmds.exp: Ditto. Update copyright. * gdb.base/opaque.exp: Ditto. Update copyright. * gdb.base/list.exp: Ditto. * gdb.base/funcargs.exp: Ditto. Update copyright. * gdb.hp/gdb.threads-hp/usrthbasic.c: Delete. * gdb.hp/gdb.threads-hp/usrthbasic.exp: Delete. * gdb.hp/gdb.threads-hp/usrthcore.c: Delete. * gdb.hp/gdb.threads-hp/usrthcore.exp: Delete. * gdb.hp/gdb.threads-hp/usrthfork.c: Delete. * gdb.hp/gdb.threads-hp/usrthfork.exp: Delete.
* * target.c (debug_print_register): New function. Handle oversizeAndrew Cagney2002-05-042-16/+39
| | | | | | registers. (debug_to_fetch_registers): Call. (debug_to_store_registers): Call.
* * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate codeAlan Modra2002-05-043-17/+36
| | | | | | | | | | | | | | | | reloading local sym addend mistakenly removed in 2002-05-01 change. * dwarf2.c (struct line_head): Make prologue_length a bfd_vma. (read_abbrevs): Change "offset" param to bfd_vma. (parse_comp_unit): Change "version" and addr_size to unsigned ints. Change "abbrev_offset" to bfd_vma. (read_indirect_string): Use correct conversion chars in error message format string, cast bfd_vma's to unsigned long. (read_abbrevs): Likewise. (read_attribute_value): Likewise. (decode_line_info): Likewise. (scan_unit_for_functions): Likewise. (parse_comp_unit): Likewise.
* Fix problem with objdump and 16 bit R_BA.Tom Rix2002-05-044-85/+202
|
* * elf32-hppa.c (struct elf32_hppa_link_hash_table): AddAlan Modra2002-05-043-123/+224
| | | | | | | | | | | | | | | bfd_count top_index, input_list, all_local_syms. (elf32_hppa_setup_section_lists): New function, split from elf32_hppa_size_stubs. (elf32_hppa_next_input_section): Likewise. (group_sections): Likewise. (get_local_syms): Likewise. (elf32_hppa_size_stubs): Adjust for split out functions. Look for stubs on undefined syms too. (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*. Only access htab elf fields when we have and elf hash table. * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare. (elf32_hppa_next_input_section): Declare.
* * opncls.c (_bfd_new_bfd_contained_in): Check return value ofAlan Modra2002-05-042-0/+7
| | | | _bfd_new_bfd.
* * stabsread.c (cleanup_undefined_types): Use replace_type, not memcpy.Jim Blandy2002-05-043-9/+27
| | | | | (read_type): Doc fix. * gdbtypes.c (replace_type): Doc fix.
* * stabsread.c (multiply_defined_struct): New complaint.Jim Blandy2002-05-042-13/+92
| | | | | | | | | | | | | (read_struct_type): If the type we were passed isn't empty, or incomplete, don't read the new struct type into it; complain, and return the original type unchanged. Take a new `type_code' argument, which is the type code for the new type. (read_type): Rather than storing the type's type code here, pass it as an argument to read_struct_type, and let that take care of storing it. That way, we don't overwrite the original type code, so read_struct_type can use it to decide whether we're overwriting something we shouldn't. (complain_about_struct_wipeout): New function.
* daily updateAlan Modra2002-05-041-1/+1
|
* *** empty log message ***gdbadmin2002-05-041-1/+1
|
* 2002-05-02 Michael Snyder <msnyder@redhat.com>Michael Snyder2002-05-032-0/+2
| | | | * gdb.base/watchpoint.exp: Add xscale target.
* 2002-05-02 Michael Snyder <msnyder@redhat.com>Michael Snyder2002-05-033-0/+12
| | | | | * gdb.base/long_long.exp: Add xscale target. * gdb.base/default.exp: Add xscale target.
* * gdbarch.sh: Assert that gdbarch is non-NULL.Andrew Cagney2002-05-033-0/+155
| | | | * gdbarch.c: Regenerate.