Commit Graph

21 Commits

Author SHA1 Message Date
Jan Kratochvil 216f72a1ed DWARF-5: call sites
this patch updates all call sites related DWARF-5 renames.

gdb/ChangeLog
2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
	DW_AT_GNU_*.
	* common/common-exceptions.h (enum errors): Likewise.
	* dwarf2-frame.c (class dwarf_expr_executor): Likewise.
	* dwarf2expr.c (dwarf_block_to_dwarf_reg)
	(dwarf_expr_context::execute_stack_op): Likewise.
	* dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
	Likewise.
	* dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
	(dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
	(show_entry_values_debug, call_site_to_target_addr)
	(func_addr_to_tail_call_list, func_verify_no_selftailcall)
	(dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
	(entry_data_value_free_closure, value_of_dwarf_reg_entry)
	(value_of_dwarf_block_entry, indirect_pieced_value)
	(symbol_needs_eval_context::push_dwarf_reg_entry_value):
	(disassemble_dwarf_expression): Likewise.
	* dwarf2read.c (process_die, inherit_abstract_dies)
	(read_call_site_scope): Likewise.
	* gdbtypes.h (struct func_type, struct call_site_parameter)
	(struct call_site): Likewise.
	* stack.c (read_frame_arg): Likewise.
	* std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.

gdb/doc/ChangeLog
2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.texinfo (Print Settings, Tail Call Frames): Rename DW_OP_GNU_*,
	DW_TAG_GNU_* and DW_AT_GNU_*.

gdb/testsuite/ChangeLog
2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.arch/amd64-entry-value-param-dwarf5.S: New file.
	* gdb.arch/amd64-entry-value-param-dwarf5.c: New file.
	* gdb.arch/amd64-entry-value-param-dwarf5.exp: New file.
	* gdb.arch/amd64-entry-value.exp: Rename DW_OP_GNU_*, DW_TAG_GNU_* and
	DW_AT_GNU_*.
2017-02-20 21:00:55 +01:00
Joel Brobecker 61baf725ec update copyright year range in GDB files
This applies the second part of GDB's End of Year Procedure, which
updates the copyright year range in all of GDB's files.

gdb/ChangeLog:

        Update copyright year range in all GDB files.
2017-01-01 10:52:34 +04:00
Tom Tromey 01739a3b6a Rename OP_F90_RANGE to OP_RANGE.
This renames OP_F90_RANGE to OP_RANGE, and similarly renames the
f90_range_type enum.

2016-05-17  Tom Tromey  <tom@tromey.com>

	* std-operator.def (OP_RANGE): Rename from OP_F90_RANGE.
	* rust-lang.c: Don't include f-lang.h.
	(rust_range, rust_compute_range, rust_subscript)
	(rust_evaluate_subexp): Update.
	* rust-exp.y: Don't include f-lang.h.
	(ast_range, convert_ast_to_expression): Update.
	* parse.c (operator_length_standard): Update.
	* f-lang.h (enum f90_range_type): Move to expression.h.
	* f-exp.y: Use OP_RANGE.
	* expression.h (enum range_type): New enum; renamed from
	f90_range_type.
	* expprint.c: Don't include f-lang.h.
	(print_subexp_standard, dump_subexp_body_standard): Use OP_RANGE.
	* eval.c (value_f90_subarray, evaluate_subexp_standard): Update.
2016-05-17 12:02:03 -06:00
Tom Tromey c44af4ebc0 Add support for the Rust language
This patch adds support for the Rust language.

2016-05-17  Tom Tromey  <tom@tromey.com>
	    Manish Goregaokar <manishsmail@gmail.com>

	* symtab.c (symbol_find_demangled_name): Handle Rust.
	* symfile.c (init_filename_language_table): Treat ".rs" as Rust.
	* std-operator.def (STRUCTOP_ANONYMOUS, OP_RUST_ARRAY): New
	constants.
	* rust-lang.h: New file.
	* rust-lang.c: New file.
	* rust-exp.y: New file.
	* dwarf2read.c (read_file_scope): Add Rust producer sniffing.
	(dwarf2_compute_name, read_func_scope, read_structure_type)
	(read_base_type, read_subrange_type, set_cu_language)
	(new_symbol_full, determine_prefix): Handle Rust.
	* defs.h (enum language) <language_rust>: New constant.
	* Makefile.in (SFILES): Add rust-exp.y, rust-lang.c.
	(COMMON_OBS): Add rust-exp.o, rust-lang.o.

2016-05-17  Tom Tromey  <tom@tromey.com>

	* gdb.base/default.exp (set language): Add rust.
2016-05-17 12:02:00 -06:00
Joel Brobecker 618f726fcb GDB copyright headers update after running GDB's copyright.py script.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2016-01-01 08:43:22 +04:00
Joel Brobecker 32d0add0a6 Update year range in copyright notice of all files owned by the GDB project.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2015-01-01 13:32:14 +04:00
Yao Qi c9402c9579 Update comments to TERNOP_SLICE
TERNOP_SLICE was added for language Chill, but it is used for Ada and D later.
Since language Chill was removed from GDB, TERNOP_SLICE is only used for
Ada and D.  This patch is to update its comments.

gdb:

2014-07-20  Yao Qi  <yao@codesourcery.com>

	* std-operator.def: Update comments to TERNOP_SLICE.
2014-07-21 03:46:43 +08:00
Yao Qi ae8fddda32 Remove operator BINOP_RANGE
BINOP_RANGE was added by the following commit for chill language.

commit badefd2800
Author: Per Bothner <per@bothner.com>
Date:   Wed Nov 29 22:59:31 1995 +0000

        * expression.h (enum exp_opcode):  Add BINOP_RANGE.
        * expprint.c (dump_expression):  Support BINOP_RANGE.
        * eval.c (evaluate_subexp_standard):  Handle BINOP_RANGE (as error).
        (case MULTI_SUBSCRIPT):  Fix broken f77 value->int ad hoc conversion.
        * ch-lang.c (chill_op_print_tab):  Support BINOP_RANGE.
        (evaluate_subexp_chill):  Error on BINOP_COMMA.

Chill language is no longer supported, so we can remove BINOP_RANGE too.
This patch is to remove BINOP_RANGE.

gdb:

2014-07-20  Yao Qi  <yao@codesourcery.com>

	* std-operator.def: Remove BINOP_RANGE.
	* breakpoint.c (watchpoint_exp_is_const): Update.
	* expprint.c (dump_subexp_body_standard): Likewise.
	* eval.c (init_array_element): Remove dead code.
	(evaluate_subexp_standard): Likewise.
2014-07-21 03:46:37 +08:00
Yao Qi 9c81664074 Remove operator BINOP_IN
Chill language support was removed several years ago, and BINOP_IN
isn't used for Pascal.  This patch is to remove BINOP_IN.

gdb:

2014-07-20  Yao Qi  <yao@codesourcery.com>

	* std-operator.def: Remove BINOP_IN.
	* breakpoint.c (watchpoint_exp_is_const): Update.
	* eval.c (evaluate_subexp_standard): Likewise.
	* expprint.c (dump_subexp_body_standard): Likewise.
2014-07-21 03:46:33 +08:00
Joel Brobecker ecd75fc8ee Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Tom Tromey 6e72ca205c PR c++/9065:
* NEWS: Update.
	* breakpoint.c (watchpoint_exp_is_const): Add OP_TYPEID.
	* c-exp.y (TYPEID): New token.
	(exp): Add new TYPEID productions.
	(ident_tokens): Add "typeid".
	* cp-abi.c (cplus_typeid, cplus_typeid_type): New functions.
	* cp-abi.h (cplus_typeid, cplus_typeid_type): Declare.
	(struct cp_abi_ops) <get_typeid, get_typeid_type>: New fields.
	* eval.c (evaluate_subexp_standard) <OP_TYPEID>: New case.
	* expprint.c (dump_subexp_body_standard) <OP_TYPEID>: New
	case.
	* gnu-v3-abi.c (std_type_info_gdbarch_data): New global.
	(build_std_type_info_type, gnuv3_get_typeid_type)
	(gnuv3_get_typeid): New functions.
	(init_gnuv3_ops): Initialize std_type_info_gdbarch_data.  Set
	new fields on ABI object.
	* parse.c (operator_length_standard) <OP_TYPEID>: New case.
	* std-operator.def (OP_TYPEID): New.
gdb/testsuite
	* gdb.cp/typeid.cc: New file.
	* gdb.cp/typeid.exp: New file.
2013-04-15 17:36:14 +00:00
Joel Brobecker 28e7fd6234 Update years in copyright notice for the GDB files.
Two modifications:
  1. The addition of 2013 to the copyright year range for every file;
  2. The use of a single year range, instead of potentially multiple
     year ranges, as approved by the FSF.
2013-01-01 06:33:28 +00:00
Yao Qi f0559fff60 gdb:
2012-11-02  Yao Qi  <yao@codesourcery.com>

	* std-operator.def: Remove OP_LABELED.
	* eval.c: Remove the declaration of 'get_label'.
	(get_label): Remove.
	(evaluate_struct_tuple): Remove code handling OP_LABELED.
	Update comment.
	Remove local variable 'variantno' and related code.
	Replace 'substruct_type' with 'struct_type'.  Replace 'subfieldno'
	with 'fieldno'.
	* expprint.c (print_subexp_standard): Likewise.
	(dump_subexp_body_standard): Likewise.
	* parse.c (operator_length_standard): Likewise.

gdb/testsuite:

2012-11-02  Yao Qi  <yao@codesourcery.com>

	* gdb.base/setvar.exp: Test setting nested struct.
	* gdb.base/setvar.c (v_struct3): New.
2012-11-02 00:14:39 +00:00
Yao Qi 7507c54a53 gdb/
* std-operator.def: Remove TERNOP_SLICE_COUNT.
	* breakpoint.c (watchpoint_exp_is_const): Remove handling to
	TERNOP_SLICE_COUNT.
	* eval.c (evaluate_subexp_standard): Likewise.
	* expprint.c (print_subexp_standard): Likewise.
	(dump_subexp_body_standard): Likewise.
	* parse.c (operator_length_standard): Likewise.
2012-08-13 01:02:07 +00:00
Yao Qi 5cad973621 gdb/
* std-operator.def: Remove OP_BITSTRING.
	* breakpoint.c (watchpoint_exp_is_const): Update.
	* eval.c (evaluate_subexp_standard): Remove handling to
	OP_BITSTRING.
	* expprint.c (print_subexp_standard): Likewise.
	(dump_subexp_body_standard): Likewise.
	* parse.c (operator_length_standard): Likewise.
	* valops.c (value_bitstring): Remove.
	* value.h: Remove the declaration of 'value_bitstring'.
2012-08-13 00:54:04 +00:00
Tom Tromey 608b49672e PR exp/13206:
* ax-gdb.c (gen_expr) <OP_TYPEOF, OP_DECLTYPE>: New cases.
	* breakpoint.c (watchpoint_exp_is_const) <OP_TYPEOF,
	OP_DECLTYPE>: New cases.
	* c-exp.y (TYPEOF, DECLTYPE): New tokens.
	(type_exp): Add new productions.
	(ident_tokens): Add __typeof__, typeof, __typeof, __decltype,
	and decltype.
	* eval.c (evaluate_subexp_standard) <OP_TYPEOF, OP_DECLTYPE>:
	New case.
	* expprint.c (dump_subexp_body_standard) <OP_TYPEOF,
	OP_DECLTYPE>: New case.
	* parse.c (operator_length_standard) <OP_TYPEOF, OP_DECLTYPE>:
	New case.
	* std-operator.def (OP_TYPEOF, OP_DECLTYPE): New constants.
	* varobj.c (varobj_create): Handle OP_TYPEOF, OP_DECLTYPE.
gdb/testsuite
	* gdb.cp/casts.exp: Add tests for typeof and decltype.
	* gdb.cp/casts.cc (decltype): New function.
	(main): Use it.
2012-07-19 15:38:18 +00:00
Tom Tromey 9eaf670568 * ax-gdb.c (gen_expr): Handle UNOP_CAST_TYPE, UNOP_MEMVAL_TYPE.
* breakpoint.c (watchpoint_exp_is_const): Handle UNOP_CAST_TYPE,
	UNOP_REINTERPRET_CAST, UNOP_DYNAMIC_CAST.
	* c-exp.y (exp): Emit UNOP_MEMVAL_TYPE, UNOP_CAST_TYPE.  Update
	for changes to UNOP_REINTERPRET_CAST, UNOP_DYNAMIC_CAST.  Use
	type_exp production where appropriate.
	* eval.c (evaluate_subexp_standard) <UNOP_CAST_TYPE>: New case.
	<UNOP_DYNAMIC_CAST, UNOP_REINTERPRET_CAST>: Update.
	<UNOP_MEMVAL_TYPE>: New case.
	(evaluate_subexp_for_address) <UNOP_MEMVAL_TYPE>: New case.
	(evaluate_subexp_for_sizeof) <UNOP_MEMVAL_TYPE>: New case.
	* expprint.c (print_subexp_standard) <UNOP_CAST_TYPE>: New case.
	<UNOP_MEMVAL_TYPE>: New case.
	(dump_subexp_body_standard) <UNOP_DYNAMIC_CAST,
	UNOP_REINTERPRET_CAST>: Update.
	<UNOP_CAST_TYPE, UNOP_MEMVAL_TYPE>: New cases.
	* parse.c (operator_length_standard) <UNOP_DYNAMIC_CAST,
	UNOP_REINTERPRET_CAST>: Update.
	<UNOP_CAST_TYPE, UNOP_MEMVAL_TYPE>: New cases.
	* stack.c (return_command): Also check for UNOP_CAST_TYPE.
	* std-operator.def (UNOP_CAST_TYPE, UNOP_MEMVAL_TYPE): New
	constants.
2012-07-19 15:33:25 +00:00
Joel Brobecker 0b30217134 Copyright year update in most files of the GDB Project.
gdb/ChangeLog:

        Copyright year update in most files of the GDB Project.
2012-01-04 08:17:56 +00:00
Jan Kratochvil 36b11add17 gdb/
Support @entry in input expressions.
	* c-exp.y (ENTRY, unknown_cpp_name): New.
	(exp: UNKNOWN_CPP_NAME): Change to `exp: unknown_cpp_name'.
	(unknown_cpp_name: UNKNOWN_CPP_NAME, unknown_cpp_name: ENTRY)
	(variable: name_not_typename '@' ENTRY, name: ENTRY)
	(name_not_typename: ENTRY): New.
	(yylex): Recognize ENTRY.
	* eval.c (evaluate_subexp_standard): Support also OP_VAR_ENTRY_VALUE.
	* expprint.c (print_subexp_standard, dump_subexp_body_standard):
	Likewise.
	* parse.c (operator_length_standard): Likewise.
	* std-operator.def: New operator OP_VAR_ENTRY_VALUE.

gdb/doc/
	Support @entry in input expressions.
	* gdb.texinfo (Variables): Describe @entry names suffix.
	(Print Settings): Add anchor for `set print entry-values'.

gdb/testsuite/
	Support @entry in input expressions.
	* gdb.arch/amd64-entry-value.exp (entry: p i@entry, entry: p j@entry)
	(entry_stack: p s1@entry, entry_stack: p s2@entry)
	(entry_stack: p d9@entry, entry_stack: p da@entry, tailcall: p i@entry)
	(tailcall: p j@entry): New tests.
	* gdb.cp/koenig.cc (A::entry): New function.
	(main): Call it.
	* gdb.cp/koenig.exp (p entry (c)): New test.
2011-10-09 19:41:17 +00:00
Tom Tromey aee28ec61a * valops.c (value_of_local): Complain if NAME is NULL.
* std-operator.def (OP_OBJC_SELF): Remove.
	* parse.c (operator_length_standard) <OP_OBJC_SELF>: Remove.
	* objc-exp.y (name_not_typename): Use OP_THIS.
	* expprint.c (print_subexp_standard) <OP_THIS>: Print language's
	name for "this".
	<OP_OBJC_SELF>: Remove.
	* eval.c (evaluate_subexp_standard) <OP_OBJC_SELF>: Remove.
2011-06-17 20:24:22 +00:00
Jan Kratochvil 56c1241406 gdb/
Fix debug printing of BINOP_IN, OP_OBJC_MSGCALL,
	OP_F77_UNDETERMINED_ARGLIST, OP_COMPLEX, OP_OBJC_SELECTOR, OP_NAME,
	OP_OBJC_NSSTRING, OP_F90_RANGE and OP_DECFLOAT.
	* ada-operator.inc: Rename the file to ...
	* ada-operator.def: ... here, wrap all the entries by macro OP.
	* expprint.c (op_name_standard): Remove all the entries.  Include
	"std-operator.def" instead.
	* expression.h (enum exp_opcode): Include "std-operator.def" and
	"ada-operator.def".  Move all the entries ...
	* std-operator.def: ... here, wrap all the entries by macro OP.
2011-02-01 18:54:01 +00:00