Commit Graph

28559 Commits

Author SHA1 Message Date
Tom Tromey 03de682319 * symtab.c (lookup_language_this): End loop if block is NULL. 2011-06-20 17:53:33 +00:00
gdbadmin e7cce27aad *** empty log message *** 2011-06-20 00:00:03 +00:00
gdbadmin be47d07c72 *** empty log message *** 2011-06-19 00:00:33 +00:00
gdbadmin 2b8ef54e82 *** empty log message *** 2011-06-18 00:00:33 +00:00
Tom Tromey 66a17cb629 * valops.c (value_of_this): Use lookup_language_this.
* symtab.h (lookup_language_this): Declare.
	* symtab.c (lookup_language_this): New function.
	(lookup_symbol_aux): Use lookup_language_this.
	* ax-gdb.c (gen_expr) <OP_THIS>: Use lookup_language_this.
2011-06-17 20:46:47 +00:00
Tom Tromey 7518bff55a * value.h (value_of_this): Update.
(value_of_local): Remove.
	* valops.c (value_of_this): Rename from value_of_local.  Change
	parameters.
	* p-exp.y (exp): Update.
	(variable): Likewise.
	* eval.c (evaluate_subexp_standard) <OP_THIS>: Use value_of_this.
2011-06-17 20:35:09 +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
gdbadmin 9c92b47c98 *** empty log message *** 2011-06-17 00:00:32 +00:00
Tristan Gingold eed8f803b1 2011-06-16 Tristan Gingold <gingold@adacore.com>
* python/py-events.h (gdb_py_events): Make it extern.
	* python/py-evtregistry.c (gdb_py_events): Declare.
2011-06-16 05:54:09 +00:00
Hui Zhu 864ac8a76c 2011-06-16 Hui Zhu <teawater@gmail.com>
* remote.c (remote_trace_set_readonly_regions): Add check for
	remote_protocol_packets[PACKET_qXfer_traceframe_info].support before
	output warning.
