Commit Graph

49 Commits

Author SHA1 Message Date
Ulrich Weigand c841afd52a * parser-defs.h (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE
and DATA_SYMBOL_TYPE arguments.
	* parse.c (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE and
	DATA_SYMBOL_TYPE arguments.  Replace use of builtin_type_CORE_ADDR.
	(write_dollar_variable): Update call.

	* ada-exp.y (write_var_or_type): Update call.
	* c-exp.y: Likewise.
	* f-exp.y: Likewise.
	* jv-exp.y: Likewise.
	* m2-exp.y: Likewise.
	* objc-exp.y: Likewise.
	* p-exp.y: Likewise.
2008-09-11 14:08:33 +00:00
Tom Tromey 65d12d83a5 gdb
* value.h (evaluate_subexpression_type, extract_field_op):
	Declare.
	* printcmd.c (_initialize_printcmd): Use expression_completer for
	'p', 'inspect', 'call'.
	* parser-defs.h (parse_field_expression): Declare.
	* parse.c: Include exceptions.h.
	(in_parse_field, expout_last_struct): New globals.
	(mark_struct_expression): New function.
	(prefixify_expression): Return int.
	(prefixify_subexp): Return int.  Use expout_last_struct.
	(parse_exp_1): Update.
	(parse_exp_in_context): Add 'out_subexp' argument.  Handle
	in_parse_field.
	(parse_field_expression): New function.
	* expression.h (parse_field_expression): Declare.
	(in_parse_field): Likewise.
	* eval.c (evaluate_subexpression_type): New function.
	(extract_field_op): Likewise.
	* completer.h (expression_completer): Declare.
	* completer.c (expression_completer): New function.
	(count_struct_fields, add_struct_fields): New functions.
	* c-exp.y (yyparse): Redefine.
	(COMPLETE): New token.
	(exp): New productions.
	(saw_name_at_eof, last_was_structop): New globals.
	(yylex): Return COMPLETE when needed.  Recognize in_parse_field.
	(c_parse): New function.
	* breakpoint.c (_initialize_breakpoint): Use expression_completer
	for watch, awatch, and rwatch.
	* Makefile.in (parse.o): Depend on exceptions_h.
gdb/testsuite
	* gdb.base/break1.c (struct some_struct): New struct.
	(values): New global.
	* gdb.base/completion.exp: Add field name completion test.
gdb/doc
	* gdb.texinfo (Completion): Add field name example.
2008-06-06 20:58:08 +00:00
Daniel Jacobowitz 9b254dd1ce Updated copyright notices for most files. 2008-01-01 22:53:26 +00:00
Thiago Jung Bauermann 27bc4d809e 2007-10-25 Wu Zhou <woodzltc@cn.ibm.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* c-exp.y (YYSTYPE): Add typed_val_decfloat for decimal
	floating point in YYSTYPE union.
	(DECFLOAT) Add token and expression element handling code.
	(parse_number): Parse DFP constants, which end with suffix 'df',
	'dd' or 'dl'.  Return DECFLOAT.
	* eval.c (evaluate_subexp_standard): Call value_from_decfloat to
	handle OP_DECFLOAT.
	* expression.h (enum exp_opcode): Add an opcode (OP_DECFLOAT)
	for DFP constants.
	(union exp_element): Add decfloatconst to represent DFP
	elements, which is 16 bytes by default.
	* parse.c (write_exp_elt_decfloatcst): New function to write a
	decimal float const into the expression.
	(operator_length_standard): Set operator length for OP_DECFLOAT
	to 4.
	* parser-defs.h (write_exp_elt_decfloatcst): Prototype.
	* valarith.c (value_neg): Add code to handle the negation
	operation of DFP values.
	* value.c (value_from_decfloat): New function to get the value
	from a decimal floating point.
	* value.h (value_from_decfloat): Prototype.
2007-10-25 18:01:58 +00:00
Joel Brobecker a9762ec78a Switch the license of all .c files to GPLv3.
Switch the license of all .h files to GPLv3.
        Switch the license of all .cc files to GPLv3.
2007-08-23 18:08:50 +00:00
Ulrich Weigand d3e9c991c8 * hppa-hpux-tdep.c (args_for_find_stub, HP_ACC_EH_notify_hook,
HP_ACC_EH_set_hook_value, HP_ACC_EH_notify_callback, HP_ACC_EH_break,
	HP_ACC_EH_catch_throw, HP_ACC_EH_catch_catch, __eh_notification,
	hp_cxx_exception_support, hp_cxx_exception_support_initialized,
	eh_notify_hook_addr, eh_notify_callback_addr, eh_break_addr,
	eh_catch_throw_addr, break_callback_sal, setup_d_pid_in_inferior,
	find_stub_with_shl_get, cover_find_stub_with_shl_get,
	initialize_hp_cxx_exception_support, child_enable_exception_callback,
	current_ex_event, child_get_current_exception_event): Remove.
	(hppa_hpux_inferior_created): Remove.
	(hppa_hpux_init_abi): Do not install hppa_hpux_inferior_created.

	* breakpoint.h (deprecated_exception_catchpoints_are_fragile): Remove.
	(deprecated_exception_support_initialized): Remove.
	* breakpoint.c (deprecated_exception_catchpoints_are_fragile): Remove.
	(deprecated_exception_support_initialized): Remove.
	(breakpoint_init_inferior): Remove handling of non-zero
	deprecated_exception_catchpoints_are_fragile.

	* symtab.h (deprecated_hp_som_som_object_present): Remove.
	* symtab.c (deprecated_hp_som_som_object_present): Remove.
	* c-typeprint.c (c_type_print_base): Remove handling of non-zero
	deprecated_hp_som_som_object_present.
	* eval.c (evaluate_subexp_standard): Likewise.
	* valops.c (value_cast): Likewise.

	* parse.c (parse_nested_classes_for_hpacc, coloncolon): Remove.
	* parser-defs.h (parse_nested_classes_for_hpacc): Remove.
	* c-exp.y (yylex): Do not call parse_nested_classes_for_hpacc.
2007-06-05 22:47:50 +00:00
Daniel Jacobowitz 6aba47ca06 Copyright updates for 2007. 2007-01-09 17:59:20 +00:00
Daniel Jacobowitz 9e35dae425 2006-10-09 Jan Kratochvil <jan.kratochvil@redhat.com>
Daniel Jacobowitz  <dan@codesourcery.com>

	* Makefile.in (expprint.o, parse.o, target.o): Update.
	* dwarf2loc.c (dwarf_expr_tls_address): Move body to
	target_translate_tls_address.  Call it.
	* eval.c (evaluate_subexp_standard): Handle UNOP_MEMVAL_TLS.
	* expprint.c (print_subexp_standard): Likewise.
	(op_name_standard, dump_subexp_body_standard): Likewise.
	* expression.h (enum exp_opcode): Add UNOP_MEMVAL_TLS.
	(union exp_element): Add objfile.
	* parse.c (write_exp_elt_objfile): New function.
	(msym_tls_symbol_type): New.
	(write_exp_msymbol): Handle TLS.
	(operator_length_standard): Handle UNOP_MEMVAL_TLS.
	(build_parse): Initialize msym_tls_symbol_type.
	* parser-defs.h (write_exp_elt_objfile): New prototype.
	* target.c (target_translate_tls_address): New.
	* target.h (target_translate_tls_address): Add prototype.

2006-10-09  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.threads/tls-nodebug.c, gdb.threads/tls-nodebug.exp: New test.
2006-10-10 03:17:53 +00:00
Eli Zaretskii 197e01b6dc * breakpoint.c:
* arm-tdep.c:
	* ia64-tdep.c:
	* i386-tdep.c:
	* hpread.c:
	* hppa-tdep.c:
	* hppa-hpux-tdep.c:
	* gnu-nat.c:
	* gdbtypes.c:
	* gdbarch.h:
	* gdbarch.c:
	* eval.c:
	* dwarf2read.c:
	* dbxread.c:
	* copying:
	* symfile.c:
	* stabsread.c:
	* sh64-tdep.c:
	* sh-tdep.c:
	* s390-tdep.c:
	* rs6000-tdep.c:
	* remote.c:
	* remote-mips.c:
	* mips-tdep.c:
	* mdebugread.c:
	* linux-nat.c:
	* infrun.c:
	* xcoffread.c:
	* win32-nat.c:
	* valops.c:
	* utils.c:
	* tracepoint.c:
	* target.c:
	* symtab.c:
	* c-exp.y:
	* ada-valprint.c:
	* ada-typeprint.c:
	* ada-lex.l:
	* ada-lang.h:
	* ada-lang.c:
	* ada-exp.y:
	* alphafbsd-tdep.c:
	* alphabsd-tdep.h:
	* alphabsd-tdep.c:
	* alphabsd-nat.c:
	* alpha-tdep.h:
	* alpha-tdep.c:
	* alpha-osf1-tdep.c:
	* alpha-nat.c:
	* alpha-mdebug-tdep.c:
	* alpha-linux-tdep.c:
	* alpha-linux-nat.c:
	* aix-thread.c:
	* abug-rom.c:
	* arch-utils.c:
	* annotate.h:
	* annotate.c:
	* amd64obsd-tdep.c:
	* amd64obsd-nat.c:
	* amd64nbsd-tdep.c:
	* amd64nbsd-nat.c:
	* amd64fbsd-tdep.c:
	* amd64fbsd-nat.c:
	* amd64bsd-nat.c:
	* amd64-tdep.h:
	* amd64-tdep.c:
	* amd64-sol2-tdep.c:
	* amd64-nat.h:
	* amd64-nat.c:
	* amd64-linux-tdep.c:
	* amd64-linux-nat.c:
	* alphanbsd-tdep.c:
	* block.h:
	* block.c:
	* bfd-target.h:
	* bfd-target.c:
	* bcache.h:
	* bcache.c:
	* ax.h:
	* ax-general.c:
	* ax-gdb.h:
	* ax-gdb.c:
	* avr-tdep.c:
	* auxv.h:
	* auxv.c:
	* armnbsd-tdep.c:
	* armnbsd-nat.c:
	* arm-tdep.h:
	* arm-linux-nat.c:
	* arch-utils.h:
	* charset.c:
	* call-cmds.h:
	* c-valprint.c:
	* c-typeprint.c:
	* c-lang.h:
	* c-lang.c:
	* buildsym.h:
	* buildsym.c:
	* bsd-uthread.h:
	* bsd-uthread.c:
	* bsd-kvm.h:
	* bsd-kvm.c:
	* breakpoint.h:
	* core-regset.c:
	* core-aout.c:
	* completer.h:
	* completer.c:
	* complaints.h:
	* complaints.c:
	* command.h:
	* coffread.c:
	* coff-solib.h:
	* coff-solib.c:
	* coff-pe-read.h:
	* coff-pe-read.c:
	* cli-out.h:
	* cli-out.c:
	* charset.h:
	* dink32-rom.c:
	* dictionary.h:
	* dictionary.c:
	* demangle.c:
	* defs.h:
	* dcache.h:
	* dcache.c:
	* d10v-tdep.c:
	* cpu32bug-rom.c:
	* cp-valprint.c:
	* cp-support.h:
	* cp-support.c:
	* cp-namespace.c:
	* cp-abi.h:
	* cp-abi.c:
	* corelow.c:
	* corefile.c:
	* environ.c:
	* elfread.c:
	* dwarfread.c:
	* dwarf2loc.c:
	* dwarf2expr.h:
	* dwarf2expr.c:
	* dwarf2-frame.h:
	* dwarf2-frame.c:
	* dve3900-rom.c:
	* dummy-frame.h:
	* dummy-frame.c:
	* dsrec.c:
	* doublest.h:
	* doublest.c:
	* disasm.h:
	* disasm.c:
	* fork-child.c:
	* findvar.c:
	* fbsd-nat.h:
	* fbsd-nat.c:
	* f-valprint.c:
	* f-typeprint.c:
	* f-lang.h:
	* f-lang.c:
	* expression.h:
	* expprint.c:
	* exec.h:
	* exec.c:
	* exceptions.h:
	* exceptions.c:
	* event-top.h:
	* event-top.c:
	* event-loop.h:
	* event-loop.c:
	* gdb.c:
	* gdb-stabs.h:
	* gdb-events.h:
	* gdb-events.c:
	* gcore.c:
	* frv-tdep.h:
	* frv-tdep.c:
	* frv-linux-tdep.c:
	* frame.h:
	* frame.c:
	* frame-unwind.h:
	* frame-unwind.c:
	* frame-base.h:
	* frame-base.c:
	* gdb_vfork.h:
	* gdb_thread_db.h:
	* gdb_string.h:
	* gdb_stat.h:
	* gdb_regex.h:
	* gdb_ptrace.h:
	* gdb_proc_service.h:
	* gdb_obstack.h:
	* gdb_locale.h:
	* gdb_dirent.h:
	* gdb_curses.h:
	* gdb_assert.h:
	* gdbarch.sh:
	* gdb.h:
	* hpux-thread.c:
	* hppabsd-nat.c:
	* hppa-tdep.h:
	* hpacc-abi.c:
	* h8300-tdep.c:
	* gregset.h:
	* go32-nat.c:
	* gnu-v3-abi.c:
	* gnu-v2-abi.h:
	* gnu-v2-abi.c:
	* gnu-nat.h:
	* glibc-tdep.c:
	* gdbtypes.h:
	* gdbcore.h:
	* gdbcmd.h:
	* i386nbsd-tdep.c:
	* i386nbsd-nat.c:
	* i386gnu-tdep.c:
	* i386gnu-nat.c:
	* i386fbsd-tdep.c:
	* i386fbsd-nat.c:
	* i386bsd-tdep.c:
	* i386bsd-nat.h:
	* i386bsd-nat.c:
	* i386-tdep.h:
	* i386-sol2-nat.c:
	* i386-nto-tdep.c:
	* i386-nat.c:
	* i386-linux-tdep.h:
	* i386-linux-tdep.c:
	* i386-linux-nat.c:
	* i386-cygwin-tdep.c:
	* inf-ttrace.c:
	* inf-ptrace.h:
	* inf-ptrace.c:
	* inf-loop.h:
	* inf-loop.c:
	* inf-child.h:
	* inf-child.c:
	* ia64-tdep.h:
	* ia64-linux-nat.c:
	* i387-tdep.h:
	* i387-tdep.c:
	* i386v4-nat.c:
	* i386v-nat.c:
	* i386obsd-tdep.c:
	* i386obsd-nat.c:
	* kod.c:
	* jv-valprint.c:
	* jv-typeprint.c:
	* jv-lang.h:
	* jv-lang.c:
	* irix5-nat.c:
	* iq2000-tdep.c:
	* interps.h:
	* interps.c:
	* inftarg.c:
	* inflow.h:
	* inflow.c:
	* inferior.h:
	* infcmd.c:
	* infcall.h:
	* infcall.c:
	* inf-ttrace.h:
	* m32r-tdep.h:
	* m32r-tdep.c:
	* m32r-rom.c:
	* m32r-linux-tdep.c:
	* m32r-linux-nat.c:
	* m2-valprint.c:
	* m2-typeprint.c:
	* m2-lang.h:
	* m2-lang.c:
	* lynx-nat.c:
	* linux-thread-db.c:
	* linux-nat.h:
	* linespec.c:
	* libunwind-frame.h:
	* libunwind-frame.c:
	* language.h:
	* language.c:
	* macroexp.c:
	* macrocmd.c:
	* m88kbsd-nat.c:
	* m88k-tdep.h:
	* m88k-tdep.c:
	* m68klinux-tdep.c:
	* m68klinux-nat.c:
	* m68kbsd-tdep.c:
	* m68kbsd-nat.c:
	* m68k-tdep.h:
	* m68k-tdep.c:
	* mips-linux-nat.c:
	* mips-irix-tdep.c:
	* minsyms.c:
	* memattr.h:
	* memattr.c:
	* mem-break.c:
	* mdebugread.h:
	* main.h:
	* main.c:
	* macrotab.h:
	* macrotab.c:
	* macroscope.h:
	* macroscope.c:
	* macroexp.h:
	* nbsd-tdep.c:
	* mt-tdep.c:
	* monitor.h:
	* monitor.c:
	* mn10300-tdep.h:
	* mn10300-tdep.c:
	* mn10300-linux-tdep.c:
	* mipsv4-nat.c:
	* mipsread.c:
	* mipsnbsd-tdep.h:
	* mipsnbsd-tdep.c:
	* mipsnbsd-nat.c:
	* mips64obsd-tdep.c:
	* mips64obsd-nat.c:
	* mips-tdep.h:
	* mips-mdebug-tdep.c:
	* mips-linux-tdep.c:
	* osabi.h:
	* osabi.c:
	* ocd.h:
	* ocd.c:
	* observer.c:
	* objfiles.h:
	* objfiles.c:
	* objc-lang.h:
	* objc-lang.c:
	* objc-exp.y:
	* nto-tdep.h:
	* nto-tdep.c:
	* nto-procfs.c:
	* nlmread.c:
	* nbsd-tdep.h:
	* ppcobsd-tdep.c:
	* ppcobsd-nat.c:
	* ppcnbsd-tdep.h:
	* ppcnbsd-tdep.c:
	* ppcnbsd-nat.c:
	* ppcbug-rom.c:
	* ppc-tdep.h:
	* ppc-sysv-tdep.c:
	* ppc-linux-tdep.c:
	* ppc-linux-nat.c:
	* ppc-bdm.c:
	* parser-defs.h:
	* parse.c:
	* p-valprint.c:
	* p-typeprint.c:
	* p-lang.h:
	* p-lang.c:
	* remote-fileio.h:
	* remote-fileio.c:
	* remote-est.c:
	* remote-e7000.c:
	* regset.h:
	* regset.c:
	* reggroups.h:
	* reggroups.c:
	* regcache.h:
	* regcache.c:
	* proc-why.c:
	* proc-service.c:
	* proc-events.c:
	* printcmd.c:
	* ppcobsd-tdep.h:
	* sentinel-frame.h:
	* sentinel-frame.c:
	* scm-valprint.c:
	* scm-tags.h:
	* scm-lang.h:
	* scm-lang.c:
	* scm-exp.c:
	* s390-tdep.h:
	* rom68k-rom.c:
	* remote.h:
	* remote-utils.c:
	* remote-st.c:
	* remote-sim.c:
	* remote-sds.c:
	* remote-rdp.c:
	* remote-rdi.c:
	* remote-hms.c:
	* sim-regno.h:
	* shnbsd-tdep.h:
	* shnbsd-tdep.c:
	* shnbsd-nat.c:
	* sh-tdep.h:
	* serial.h:
	* serial.c:
	* ser-unix.h:
	* ser-unix.c:
	* ser-tcp.c:
	* ser-pipe.c:
	* ser-go32.c:
	* ser-e7kpc.c:
	* ser-base.h:
	* ser-base.c:
	* solib.c:
	* solib-svr4.h:
	* solib-svr4.c:
	* solib-sunos.c:
	* solib-som.h:
	* solib-som.c:
	* solib-pa64.h:
	* solib-pa64.c:
	* solib-osf.c:
	* solib-null.c:
	* solib-legacy.c:
	* solib-irix.c:
	* solib-frv.c:
	* solib-aix5.c:
	* sol-thread.c:
	* sparc64-linux-tdep.c:
	* sparc64-linux-nat.c:
	* sparc-tdep.h:
	* sparc-tdep.c:
	* sparc-sol2-tdep.c:
	* sparc-sol2-nat.c:
	* sparc-nat.h:
	* sparc-nat.c:
	* sparc-linux-tdep.c:
	* sparc-linux-nat.c:
	* source.h:
	* source.c:
	* somread.c:
	* solist.h:
	* solib.h:
	* std-regs.c:
	* stack.h:
	* stack.c:
	* stabsread.h:
	* sparcobsd-tdep.c:
	* sparcnbsd-tdep.c:
	* sparcnbsd-nat.c:
	* sparc64obsd-tdep.c:
	* sparc64nbsd-tdep.c:
	* sparc64nbsd-nat.c:
	* sparc64fbsd-tdep.c:
	* sparc64fbsd-nat.c:
	* sparc64-tdep.h:
	* sparc64-tdep.c:
	* sparc64-sol2-tdep.c:
	* sparc64-nat.c:
	* ui-file.c:
	* typeprint.h:
	* typeprint.c:
	* tramp-frame.h:
	* tramp-frame.c:
	* trad-frame.h:
	* trad-frame.c:
	* tracepoint.h:
	* top.c:
	* tobs.inc:
	* thread.c:
	* terminal.h:
	* target.h:
	* symfile.h:
	* stop-gdb.c:
	* vaxbsd-nat.c:
	* vax-tdep.h:
	* vax-tdep.c:
	* vax-nat.c:
	* varobj.h:
	* varobj.c:
	* value.h:
	* value.c:
	* valprint.h:
	* valprint.c:
	* v850-tdep.c:
	* uw-thread.c:
	* user-regs.c:
	* ui-out.h:
	* ui-out.c:
	* ui-file.h:
	* xcoffsolib.h:
	* xcoffsolib.c:
	* wrapper.c:
	* wince.c:
	* wince-stub.h:
	* wince-stub.c:
	* vaxobsd-tdep.c:
	* vaxnbsd-tdep.c:
	* gdb_gcore.sh:
	* copying.c:
	* configure.ac:
	* aclocal.m4:
	* acinclude.m4:
	* reply_mig_hack.awk:
	* observer.sh:
	* gdb_mbuild.sh:
	* arm-linux-tdep.c:
	* blockframe.c:
	* dbug-rom.c:
	* environ.h:
	* dwarf2loc.h:
	* gdb-events.sh:
	* glibc-tdep.h:
	* gdb_wait.h:
	* gdbthread.h:
	* i386-sol2-tdep.c:
	* hppabsd-tdep.c:
	* hppa-linux-nat.c:
	* hppa-hpux-nat.c:
	* ia64-linux-tdep.c:
	* infptrace.c:
	* linespec.h:
	* maint.c:
	* mips-mdebug-tdep.h:
	* remote-m32r-sdi.c:
	* s390-nat.c:
	* rs6000-nat.c:
	* remote-utils.h:
	* sh3-rom.c:
	* sh-linux-tdep.c:
	* top.h:
	* symtab.h:
	* symmisc.c:
	* symfile-mem.c:
	* srec.h:
	* user-regs.h:
	* version.h:
	* valarith.c:
	* xstormy16-tdep.c:
	* wrapper.h:
	* Makefile.in:
	* f-exp.y:
	* cris-tdep.c:
	* cp-name-parser.y:
	* procfs.c:
	* proc-utils.h:
	* proc-flags.c:
	* proc-api.c:
	* p-exp.y:
	* m68hc11-tdep.c:
	* m2-exp.y:
	* kod.h:
	* kod-cisco.c:
	* jv-exp.y:
	* hppa-linux-tdep.c: Add (c) after Copyright.  Update the FSF
	address.
2005-12-17 22:34:03 +00:00
Paul N. Hilfinger e85c3284f3 * language.h (language_defn): Add new la_post_parser field.
* parser-defs.h (null_post_parser): New declaration (default for
la_post_parser).

* parse.c (parse_exp_1): Move code to parse_exp_in_context and
insert call to that function.
(parse_exp_in_context): New function, including code formerly in
parse_exp_1.  Calls language-dependent post-parser after
prefixification.
(parse_expression_in_context): New exported function.
(null_post_parser): New definition.
* expression.h (parse_expression_in_context): Add declaration.

* p-lang.c (pascal_language_defn): Add trivial post-parser.
* c-lang.c (c_language_defn): Ditto.
(cplus_language_defn): Ditto.
(asm_language_defn): Ditto.
(minimal_language_defn): Ditto.
* f-lang.c (f_language_defn): Ditto.
* jv-lang.c (java_language_defn): Ditto.
* language.c (unknown_language_defn): Ditto.
(auto_language_defn): Ditto.
(local_language_defn): Ditto.
* m2-lang.c (m2_language_defn): Ditto.
* scm-lang.c (scm_language_defn): Ditto.
* obj-lang.c (objc_language_defn): Ditto.
2004-04-10 22:10:01 +00:00
Paul N. Hilfinger 5f9769d172 * parser-defs.h (struct exp_descriptor): New definition, containing
language-specific info for printing, prefixifying, dumping, and
evaluating expressions.
(exp_descriptor_standard): Declare new variable.
(print_subexp): Make global and declare here (from expprint.c).
(dump_subexp): Ditto.
(dump_subexp_body_standard): Declare.
(operator_length_standard): Declare.
(op_name_standard): Declare.
(print_subexp): Declare.
(print_subexp_standard): Declare.

* language.h (struct language_defn): Add la_exp_desc field to hold
pointer to table for language-specific operators.
Remove evaluate_exp field, which is now in struct exp_descriptor.

* parse.c (operator_length): Move most code to new
operator_length_standard function.  Use language-specific information.
(operator_length_standard): New function taking most code from
operator_length.
(exp_descriptor_standard): New constant.

* expression.h (enum exp_opcode): Add definitions of OP_EXTENDED0
and OP_EXTENDED_LAST.

* expprint.c (print_subexp): Use language-specific print_subexp.
Make global; remove static declaration.
Move most code to print_subexp_standard.
(print_subexp_standard): New function, containing code formerly in
print_subexp.
(op_name): Add expression to argument signature.
Use langauge-specific op_name.
Move most code to op_name_standard.
(op_name_standard): New function, containing code formerly in op_name.
(dump_subexp): 	Use new version of op_name function.
Use language-specific dump_subexp_body, and move most existing code to
dump_subexp_body_standard.
(dump_raw_expression): Use new op_name interface.
(dump_subexp_body): Move most code to dump_subexp_body_standard.
(dump_subexp_body_standard): New function, containing code formerly
in dump_subexp_body.

* language.c (unknown_language): Add default la_exp_desc field and
remove evaluate_exp field.
(auto_language): Ditto.
(local_language): Ditto.
* f-lang.c (f_language_defn): Ditto.
* c-lang.c (c_language_defn): Ditto.
(cplus_language_defn): Ditto.
(asm_language_defn): Ditto.
(minimal_language_defn): Ditto.
* p-lang.c (pascal_language_defn): Ditto.
* m2-lang.c (m2_language_defn): Ditto.
* objc-lang.c (objc_language_defn): Ditto.

* jv-lang.c (exp_descriptor_java): New variable, containing
Java-specific expression evaluator.
(java_language_defn): Add la_exp_desc field and remove evaluate_exp
field.
* scm-lang.c (exp_descriptor_scm): New variable, containing
Scheme-specific expression evaluator.
(scm_language_defn): Add la_exp_desc field and remove evaluate_exp
field.
* objc-lang.c (print_object_command): Take evaluate_exp from the
la_exp_desc field.

* Makefile.in (eval.o): Add dependency on parser-defs.h.

* eval.c: Include parser-defs.h for the full declaration of
la_exp_desc's type.
(evaluate_subexp): Get evaluate_exp out of la_exp_desc field.
2003-09-25 08:40:45 +00:00
Paul N. Hilfinger 24daaebce8 * parser-defs.h (operator_length): Declare.
* parse.c (length_of_subexp): Use operator_length to get operator
lengths and arities for operators.
Move most code to new operator_length function.
(operator_length): New function absorbing most code from
length_of_subexp.
(prefixify_subexp): Remove large case and use operator_length instead.
(parse_exp_1): Use renamings:
dump_prefix_expression => dump_raw_expression and
dump_postfix_expression => dump_prefix_expression.

* expression.h (dump_prefix_expression): Rename to ...
(dump_raw_expression): New name.
(dump_postfix_expression): Rename to ...
(dump_prefix_expression): New name.

* expprint.c (dump_subexp): Make global.  Add comment.
Move most existing code to dump_subexp_body.
(dump_subexp_body): New function.
(dump_prefix_expression): Rename to dump_raw_expression.
Remove attempt to print the expression via print_expression: it can't
work before the expression is prefixified.
(dump_raw_expression): Renamed from dump_prefix_expression.
(dump_postfix_expression): Rename to dump_prefix_expression, since
that's what it does.
Remove 'note' parameter, since this routine must be used on
prefixified expression.
(dump_prefix_expression): Renamed from dump_postfix_expression.
2003-09-24 08:29:42 +00:00
David Carlton fe898f56a1 2003-02-19 David Carlton <carlton@math.stanford.edu>
* Makefile.in (SFILES): Add block.c.
	(block_h): New.
	(COMMON_OBS): Add block.o.
	(block.o): New.
	(x86-64-tdep.o): Add $(block_h).
	(values.o, valops.o, tracepoint.o, symtab.o, symmisc.o, symfile.o)
	(stack.o, printcmd.o, p-exp.tab.o, parse.o, objfiles.o)
	(objc-exp.tab.o, objc-lang.o, nlmread.o, mips-tdep.o, mdebugread.o)
	(m2-exp.tab.o, linespec.o, jv-lang.o, jv-exp.tab.o, infcmd.o)
	(f-valprint.o, findvar.o, f-exp.tab.o, expprint.o, coffread.o)
	(c-exp.tab.o, buildsym.o, breakpoint.o, blockframe.o, ax-gdb.o)
	(alpha-tdep.o, ada-lang.o, ada-exp.tab.o, mi-cmd-stack.o): Ditto.
	* value.h: Add opaque declaration for struct block.
	* parser-defs.h, objc-lang.h, buildsym.h, breakpoint.h: Ditto.
	* ada-lang.h: Ditto.
	* x86-64-tdep.c: #include "block.h"
	* values.c, valops.c, tracepoint.c, symtab.c, symmisc.c: Ditto.
	* symfile.c, stack.c, printcmd.c, p-exp.y, parse.c: Ditto.
	* objfiles.c, objc-exp.y, objc-lang.c, nlmread.c: Ditto.
	* mips-tdep.c, mdebugread.c, m2-exp.y, linespec.c: Ditto.
	* jv-lang.c, jv-exp.y, infcmd.c, f-valprint.c: Ditto.
	* findvar.c, f-exp.y, expprint.c, coffread.c, c-exp.y: Ditto.
	* buildsym.c, breakpoint.c, blockframe.c, ax-gdb.c: Ditto.
	* alpha-tdep.c, ada-lang.c, ada-exp.y: Ditto.
	* blockframe.c (blockvector_for_pc_sect): Move to "block.c".
	(blockvector_for_pc, block_for_pc_sect, block_for_pc): Ditto.
	* symtab.c (block_function): Ditto.
	(contained_in): Ditto.
	* frame.h: Move block_for_pc and block_for_pc_sect declarations to
	block.h.  Add opaque declaration for struct block.
	* symtab.h: Move block_function and contained_in declarations to
	block.h.  Add opaque declarations for struct block, struct
	blockvector.
	(struct block): Move to block.h.
	(struct blockvector): Ditto.
	(BLOCK_START, BLOCK_END, BLOCK_FUNCTION, BLOCK_SUPERBLOCK)
	(BLOCK_GCC_COMPILED, BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM)
	(BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE)
	(ALL_BLOCK_SYMBOLS, BLOCK_SHOULD_SORT, BLOCKVECTOR_NBLOCKS)
	(BLOCKVECTOR_BLOCK, GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK):
	Ditto.
	* block.c: New file.
	* block.h: New file.

2003-02-19  David Carlton  <carlton@math.stanford.edu>

	* mi-cmd-stack.c: #include "block.h"
2003-02-20 00:01:07 +00:00
Adam Fedor 379b85dfc1 gdb/parser-defs.h: (struct objc_class_str): New structure
for parsing ObjC classes.
2002-11-19 03:15:01 +00:00
Andrew Cagney e36180d795 2002-09-25 Andrew Cagney <cagney@redhat.com>
* frame.c: Include "gdb_string.h" and "builtin-regs.h".
	(frame_map_regnum_to_name): New function.
	(frame_map_name_to_regnum): New function.
	* frame.h (frame_map_name_to_regnum): Declare.
	(frame_map_regnum_to_name): Declare.
	* builtin-regs.c (builtin_reg_map_regnum_to_name): New function.
	* builtin-regs.h (builtin_reg_map_regnum_to_name): Declare.
	* parse.c: Do not include "builtin-regs.h".
	(target_map_name_to_register): Delete function.
	(write_dollar_variable): Use frame_map_name_to_regnum.
	* parser-defs.h (target_map_name_to_register): Delete declaration.
	* expprint.c: Include "frame.h".
	(print_subexp): Use frame_map_regnum_to_name.
	* eval.c (evaluate_subexp_standard): Use frame_map_regnum_to_name.
	* infcmd.c (registers_info): Use frame_map_name_to_regnum.

2002-09-25  Andrew Cagney  <cagney@redhat.com>

	* gdb.base/pc-fp.exp, gdb.base/pc-fp.c: New test.
2002-09-25 20:30:38 +00:00
Andrew Cagney 389e51db10 Revert previous change. Not obvious. 2002-09-19 03:58:41 +00:00
Michael Snyder 3b4efeaa2d 2002-09-18 Michael Snyder <msnyder@redhat.com>
Preliminary support for Objective-C:
	* defs.h (language_objc): New enum value.
	(puts_filtered_tabular): Declaration only, exported from utils.c.
	(skip_quoted): Delete, declared in completer.h.
	* c-exp.y: Include completer.h.
	* p-exp.y: Ditto.
	* jv-exp.y: Ditto.
	* expression.h (OP_MSGCALL, OP_SELECTOR, OP_SELF, OP_NSSTRING):
	New operator enum values.
	* language.h (CAST_IS_CONVERSION): Test for language_objc.
	* language.c (binop_result_type): Handle language_objc case.
	(integral_type, character_type, string_type, boolean_type,
	structured_type, binop_type_check): Ditto.
	* symtab.h (SYMBOL_OBJC_DEMANGLED_NAME): Define.
	(struct objc_specific): Add to general_symbol_info.
	(SYMBOL_INIT_LANGUAGE_SPECIFIC): Add objc initialization.
	(SYMBOL_DEMANGLED_NAME): Handle objc case.
	* parser-defs.h (struct objc_class_str): New struct type.
	(start_msglist, end_msglist, add_msglist): Declaration only,
	exported from objc-lang.c.
	* value.h (value_of_local, value_nsstring,
	call_function_by_hand_expecting_type): Exported from valops.c.
	* valops.c (find_function_addr): Export.
	(call_function_by_hand_expecting_type): New function.
	(value_of_local): New function.
	* symfile.c (init_filename_language_table): Add ".m" extension
	for Objective-C.
	* utils.c (puts_filtered_tabular): New function.
	(fprintf_symbol_filtered): Add objc demangling support (disabled).
	(set/show demangle): Extend help-string to refer to ObjC.
	* elfread.c (elf_symtab_read): Skip Objective-C special symbols.
	* stabsread.c (symbol_reference_defined): Objective-C symbols
	may contain colons: make allowances when scanning stabs strings
	for colons.
	(objc_find_colon): New function.
	* printcmd.c (address_info): If language == objc then print
	"self" instead of "this".
	* parse.c (length_of_subexp): Handle new operators OP_MSGCALL,
	OP_NSSTRING, and OP_SELF.
	(prefixify_subexp): Ditto.
	* source.c (print_source_lines): Mention objc in comment.
	* breakpoint.c (parse_breakpoint_sals): Recognize Objective-C
	method names.
2002-09-19 01:34:51 +00:00
Jim Blandy f7321c061e * parser-defs.h (expression_context_pc): Make this extern.
(Thanks to Michael Snyder.)
2002-07-24 03:03:52 +00:00
Pierre Muller f461f5cf79 2002-06-19 Pierre Muller <muller@ics.u-strasbg.fr>
* parse.c (parse_fprintf): New function used to avoid calls to
	fprintf in bison parser generated debug code.
	* parser-defs.h: Declaration of new parse_fprintf function.
	* ada-exp.y, c-exp.y, f-exp.y, jv-exp.y, m2-exp.y, p-exp.y:
	Set YYDEBUG to 1 by default.
	Set YYFPRINTF as parse_fprintf.
2002-06-21 14:32:10 +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
Michael Snyder 665132f945 2002-04-24 Michael Snyder <msnyder@redhat.com>
* parser-defs.h (prev_lexptr): New external variable.
	* parse.c (parse_exp_1): Set prev_lexptr to null before
	calling the language-specific parser.
	* c-exp.y (yylex): Set prev_lexptr to start of current token.
	(yyerror): Use prev_lexptr in error reporting.
2002-04-24 22:26:32 +00:00
Andrew Cagney 96cb11df6d * frame.c (read_relative_register_raw_bytes_for_frame): Do not
override FP_REGNUM with frame->fp.  Update copyright.
* parse.c (num_std_regs, std_regs): Delete.
(target_map_name_to_register): Do not search std_regs.  Update
function description.
* parser-defs.h (num_std_regs, std_regs, struct std_regs): Delete
declarations.  Update copyright.
Fix PR gdb/251.
2002-04-09 22:14:39 +00:00
Michael Snyder 47663de598 2001-11-14 Michael Snyder <msnyder@redhat.com>
Add address space identifiers to expression language for types.
	* c-exp.y (space_identifier, cv_with_space_id,
	const_or_volatile_or_space_identifier_noopt,
	const_or_volatile_or_space_identifier): New terminals.
	(ptype): Accept const_or_volatile_or_space_identifier.
	(typebase): Accept const_or_volatile_or_space_identifier.
	* c-typeprint.c (c_type_print_cv_qualifier): Rename to
	c_type_print_modifier.  Handle address space modified types.
	* gdbtypes.h (TYPE_FLAG_CODE_SPACE, TYPE_FLAG_DATA_SPACE):
	New type flags.
	(struct type): Add new field as_type for addr-space qualified types.
	(TYPE_AS_TYPE): New macro, retrieves the chain of types that are
	identical to this one except for address-space qualification.
	* gdbtypes.c (alloc_type): Initialize new field 'as_type'.
	(address_space_name_to_int): New function.
	(address_space_int_to_name): New function.
	(make_type_with_address_space): New function.
	(make_cv_type): Handle as_type field of new struct type object.
	* parse.c (check_type_stack_depth): New function.
	(push_type_address_space): New function.
	(follow_types): Handle types with address-space qualifier.
	* parser-defs.h (enum type_pieces): Add enum tp_space_identifier.
2001-11-15 01:55:59 +00:00
Michael Snyder 2e2394a075 2001-09-20 Michael Snyder <msnyder@redhat.com>
Changes by Daniel Berlin  <dan@cgsoftware.com>, to support
	better parsing of const and volatile type expressions.
	* c-exp.y (const_and_volatile, const_or_volatile_noopt,
	const_or_volatile): New non-terminals.
	(ptype): Use new rule for const_or_volatile.
	(typebase): Use new rule for const_or_volatile_noopt.
	* parser-defs.h (enum type_pieces): New values tp_const, tp_volatile.
	* parse.c (follow_types): Handle tp_const and tp_volatile on the
	type stack: call make_cv_type to create new const/volatile type.
2001-09-27 22:39:05 +00:00
Andrew Cagney d16aafd8c8 * defs.h (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_LONG_DOUBLE_FORMAT, DOUBLEST)
(floatformat_to_doublest, floatformat_from_doublest)
(floatformat_is_negative, floatformat_is_nan)
(floatformat_mantissa, store_floating)
(extract_floating): Move declaration from here.
* doublest.h: To here.  New file.
* utils.c (get_field, floatformat_to_doublest, put_field)
(ldfrexp, floatformat_from_doublest, floatformat_is_negative)
(floatformat_is_nan, floatformat_mantissa)
(FLOATFORMAT_CHAR_BIT): Move from here.
* doublest.c: To here.  New file.
* findvar.c (store_floating, extract_floating): Move from here.
* doublest.c: To here.
* Makefile.in (SFILES): Add doublest.c.
(COMMON_OBS): Add doublest.o.
(doublest.o): Specify dependencies.
(doublest_h): Define.

* config/m88k/tm-m88k.h: Include "doublest.h".
* config/i960/tm-i960.h: Ditto.
* config/i386/tm-symmetry.h: Ditto.
* rs6000-tdep.c, valarith.c: Ditto.
* valprint.c, stabsread.c, sh-tdep.c: Ditto.
* ia64-tdep.c, i387-tdep.c, i386-tdep.c: Ditto.
* values.c, arm-tdep.c, arm-linux-tdep.c: Ditto.
* alpha-tdep.c, ax.h, expression.h: Ditto.
* sh-tdep.c, parse.c, top.c, value.h: Ditto.

* Makefile.in (arm-tdep.o): Add $(doublest_h).
(i386-tdep.o, i387-tdep.o, ia64-tdep.o): Ditto.
(rs6000-tdep.o, stabsread.o, valarith.o): Ditto.
(values.o, valprint.o, arm-linux-tdep.o): Ditto.
(alpha-tdep.o, ax_h, parse.o, top.o, value_h): Ditto.
(parser_defs_h): Ditto.
(expression_h): Add $(doublest_h) and $(symtab_h).
2001-08-01 18:39:27 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda cce74817d9 import gdb-1999-06-07 snapshot 1999-06-07 19:19:32 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
David Taylor 4770ff087a Start of HP merge changes to GDB. 1998-12-10 21:25:43 +00:00
Per Bothner 8d2755a953 * c-lang.h, cp-valprint.c (static_field_print): Make non-static.
* parse.c, parser-defs.h (length_of_subexp):  Make non-static.
	* jv-exp.y (FieldAccess):  Handle dollar-VARIABLE as primary.
	(ArrayAccess):  Likewise.  Also remove warnings.
	(CastExpression):  Implement (typename) UnaryExpression.
	(push_qualified_expression_name):  Fix small bug.
	* jv-lang.c:  Use TYPE_TAG_NAME, not TYPE_NAME for class names.
 	(_initialize_jave_language):  Fix typo (jave -> java).
	(java_language):  Java does *not* have C-style arrays.
	(java_class_from_object):  Make more general (and complicated).
	(java_link_class_type):  Fix typo "super" -> "class".  Handle arrays.
	(java_emit_char, java_printchar):  New function.
	(evaluate_subexp_java case BINOP_SUBSCRIPT):  Handle Java arrays.
	* jv-valprint.c (java_value_print):  Implement printing of Java arrays.
	(java_print_value_fields):  New function.
	(java_val_print):  Better printing of TYPE_CODE_CHAR, TYPE_CODE_STRUCT.
1997-10-03 23:05:12 +00:00
Fred Fish b52cac6b76 * core-aout.c (fetch_core_registers): Cast core_reg_size to int
before testing against reg_ptr.
	* eval.c (evaluate_subexp_standard): Cast type of
	TYPE_FN_FIELD_VOFFSET to int.
	* findvar.c (extract_signed_integer, extract_unsigned_integer,
	extract_long_unsigned_integer): Cast type of sizeof to int.
	* values.c (unpack_field_as_long, modify_field): Ditto.
	* valops.c (value_assign, call_function_by_hand): Ditto.
	* infcmd.c (do_registers_info): Ditto.
	* ser-tcp.c (tcp_open): Ditto
	* remote.c (putpkt): Ditto.
	* dcache.c (dcache_peek): Ditto.
	* dcache.c (dcache_poke): Ditto.
	* m2-exp.y (yylex): Ditto.
	* gnu-regex.c (re_match_2): Ditto.
	* f-lang.c (ADD_BF_SYMNUM, saved_bf_list_end, tmp_bf_ptr): Ifdef
	out unused macro definition and variables.
	* inftarg.c (proc_wait): Move from main.c to here, and make static.
	* valprint.c (val_print_string): Change bufsize from int to unsigned.
	* main.c (wait.h): Include
	* top.c (command_line_input): Remove unused variable "c".
	* f-typeprint.c (f_type_print_varspec_prefix): Add missing enum
	value TYPE_CODE_TYPEDEF to switch statement.
	(f_type_print_varspec_suffix): Add missing enum value
	TYPE_CODE_TYPEDEF to switch statement.
	* ch-exp.c (parse_primval): Add remaining enumeration values to
	switch statement, with no specific action.
	(ch_lex): Add LOC_UNRESOLVED in switch statement.
	(pushback_token): Ifdef out, since code using it is ifdef'd out.
	* stabsread.c (cleanup_undefined_types): Remove unused label
	"badtype".
	* objfiles.h (print_symbol_bcache_statistics): Add prototype.
	* maint.c (objfiles.h): Include.
	(maintenance_print_statistics): Remove unused variable "temp".
	* minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove
	unused variable "found_file_symbol".
	* m2-exp.y (yylex): Add LOC_UNRESOLVED case to switch.
	* language.c (lang_bool_type): Use existing function local type
	variable rather than create block local variables.
	* solib.c (disable_break): Enclose in ifndef SVR4_SHARED_LIBS.
	* infptrace.c (wait.h, command.h): Include.
	* ser-tcp.c (gdb_string.h): Include
	* i386-tdep.c (codestream_seek): Change "place" to CORE_ADDR.
	(i386_get_frame_setup): Change "pc" from int to CORE_ADDR.
	* command.c (complete_on_enum): Make assignment used as truth value
	explictly check against NULL.
	(wait.h): Include.
	* infrun.c (wait_for_inferior): Ifdef out prologue_pc since code
	that uses it is ifdef'd out.
	* parser-defs.h: Add prototype for write_dollar_variable.
	* infrun.c: Add prototype for write_pc_pid.
	* breakpoint.h: Add prototype for re_enable_breakpoints_in_shlibs.
	* symmisc.c (bcache.h): Include.
	* bcache.h: Add prototype for print_bcache_statistics.
	* symfile.c: Include <time.h>.
	* printcmd.c (print_scalar_formatted): Change len to unsigned int.
	* valarith.c (value_equal): Cast result of TYPE_LENGTH to int.
	* valarith.c (value_binop): Change result_len, promoted_len1,
 	and promoted_len2 to unsigned int.
	* valarith.c (value_subscripted_rvalue): Change elt_offs and
 	elt_size to unsigned int.
	* valops.c (value_array): Change typelength to unsigned int.
	(destructor_name_p): Change len to unsigned int.
	* scm-lang.h (scm_parse): Add prototype for scm_unpack.
	* symfile.c (decrement_reading_symtab): Change return type to void.
	* valarith.c (value_subscript): Remove unused variable "word".
	(value_subscript): Remove unused variable "tint".
	* valops.c (auto_abandon): Ifdef out, since code using it is also
	ifdef'd out.
	* eval.c (init_array_element): Remove unused variable "val".
	* Makefile.in (values.o): Depends on scm-lang.h.
	(command.o): Depends upon wait_h.
	(ser-tcp.o): Depends upon gdb_string.h.
	(infptrace.o): Depends upon wait_h and command_h.
	(maint.o): Depends on objfiles.h and symfile.h.
	* values.c (allocate_repeat_value): Remove unused variable
	"element_type".
	(scm-lang.h): Include.
	* breakpoint.c (create_longjmp_breakpoint): Enclose in
	GET_LONGJMP_TARGET define, unused otherwise.
	* config/i386/nm-linux.h: Add prototypes for i386_insert_watchpoint,
	i386_remove_watchpoint and i386_stopped_by_watchpoint.
1996-03-30 05:45:10 +00:00
Stu Grossman aa220473ba * Add native support for long double data type.
* c-exp.y (%union):  Change dval to typed_val_float.  Use DOUBLEST
	to store actual data.  Change types of INT and FLOAT tokens to
	typed_val_int and typed_val_float respectively.  Create new token
	DOUBLE_KEYWORD to specify the string `double'.  Make production
	for FLOAT use type determined by parse_number.  Add production for
	"long double" data type.
	* (parse_number):  Use sscanf to parse numbers as float, double or
	long double depending upon the type of typed_val_float.dval.  Also
	allow user to specify `f' or `l' suffix to explicitly specify
	float or long double constants.  Change typed_val to
	typed_val_int.
	* (yylex):  Change typed_val to typed_val_int.  Also, scan for
	"double" keyword.
	* coffread.c (decode_base_type):  Add support for T_LNGDBL basic
	type.
	* configure, configure.in:  Add check for long double support in
	the host compiler.
	* defs.h:  Define DOUBLEST appropriatly depending on whether
	HAVE_LONG_DOUBLE (from autoconf) is defined.  Also, fix prototypes
	for functions that handle this type.
	* expression.h (union exp_element):  doubleconst is now type
	DOUBLEST.
	* m2-exp.y f-exp.y (%union):  dval becomes type DOUBLEST.
	* findvar.c (extract_floating):  Make return value be DOUBLEST.
	Also, add support for numbers with size of long double.
	* (store_floating):  Arg `val' is now type DOUBLEST.  Handle all
	floating types.
	* parser-defs.h parse.c (write_exp_elt_dblcst):  Arg expelt is now
	DOUBLEST.
	* valarith.c (value_binop):  Change temp variables v1, v2 and v to
	type DOUBLEST.  Coerce type of result to long double if either op
	was of that type.
	* valops.c (value_arg_coerce):  If argument type is bigger than
	double, coerce to long double.
	* (call_function_by_hand):  If REG_STRUCT_HAS_ADDR is defined, and
	arg type is float and > 8 bytes, then use pointer-to-object
	calling conventions.
	* valprint.c (print_floating):  Arg doub is now type DOUBLEST.
	Use appropriate format and precision to print out floating point
	values.
	* value.h:  Fixup prototypes for value_as_double,
	value_from_double, and unpack_double to use DOUBLEST.
	* values.c (record_latest_value):  Remove check for invalid
	floats.  Allow history to store them so that people may examine
	them in hex if they want.
	* (value_as_double unpack_double):  Change return value to DOUBLEST.
	* (value_from_double):  Arg `num' is now DOUBLEST.
	* (using_struct_return):  Use RETURN_VALUE_ON_STACK macro (target
	specific) to expect certain types to always be returned on the stack.
1996-02-17 00:07:35 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
Per Bothner 6137983598 * parser-defs.h (enum precedence): Added PREC_BUILTIN_FUNCTION.
* expression.h (enum exp_opcode):  Added UNOP_LOWER, UNOP_UPPER,
	UNUP_LENGTH.
	* expprint.c (dump_expression):  Handle the new exp_opcodes.
	(print_subexp):  Handle PREC_BUILTIN_FUNCTION.
	(print_simple_m2_func):  Removed.
	(print_subexp):  Remove support for Modula2 builtin functions.
	* m2-lang.c (m2_op_print_tab):  Add support for builtin functions.
	* ch-exp.y:  Parse LOWER, UPPER, and LENGTH builtins.
	(write_lower_upper_value):  Convenience function for LOWER and UPPER.
	(upper_lower_argument, length_argument):  Removed non-terminals.
	* ch-lang.c (chill_op_print_tab):  Entries for UPPER, LOWER, LENGTH.
	(type_lower_upper):  New function.  Calculate LOWER/UPPER of type.
	(value_chill_length):  New function.  Calcalate LENGTH of ARRAY/STRING.
	(evaluate_subexp_chill):  Handle UNOP_LOWER, UNOP_UPPER, UNOP_LENGTH.
This fixes PR 5015 (and 5826 which is a duplicate).
1995-06-14 19:59:35 +00:00
Per Bothner ddf54546c9 * parser-defs.h: Add comment about unary postfix operators. 1994-09-16 07:35:27 +00:00
Jim Kingdon 703e4251af * parse.c: Don't define block_found; it is defined in symtab.c.
* parser-defs.h: Add comment regarding block_found.
1994-04-20 15:48:08 +00:00
Jim Kingdon 7944822188 * parser-defs.h: Add "extern" to start of variable declarations so
we don't end up with commons.
	* parse.c: Define these variables.
1994-03-08 15:25:00 +00:00
Jim Kingdon abe28b9214 Sun Oct 24 20:16:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* parse.c, parser-defs.h (write_exp_msymbol):  New function to write
	the appropriate expression for a minimal symbol.
	* c-exp.y, m2-exp.y:  Use it.
1993-10-24 23:42:02 +00:00
Jim Kingdon 100f92e2de * Makefile.in (c-exp.tab.o): Remove notice about shift/reduce conflicts
which no longer occur.

	gcc -Wall lint:
	* findvar.c (symbol_read_needs_frame), corelow.c (ignore),
	inflow.c (gdb_has_a_terminal): Make sure to return a value.
	* regex.h: Declare re_set_syntax.
	* printcmd.c: Include valprint.h.
	* infcmd.c, exec.c, maint.c, core.c: Include language.h.
	* maint.c: Include expression.h.
	* infrun.c, fork-child.c, corelow.c, inflow.c: Include thread.h.
	* inftarg.c: Include command.h.
	* coredep.c: Include value.h.
	* c-exp.y, m2-exp.y, ch-exp.y: Include bfd.h, symfile.h and objfiles.h.
	* ch-typeprint.c: Include typeprint.h.
	* ch-valprint.c: Include c-lang.h.
	* nlmread.c: Include buildsym.h.
	* environ.c: Include gdbcore.h.  Only include defs.h once.
	(set_in_environ): Cast const char * to char * when passing to
	set_gnutarget.
	Remove unused variables:
	* printcmd.c (printf_command): args_to_vprintf.
	* coffread.c (coff_symfile_init): strsection.
	Move variables to within the #ifdefs where they are used:
	* symtab.c (gdb_mangle_name): opname.
	* inftarg.c (child_attach): pid and exec_file.
	* inftarg.c (child_detach): siggnal.
	* objfiles.c (allocate_objfile): mapto, md, and fd.
	* objfiles.c (free_objfile): mmfd.
	* infrun.c (wait_for_inferior): Include BPSTAT_WHAT_LAST in switch.
	* infrun.c (wait_for_inferior): Remove unused same_pid label.
	* inferior.h: Declare set_sigint_trap and clear_sigint_trap.
	* parser-defs.h: Declare write_exp_elt_block.
	* stabsread.h: Declare elfstab_offset_sections and
	coffstab_build_psymtabs.
1993-10-21 20:41:50 +00:00
Jim Kingdon f843c95fc3 * parse.c, parser-defs.h (follow_types): New function.
* c-exp.y (ptype : typebase abs_decl): Use it.
	* c-exp.y (ptype): Add support for type qualifiers after the
	typebase.  The typebase rule already has support for them before
	the typebase.
	* Makefile.in: Change the expected number of shift/reduce
	conflicts to 6.  This is OK--the 2 new conflicts are basically the
	same as one of the old ones.
1993-10-18 01:10:25 +00:00
Fred Fish 9da75ad32e * c-exp.y (lcurly, rcurly): New nonterminals.
* c-exp.y (exp):  Use lcurly and rcurly for arrays and UNOP_MEMVAL
	constructs.
	* parse.c (free_funcalls):  Moved prototype from parser-defs.h,
	made function static.
	* parse.c (struct funcall):  Moved struct def from parser-defs.h.
	* parse.c (funcall_chain):  Moved from parser-defs.h, made static.
	* parse.c (start_arglist):
	* parser-defs.h (free_funcalls):  Moved prototype to parse.c.
	* parser-defs.h (struct funcall):  Moved struct def to parse.c.
	* parser-defs.h (funcall_chain):  Moved to parse.c.
	* printcmd.c (print_frame_nameless_args): Fix prototype.
	* tm-mips.h (setup_arbitrary_frame):  Fix prototype.
	* tm-sparc.h (setup_arbitrary_frame):  Fix prototype.
	* valops.c (typecmp):  Moved prototype from values.h.
	* value.h (typecmp):  Moved prototype to valops.c, made static.
	**** start-sanitize-chill ****
	* ch-exp.y (yylex):  Change way control sequences are disabled.
	**** end-sanitize-chill ****
1993-02-03 00:28:54 +00:00
Fred Fish 81028ab0e7 * defs.h (HOST_CHAR_BIT): New macro, defaults to either CHAR_BIT
from a configuration file (typically including <limits.h>), or to
	TARGET_CHAR_BIT if CHAR_BIT is not defined.
	* eval.c (evaluate_subexp):  Use new BYTES_TO_EXP_ELEM macro.
	* eval.c (evaluate_subexp):  Add case for OP_BITSTRING.
	* expprint.c (print_subexp):  Use new BYTES_TO_EXP_ELEM macro.
	* exppritn.c (print_subexp, dump_expression):  Add case for
	OP_BITSTRING.
	* expression.h (OP_BITSTRING):  New expression element type for
	packed bitstrings.
	* expression.h (EXP_ELEM_TO_BYTES, BYTES_TO_EXP_ELEM):  New
	macros to convert between number of expression elements and bytes
	to store that many elements.
	* i960-tdep.c (leafproc_return):  Use new macros to access
	minimal symbol name and address fields.
	* m88k-pinsn.c (sprint_address):  Use new macros to access
	minimal symbol name and address fields.
	* nindy-tdep.c (nindy_frame_chain_valid):  Use new macro to access
	minimal symbol address field.
	* parse.c (write_exp_elt, write_exp_string, prefixify_expression,
	parse_exp_1):  Use new EXP_ELEM_TO_BYTES macro.
	* parse.c (write_exp_string, length_of_subexp, prefixify_expression):
	Use new BYTES_TO_EXP_ELEM macro.
	* parse.c (write_exp_bitstring):  New function to write packed
	bitstrings into the expression element vector.
	* parse.c (length_of_subexp, prefixify_subexp):  Add case for
	OP_BITSTRING.
	* parser-defs.h (struct stoken):  Document that it is used for
	OP_BITSTRING as well as OP_STRING.
	* parser-defs.h (write_exp_bitstring):  Add prototype.
	**** start-sanitize-chill ****
	* ch-exp.y (BIT_STRING_LITERAL):  Change token type to sval.
	* ch-exp.y (NUM, PRED, SUCC, ABS, CARD, MAX, MIN, SIZE, UPPER,
	LOWER, LENGTH):  New tokens for keywords.
	* ch-exp.y (chill_value_built_in_routine_call, mode_argument,
	upper_lower_argument, length_argument, array_mode_name,
	string_mode_name, variant_structure_mode_name):  New non-terminals
	and productions.
	* ch-exp.y (literal):  Useful production for BIT_STRING_LITERAL.
	* ch-exp.y (match_bitstring_literal):  New lexer support function
	to recognize bitstring literals.
	* ch-exp.y (tokentab6):  New token table for 6 character keywords.
	* ch-exp.y (tokentab5):  Add LOWER, UPPER.
	* ch-exp.y (tokentab4):  Add PRED, SUCC, CARD, SIZE.
	* ch-exp.y (tokentab3):  Add NUM, ABS, MIN, MAX.
	* ch-exp.y (yylex):  Check tokentab6.
	* ch-exp.y (yylex):  Call match_bitstring_literal.
	**** end-sanitize-chill ****
1993-01-06 16:52:10 +00:00
Fred Fish e58de8a230 * Makefile.in (SFILES_MAINDIR): Add ch-exp.y.
* Makefile.in (YYFILES):  Add ch-exp.tab.c.
	* Makefile.in (YYOBJ):  Add ch-exp.tab.o.
	* Makefile.in (saber_gdb):  Add unload of ch-exp.y and load
	of ch-exp.tab.c.
	* Makefile.in (distclean):  Add target ch-exp.tab.c.
	* Makefile.in (realclean):  Add rm of ch-exp.tab.c.
	* Makefile.in (c-exp.tab.c, m2-exp.tab.c):  Add dependency on
	Makefile since it contains sed patterns used in generation.
	Add sed pattern to also delete #include of any malloc.h.
	* Makefile.in (ch-exp.tab.o, ch-exp.tab.c):  New targets.
	* ch-exp.y:  New expression parser, for GNU-Chill.
	* c-exp.y, expr.c, expression.h, language.c, m2-exp.y,
	parser-defs.h, valarith.c, valops.c, value.h:  Remap macros and
	function names to conform to K&R terminology with respect to
	logical and bitwise operators:
	UNOP_ZEROP => UNOP_LOGICAL_NOT
	UNOP_LOGNOT => UNOP_COMPLEMENT
	BINOP_LOGAND => BINOP_BITWISE_AND
	BINOP_LOGXOR => BINOP_BITWISE_XOR
	BINOP_LOGIOR => BINOP_BITWISE_IOR
	BINOP_AND => BINOP_LOGICAL_AND
	BINOP_OR => BINOP_LOGICAL_OR
	PREC_OR => PREC_LOGICAL_OR
	PREC_AND => PREC_LOGICAL_AND
	PREC_LOGIOR => PREC_BITWISE_IOR
	PREC_LOGXOR => PREC_BITWISE_XOR
	PREC_LOGAND => PREC_BITWISE_AND
	value_zerop() => value_logical_not()
	value_lognot() => value_complement()
	* c-exp.y (c_op_print_tab):  Add explicit empty terminator.
	* m2-exp.y (m2_op_print_tab):  Add explicit empty terminator.
	* defs.h (enum language):  Add language_chill.
	* dwarfread.c (set_cu_language):  Add LANG_CHILL case and make
	LANG_MODULA2 a recognized language.
	* eval.c (evaluate_subexp):  Add OP_BOOL case.
	* expprint.c (print_subexp):  Add OP_BOOL case.
	* gdbtypes.h (enum_typecode):  Note TYPE_CODE_BOOL used for
	Chill as well as Modula-2.
	* gdbtypes.y (builtin_type_chill_bool, builtin_type_chill_long,
	builtin_type_chill_ulong, builtin_type_chill_real):  Add.
	* i387-tdep.c (sys/dir.h):  Remove, appears to be unnecessary
	and is nonexistant in some SVR4 based systems.
	* language.c (DEFAULT_ALLOCSIZE):  Change from 3 => 4.
	* language.c (set_language_command):  Add chill.
	* language.c (binop_result_type, integral_type, character_type,
	boolean_type, structured_type, value_true, binop_type_check):
	Add language_chill cases.
	* language.h (_LANG_chill):  Define.
	* m2-exp.y (number_sign, modblock):  Make static, #ifdef out
	unused modblock.
	* m2-exp.y (ANDAND):  Rename to LOGICAL_AND.
	* source.c (source_info):  Fix minor nits, print "1 line" rather
	than "1 lines", and "language is <lang>".
	* symfile.c (deduce_language_from_filename):  Recognize the
	filename extensions ".chill", ".c186", and ".c286" for Chill.
	* valarith.c (value_binop):  Handle TYPE_CODE_BOOL as well
	as TYPE_CODE_INT and TYPE_CODE_FLOAT.
	* valprint.c (val_print):  Print TYPE_CODE_BOOL type values as
	"TRUE" or "FALSE".
	* valprint.c (typedef_print):  Add case for language_chill.
	* values.c (value_from_longest):  Handle TYPE_CODE_BOOL.
1992-11-15 17:28:02 +00:00
John Gilmore 1ab3bf1b14 * Check in Fred Fish's changes in these modules. Fred
will make ChangeLog entries for all of them.
1992-02-22 01:46:16 +00:00
John Gilmore 3d6b6a9075 * parse.c: New file with the common code remains of expread.y.
* expread.y, expread.tab.c:  Remove.
* parser-defs.h:  New file with common declarations from expread.y.
* c-exp.y:  New file with the C parser from expread.y.
* m2-exp.y:  New file with the Modula-2 parser.
1991-09-19 10:31:00 +00:00