Commit Graph

11746 Commits

Author SHA1 Message Date
Andrew Cagney 165b8e33ee From Fernando Nasser:
* remote.c (remote_async_open_1): Re-throw the exception when the
connection fails.
(remote_cisco_open): Ditto.
(remote_open_1): Ditto.
2002-05-19 20:11:17 +00:00
Andrew Cagney 36918e70e5 * remote.c (remote_start_remote_dummy): Add uiout parameter.
(remote_start_remote): Add uiout parameter.  Pass through to
remote_start_remote_dummy.
(remote_open_1): Use catch_exception instead of catch_errors.
(remote_async_open_1): Ditto.
(remote_cisco_open): Ditto.
2002-05-19 18:32:10 +00:00
Andrew Cagney ae44c0c47d * remote.c (remote_start_remote): Replace PTR with void pointer.
(sigint_remote_twice_token, sigint_remote_token): Ditto.  Make
static.
2002-05-19 16:56:03 +00:00
gdbadmin 0e4eef8e68 *** empty log message *** 2002-05-19 00:00:03 +00:00
Andrew Cagney 8efe637df4 * gdb_indent.sh: Allow the script to be run in the sim directory. 2002-05-18 19:50:20 +00:00
Mark Kettenis f0f625e28b * config/i386/nm-cygwin.h (NO_PTRACE_H): Remove define.
* config/i386/nm-go32.h (NO_PTRACE_H): Remove define.
2002-05-18 19:29:37 +00:00
gdbadmin ae936419a7 *** empty log message *** 2002-05-18 00:00:33 +00:00
Mark Kettenis 2f1b59840e * corelow.c (core_open): Only call set_gdbarch_from_file if
exec_bfd is NULL.
2002-05-17 23:06:10 +00:00
Jim Blandy f617d2b61f * gdb.base/completion.exp: Recognize the more detailed error
messages produced by the macro expander's lexical analyzer.
2002-05-17 22:03:34 +00:00
Andrey Volkov 40cd92ad2f Fix call of read_relative_register_raw_bytes 2002-05-17 19:39:52 +00:00
Andrey Volkov fc97460264 h8300: Add support of EXR register 2002-05-17 19:19:24 +00:00
Andrey Volkov 906709f48c *h8300-tdep.c: Add additional CCR flags (I,UI,H,U) 2002-05-17 18:52:58 +00:00
Andrey Volkov 6e591d68a5 * Change literal regno in h8300-tdep.c 2002-05-17 18:44:13 +00:00
Jim Blandy e0e9281e47 * NEWS: Note addition of macro support. 2002-05-17 18:02:20 +00:00
Jim Blandy e2e0bcd116 * gdb.texinfo (C Preprocessor Macros): New chapter.
Include it in the main menu.
(Contributors): Credit Jim Blandy with macro support.
(Compilation): Explain how to get macro information into the
executable.
(Expressions): Note that preprocessor macros are expanded.
2002-05-17 18:00:03 +00:00
Jim Blandy 84f0252a03 Expand preprocessor macros in C expressions.
* 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.
2002-05-17 17:57:48 +00:00
Joern Rennecke 1c509ca821 print_insn_sh cleanup:
include:
	* dis-asm.h (print_insn_shl, print_insn_sh64l): Remove prototype.
gdb:
	* sh-tdep.c (gdb_print_insn_sh64): Delete.
	(gdb_print_insn_sh): Just set info->endian and use print_insn_sh.
	(sh_gdbarch_init): Always use gdb_print_insn_sh.
opcodes:
	* disassemble.c (disassembler): Just use print_insn_sh for bfd_arch_sh.
	* sh-dis.c (LITTLE_BIT): Delete.
	(print_insn_sh, print_insn_shl): Deleted.
	(print_insn_shx): Renamed to
	(print_insn_sh).  No longer static.  Handle SHmedia instructions.
	Use info->endian to determine endianness.
	* sh64-dis.c (print_insn_sh64, print_insn_sh64l): Delete.
	(print_insn_sh64x): No longer static.  Renamed to
	(print_insn_sh64).  Removed pfun_compact and endian arguments.
	If we got an uneven address to indicate SHmedia, adjust it.
	Return -2 for SHcompact instructions.
sim/sh64:
	* sim-if.c (sh64_disassemble_insn): Use  print_insn_sh instead of
	print_insn_shl.
2002-05-17 14:36:46 +00:00
Corinna Vinschen 2250ee0c64 * NEWS: Add section for multi-arched targets. Add v850 to that section. 2002-05-17 10:14:05 +00:00
Jason Thorpe ab3b81262e * Makefile.in (sh_tdep_h): Define and use.
* config/sh/tm-sh.h (sh_osabi, sh_abi, gdbarch_tdep,
register enum): Move to...
* * sh-tdep.h: ...here.
* sh-tdep.c: Include sh-tdep.h.
* sh3-rom.c: Likewise.
* shnbsd-tdep.c: Likewise.
2002-05-17 06:55:49 +00:00
Michael Snyder ed9d4749c1 2002-05-16 Michael Snyder <msnyder@redhat.com>
* arm-tdep.c: Spelling fix in comment.
2002-05-17 00:05:24 +00:00
gdbadmin e7780ad605 *** empty log message *** 2002-05-17 00:00:03 +00:00
Jim Blandy 6821892ed4 Add commands for manually expanding macros and showing their
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.
2002-05-16 21:15:53 +00:00
Jim Blandy 2e2761252b Teach the Dwarf 2 reader to read macro information.
* 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.
2002-05-16 21:00:14 +00:00
Daniel Jacobowitz 2f53fe6c16 2002-05-16 Daniel Jacobowitz <drow@mvista.com>
Fix PR gdb/546
        * ser-tcp.c: Don't include <netinet/udp.h>.