2011-06-16 02:19:44 +00:00
gdbadmin a4379bc3eb *** empty log message *** 2011-06-16 00:00:03 +00:00
Ulrich Weigand ef7e8358ec * arm-linux-tdep.c: Include "auxv.h".
(AT_HWCAP): Define.
	(ARM_LINUX_SIZEOF_VFP): Define.
	(arm_linux_supply_vfp): New function.
	(arm_linux_collect_vfp): Likewise.
	(arm_linux_regset_from_core_section): Handle .reg-arm-vfp sections.
	(arm_linux_fpa_regset_sections): New variable.
	(arm_linux_vfp_regset_sections): Likewise.
	(arm_linux_core_read_description): New function.
	(arm_linux_init_abi): Install arm_linux_core_read_description and
	arm_linux_fpa_regset_sections or arm_linux_vfp_regset_sections as
	appropriate for the architecture.
	* arm-tdep.h (struct gdbarch_tdep): Add member "vfpregset".
	(tdesc_arm_with_m): Declare.
	(tdesc_arm_with_iwmmxt): Likewise.
	(tdesc_arm_with_vfpv2): Likewise.
	(tdesc_arm_with_vfpv3): Likewise.
	(tdesc_arm_with_neon): Likewise.
	* arm-linux-nat.c: Move features/*.c includes ...
	* arm-tdep.c: ... here.
	* arm-linux-nat.c (arm_linux_read_description): Move initializing
	target description data structures ...
	* arm-tdep.c (_initialize_arm_tdep): ... here.
	* arm-linux-nat.c (HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3,
	HWCAP_VFPv3D16): Move definitions ...
	* arm-linux-tdep.h: ... here.
2011-06-15 16:39:28 +00:00
Hui Zhu c2fa21f135 2011-06-15 Hui Zhu <teawater@gmail.com>
* remote.c (remote_trace_set_readonly_regions): Add a check for
	target_buf_size.
2011-06-15 14:40:22 +00:00
gdbadmin e0480cca6c *** empty log message *** 2011-06-15 00:00:02 +00:00
Tom Tromey dd707e8e61 * coffread.c (coffread_objfile): Rename from current_objfile.
* dbxread.c (dbxread_objfile): Rename from current_objfile.
	* mdebugread.c (mdebugread_objfile): Rename from current_objfile.
2011-06-14 18:53:14 +00:00
Tom Tromey 86cc002925 * jv-lang.c (jv_type_objfile_data_key, dynamics_objfile)
(class_symtab): Remove.
	(jv_dynamics_progspace_key): New global.
	(jv_per_objfile_free): Reset program space data.  Update assert.
	Don't clear globals.
	(get_dynamics_objfile): Use and set program space data.
	(get_java_class_symtab): Use get_dynamics_objfile.
	(add_class_symbol): Likewise.
	(java_link_class_type): Likewise.
	(java_object_type, jv_clear_object_type, set_java_object_type):
	Remove.
	(get_java_object_type): Update.  Don't cache result.
	(is_object_type): Don't call set_java_object_type.
	(_initialize_java_language): Don't set jv_type_objfile_data_key;
	initialize jv_dynamics_progspace_key.
2011-06-14 18:44:40 +00:00
Tom Tromey 91a81f6972 * symtab.h (current_objfile): Don't declare.
* objfiles.h (current_objfile): Don't declare.
	* objfiles.c (current_objfile): Remove.
	* mdebugread.c (current_objfile): New file-scope global.
	* dbxread.c (current_objfile): New file-scope global.
	* coffread.c (current_objfile): New file-scope global.
2011-06-14 16:49:41 +00:00
Yao Qi 5ce5db06f1 gdb/testsuite/
* gdb.threads/ia64-sigill.exp: Remove "set debug lin-lwp 1".
2011-06-14 08:03:32 +00:00
gdbadmin c6431bc370 *** empty log message *** 2011-06-14 00:00:33 +00:00
Pedro Alves dc7eb48e0a 2011-06-13 Pedro Alves <pedro@codesourcery.com>
gdb/
	* top.h (line): Rename to ...
	(saved_command_line): ... this.
	(linesize): Rename to ...
	(saved_command_line_size): ... this.
	* top.c (line): Rename to ...
	(saved_command_line): ... this.
	(linesize): Rename to ...
	(saved_command_line_size): ... this.
	(dont_repeat, command_line_input, dont_repeat_command): Adjust.
	* event-top.c (command_line_handler): Adjust.
	* main.c (captured_main): Adjust.
2011-06-13 10:55:27 +00:00
gdbadmin 49d4323bfb *** empty log message *** 2011-06-13 00:00:33 +00:00
Mark Kettenis 0d6c213503 * i386-tdep.c (i386_epilogue_frame_cache): Simplify code. Call
get_frame_func instead of get_frame_pc to determine the code
address used to construct the frame ID.
(i386_epilogue_frame_unwind_stop_reason): Fix coding style.
(i386_epilogue_frame_this_id): Likewise.
(i386_epilogue_frame_prev_register): New function.
(i386_epilogue_frame_unwind): Use i386_epilogue_frame_prev_register.
(i386_stack_tramp_frame_sniffer): Fix coding style.
(i386_stack_tramp_frame_unwind): Use i386_epilogue_frame_prev_register.
(i386_gdbarch_init): Fix comments.
2011-06-12 20:46:11 +00:00
Mark Kettenis 8bbdd3f463 * i386-tdep.c (i386_match_insn_block): Use length of the proper
instruction when walking back through the instruction stream.
2011-06-12 18:21:55 +00:00
gdbadmin 03001923a8 *** empty log message *** 2011-06-12 00:00:02 +00:00
gdbadmin e35459660a *** empty log message *** 2011-06-11 00:00:33 +00:00
Jan Kratochvil 533a737ed5 gdb/
* symtab.c (output_partial_symbol_filename): Exchange the filename and
	fullname parameters order.

gdb/testsuite/
	* gdb.dwarf2/dw2-filename.exp (info sources): New testcase.
2011-06-10 21:50:55 +00:00
Jan Kratochvil 44b13c5a41 gdb/
Code cleanup.
	* dwarf2read.c (dw2_map_symbol_filenames): Use symbol_filename_ftype
	for fun.
	* psymtab.c (map_symbol_filenames_psymtab)
	(map_partial_symbol_filenames): Likewise.
	* psymtab.h: Include symfile.h.
	(map_partial_symbol_filenames): Use symbol_filename_ftype for fun.
	* symfile.h (symbol_filename_ftype): New.
	(struct quick_symbol_functions): Use symbol_filename_ftype for fun of
	map_symbol_filenames, clarify more the naming in comment.
2011-06-10 21:48:04 +00:00
Tom Tromey d0e53741e0 * gdb.cp/temargs.exp: Let tests pass if compiler bug is fixed.
Add tests for pointer-to-member-function.
	* gdb.cp/temargs.cc (S::somefunc): New function.
	(K2): New class.
	(main): Instantiate K2; call method.
2011-06-10 16:21:47 +00:00
gdbadmin 09ad00eb8e *** empty log message *** 2011-06-10 00:00:03 +00:00
gdbadmin d49f7f803e *** empty log message *** 2011-06-09 00:00:32 +00:00
Joel Brobecker b5916bbd42 py-inferior.exp: Make sure local var is allocated on the stack.
The testcase, at some point, is trying to change the contents
of a string that was defined as follow:

    char *str = "hello, testsuite";

The problem is that the string is constant, and str is never used
to change the contents of the string in the program, so the compiler
is free to allocate it in a read-only section.  This is what happens
on x86-windows, for instance.

As a result, trying to change the contents of the string during
the `python gdb.inferiors()[0].write_memory (addr, str)' results
in the following error:

    (gdb) python gdb.inferiors()[0].write_memory (addr, str)
    gdb: write target memory, 5 bytes at 0x00403064
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    gdb.MemoryError: Cannot access memory at address 0x403064
    Error while executing Python code.

This patch prevents this from happening by declaring str as an
array rather than a pointer.

gdb/testsuite/ChangeLog:

        * gdb.python/py-inferior.c (f2): Make str an array rather
        than a pointer.
        * gdb.python/py-inferior.exp: Adjust testcase accordingly.
2011-06-08 16:56:11 +00:00
Doug Evans b8e9bd6c64 * cc-with-index.sh: Look for ../../gdb, for fullname.exp. 2011-06-08 01:40:58 +00:00
Doug Evans 0b5574da47 * cc-with-index.sh: Fix typos in comment. 2011-06-08 00:15:54 +00:00
gdbadmin 2334423426 *** empty log message *** 2011-06-08 00:00:02 +00:00
Jan Kratochvil 5be4dfca58 gdb/
* cli/cli-cmds.c (shell_escape): Use waitpid.
	* rs6000-nat.c (exec_one_dummy_insn): Likewise.

gdb/testsuite/
	* gdb.base/async-shell.c: New file.
	* gdb.base/async-shell.exp: New file.
2011-06-07 17:26:47 +00:00
Tristan Gingold 316a8b2145 2011-06-07 Tristan Gingold <gingold@adacore.com>
* xcoffread.c (dwarf2_xcoff_names): New variable.
	(aix_process_linenos): Add a guard.
	(xcoff_symfile_finish): Free dwarf2.
	(xcoff_initial_scan): Add dwarf2 support.
2011-06-07 12:31:07 +00:00
gdbadmin d70849ab99 *** empty log message *** 2011-06-07 00:00:02 +00:00
Pedro Alves 9f47e25402 2011-06-06 Pedro Alves <pedro@codesourcery.com>
gdb/testsuite/
	* gdb.threads/pending-step.exp: Add more context to SIGTRAP match.
2011-06-06 13:33:08 +00:00
Pedro Alves 3dd5b83d5b 2011-06-06 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcall.c (run_inferior_call): Don't mask async.  Instead force
	a synchronous wait, if the target can async.

	* target.h (struct target_ops): Delete to_async_mask.
	(target_async_mask): Delete.
	* target.c (update_current_target): Delete references to to_async_mask.
	* linux-nat.c (linux_nat_async_mask_value): Delete.
	(linux_nat_is_async_p, linux_nat_can_async_p): Remove references
	to linux_nat_async_mask_value.
	(linux_nat_async_mask): Delete.
	(linux_nat_async, linux_nat_close): Remove references to
	linux_nat_async_mask_value.
	* record.c (record_async_mask_value): Delete.
	(record_async): Remove references to record_async_mask_value.
	(record_async_mask): Delete.
	(record_can_async_p, record_is_async_p): Remove references to
	record_async_mask_value.
	(init_record_ops, init_record_core_ops): Remove references to
	record_async_mask.
	* remote.c (remote_async_mask_value): Delete.
	(init_remote_ops): Remove reference to remote_async_mask.
	(remote_can_async_p, remote_is_async_p): Remove references to
	remote_async_mask_value.
	(remote_async): Remove references to remote_async_mask_value.
	(remote_async_mask): Delete.

	* infrun.c (fetch_inferior_event): Don't claim registers changed
	if the current thread is already not executing.
2011-06-06 12:47:07 +00:00
gdbadmin 586d24ef34 *** empty log message *** 2011-06-06 00:00:33 +00:00
gdbadmin f020b4cec1 *** empty log message *** 2011-06-05 00:00:33 +00:00
gdbadmin 5ca1effa14 *** empty log message *** 2011-06-04 00:00:02 +00:00
Joel Brobecker 64b9b33460 Various spelling fixes.
gdb/ChangeLog:

        From Stephen Kitt  <steve@sk2.org>
        * breakpoint.c, breakpoint.h, cli/cli-dump.c, dwarf2expr.c,
        gdbarch.c, gdbarch.sh, remote.c: Various spelling fixes.

gdb/testsuite/ChangeLog:

        From Stephen Kitt  <steve@sk2.org>
        * gdb.base/help.exp: Adjust following some spelling corrections
        in GDB.
2011-06-03 23:47:46 +00:00
Joel Brobecker 945b3647f2 Minor spelling fix. 2011-06-03 23:46:25 +00:00
Joel Brobecker 325663dcd2 address size can be different from DW_OP_deref size
gdb/ChangeLog:

        * dwarf2expr.c (execute_stack_op) [DW_OP_deref]: Handle
        the case where ADDR_SIZE is different from TYPE_LENGTH (type).
2011-06-03 17:42:24 +00:00
Tom Tromey 8cf64490f2 gdb
* python/py-inferior.c (python_inferior_exit): Use inferior's exit
	code fields.
	* python/py-exitedevent.c (create_exited_event_object): Change
	type of 'exit_code'.  Optionally add exit_code attribute.
	(emit_exited_event): Change type of 'exit_code'.
	* python/py-event.h (emit_exited_event): Update.
	* mi/mi-interp.c (mi_inferior_exit): Print exit code.
	* infrun.c (handle_inferior_event): Set exit code fields on
	inferior.
	* inferior.h (struct inferior) <has_exit_code, exit_code>: New
	fields.
	* inferior.c (exit_inferior_1): Initialize new fields.
gdb/doc
	* gdb.texinfo (GDB/MI Async Records): Document 'exit-code' field.
	(Events In Python): Note that exit_code is optional.
2011-06-03 15:32:44 +00:00
Tom Tromey 8ddd9a20a7 * dwarf2expr.c (get_signed_type): New function.
(execute_stack_op) <DW_OP_shra>: Always perform a signed shift.
2011-06-03 14:57:29 +00:00
gdbadmin ce6e3af315 *** empty log message *** 2011-06-03 00:00:03 +00:00
Keith Seitz 8dfd1e6d6e * objc-lang.c (find_methods): Increment objfile_csym earlier. 2011-06-02 18:44:01 +00:00
Pedro Alves 65fdb766be 2011-06-02 Pedro Alves <pedro@codesourcery.com>
gdb/
	* top.h (simplified_command_loop): Delete declaration.
2011-06-02 14:02:28 +00:00