2002-05-16 19:51:09 +00:00
Richard Earnshaw c9af212bec Correct date in commit message. 2002-05-16 13:49:21 +00:00
Stephane Carrez 2be99286c5 * MAINTAINERS: Update my email address. 2002-05-16 13:38:55 +00:00
Richard Earnshaw 8501bbeb90 * config/arm/nm-nbsd.h: Use "config/nm-nbsd.h" to include generic
include file of the same name.
2002-05-16 13:32:14 +00:00
Corinna Vinschen bf5f1a5269 * configure.tgt: Mark v850 as multi-arched.
* config/v850/tm-v850.h: Remove file.
	* config/v850/v850.mt: Eliminate TM_FILE.
2002-05-16 12:11:38 +00:00
Corinna Vinschen 435e042a62 * v850-tdep.c: Full multi-arch.
* config/v850/tm-v850.h: Eliminate or move to v850-tdep.c everything.
	Define GDB_MULTI_ARCH to 2.
2002-05-16 11:43:08 +00:00
Pierre Muller 9819c6c883 2002-05-02 Pierre Muller <muller@ics.u-strasbg.fr>
* p-exp.y (current_type): New static variable.
	Carries the type of the expression at the position that is parsed.
	(push_current_type, pop_current_type): Two new functions. Used
	to store/restore current_type in expression on specific tokens.
	(search_filed): New static variable. Set to one after parsing a point as
	at that point only a FIELDNAME token should be searched.
	(FIELDNAME): New token. After a point only a token belonging to
	current_type type definition is allowed.
	(all over token rules): reset and change current_type according
	to rules.
	(exp '[' rule): insert implicit array index field if
	exp is a pascal string type.
2002-05-16 09:34:54 +00:00
Corinna Vinschen 3a06899a96 * v850-tdep.c: Fix comment for v850_scan_prologue. Remove extra
frame info.  Use frame_info's saved_regs instead of matching member
	in extra_frame_info throughout.
	(v850_frame_init_saved_regs): New function.
	(v850_init_extra_frame_info): Move most functionality into
	v850_frame_init_saved_regs().
	* config/v850/tm-v850.h (EXTRA_FRAME_INFO): Remove definition.
	(v850_frame_find_saved_regs): Remove declaration.
	(FRAME_FIND_SAVED_REGS): Remove definition.
	(v850_frame_init_saved_regs): Add declaration.
	(FRAME_INIT_SAVED_REGS): Add definition.
2002-05-16 08:23:21 +00:00
Corinna Vinschen 6ed14b0ece * v850-tdep.c: Begin multi-arch'ing v850.
(v850_target_architecture_hook): Remove function.
	(v850_gdbarch_init): New function.  Add code previously in
	v850_target_architecture_hook().
	(_initialize_v850_tdep): Don't  set target_architecture_hook.
	Call register_gdbarch_init() instead.
2002-05-16 07:35:21 +00:00
Daniel Jacobowitz 4272591028 2002-05-16 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.h (struct cplus_struct_type): Remove args field.
        * hpread.c (hpread_read_struct_type): Remove assignments to args.
        (fixup_class_method_type): Likewise.
2002-05-16 03:59:58 +00:00
Daniel Jacobowitz 0bc68c4948 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
From Martin Pool <mbp@samba.org>:
        * gdbserver/server.c (gdbserver_usage): New function.
        (main): Call it.
2002-05-16 02:33:04 +00:00
gdbadmin abdb5c032d *** empty log message *** 2002-05-16 00:00:34 +00:00
Jim Blandy 99d9066e57 Add macro structures to GDB's symbol tables. Nobody puts anything
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.
2002-05-15 21:19:21 +00:00
Richard Earnshaw c899585bc7 * config/arm/nm-nbsd.h: Use <> for include of config/nm-nbsd.h.
(REGISTER_U_ADDR): Delete definition.
(arm_register_u_addr): Delete declaration.
2002-05-15 16:21:59 +00:00
Richard Earnshaw a6cdd8c5f6 * arm-linux-tdep.c (ARM_LINUX_JB_PC): Renamed from JB_PC.
(ARM_LINUX_JB_ELEMENT_SIZE): Likewise.
2002-05-15 12:29:41 +00:00
Daniel Jacobowitz fd3a5ca161 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
* gdbserver/mem-break.c (reinsert_breakpoint_by_bp): Correct typo
        stop_at -> stop_pc.
2002-05-15 03:36:13 +00:00
Andrew Cagney c97dcfc7b8 * regcache.c (register_valid): Revise comments refering to "Not
available" and "unavailable".
* frame.c (frame_register_read): Ditto.
* findvar.c (value_of_register): Ditto.
2002-05-15 01:01:56 +00:00
gdbadmin 0e0cbfbfde *** empty log message *** 2002-05-15 00:00:34 +00:00
Andrew Cagney 93021b7d08 * Makefile.in (remote_sim_h): Replace remote-sim_h.
(remote-sim.o): Update dependencies.
(d10v-tdep.o): Specify dependencies.
(sim_d10v_h): Define.
2002-05-14 22:19:49 +00:00
Elena Zannoni eac2a696e0 2002-05-14 Elena Zannoni <ezannoni@redhat.com>
* gdb.arch/altivec-abi.c: New file.
	* gdb.arch/altivec-abi.exp: New file.
	* gdb.arch/altivec-regs.c: New file.
	* gdb.arch/altivec-regs.exp: New file.
2002-05-14 22:10:16 +00:00
Elena Zannoni 57680a243b 2002-05-14 Elena Zannoni <ezannoni@redhat.com>
* gdb.arch/altivec-abi.c: New file.
	* gdb.arch/altivec-abi.exp: New file.
	* gdb.arch/altivec-regs.c: New file.
	* gdb.arch/altivec-regs.exp: New file.
2002-05-14 22:02:52 +00:00
Jim Blandy a86bc61c35 * macroexp.c (init_buffer, gather_arguments, expand): Use NULL, not 0.
* macrotab.c (macro_lookup_inclusion, find_definition,
new_macro_table): Same.

* macroexp.c (currently_rescanning, expand): Use `strcmp () == 0',
not `! strcmp ()'.  This is a dubious improvement.
* macrotab.c (macro_lookup_inclusion, find_definition): Same.

* macrotab.c (macro_lookup_inclusion): Initialize `best_depth',
although it's not necessary, to avoid a warning.
2002-05-14 21:31:05 +00:00
Daniel Jacobowitz 2fdde8f831 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.h: Update accessor macros to use TYPE_MAIN_TYPE.
        (TYPE_CONST, TYPE_VOLATILE, TYPE_CODE_SPACE, TYPE_DATA_SPACE): Use
        TYPE_INSTANCE_FLAGS.
        (struct main_type): New.
        (struct type): Move most members to struct main_type.  Change
        cv_type and as_type to new type_chain member.  Add instance_flags.
        (TYPE_MAIN_TYPE, TYPE_CHAIN, TYPE_INSTANCE_FLAGS): New macros.
        (TYPE_CV_TYPE, TYPE_AS_TYPE): Remove.
        (finish_cv_type): Remove prototype.
        * gdbtypes.c (alloc_type): Update comment.  Allocate TYPE_MAIN_TYPE.
        Set TYPE_CHAIN.
        (alloc_type_instance): New function.
        (smash_type): New function.
        (make_pointer_type, make_reference_type, make_function_type)
        (smash_to_member_type, smash_to_method_type): Call smash_type.
        (make_qualified_type): New function.
        (make_type_with_address_space): Call make_qualified_type.
        (make_cv_type): Likewise.
        (finish_cv_type): Remove unnecessary function.
        (replace_type): Update comment.  Copy TYPE_MAIN_TYPE.
        (recursive_dump_type): Dump TYPE_CHAIN and TYPE_INSTANCE_FLAGS;
        remove TYPE_CV_TYPE and TYPE_AS_TYPE.
        * c-typeprint.c (c_type_print_modifier): Use TYPE_INSTANCE_FLAGS.
        * dwarf2read.c (read_structure_scope): Don't call finish_cv_type.
        * hpread.c (hpread_read_struct_type): Likewise.
        * stabsread.c (read_struct_type): Likewise.

2002-05-14  Daniel Jacobowitz  <drow@mvista.com>

        * gdb.base/maint.exp (maint print type): Update for new type
        structure.
2002-05-14 18:30:53 +00:00
Elena Zannoni e31f1a7cdb 2002-05-14 Elena Zannoni <ezannoni@redhat.com>
* gdb.arch: New directory.
	* gdb.arch/configure.in: New file.
	* gdb.arch/configure: New file.
	* gdb.arch/Makefile.in: New file.
2002-05-14 17:09:13 +00:00
Elena Zannoni 843fedf445 2002-05-14 Elena Zannoni <ezannoni@redhat.com>
* configure.tgt: Add a catch all sh* target, for cases like
	sh[2,3,4]-elf and sh-hms.
2002-05-14 15:22:29 +00:00
Keith Seitz 05a6c72cef * event-loop.c (create_file_handler): Don't do anything but
update data when we are given a fd which we are already
        monitoring.
2002-05-14 15:21:10 +00:00
Corinna Vinschen db5897415c * gdb.asm/asm-source.exp: Add v850 as supported target.
* gdb.asm/v850.inc: New file.
2002-05-14 10:25:33 +00:00