Commit Graph

23631 Commits

Author SHA1 Message Date
Jan Kratochvil e0740f779c gdb/
Fix resolving external references to TLS variables.
	* findvar.c: Include `objfiles.h'.
	(read_var_value <LOC_UNRESOLVED>): New variable `obj_section'.  Handle
	SEC_THREAD_LOCAL variables.
	* printcmd.c (address_info <LOC_UNRESOLVED>): Handle SEC_THREAD_LOCAL
	variables.

gdb/testsuite/
	Test resolving external references to TLS variables.
	* gdb.threads/tls.exp: New tests to examine A_THREAD_LOCAL and
	FILE2_THREAD_LOCAL.
	(testfile2, srcfile2): New variables.
	* gdb.threads/tls.c (file2_thread_local)
	(function_referencing_file2_thread_local): New.
	* gdb.threads/tls2.c: New file.
2008-12-02 14:51:01 +00:00
Doug Evans c29235ac9f * infrun.c (handle_inferior_event): Delete unused local tp. 2008-12-02 09:52:31 +00:00
Vladimir Prus c3b108f782 MI non-stop and multiprocess docs.
* gdb.texinfo (GDB/MI): New section 'GDB/MI General Design'
        (GDB/MI Output Records): New section 'GDB/MI Frame Information'
        Adjust documentation for *stopped, document =thread-created,
        =thread-exited, =thread-group-created and =thread-group-exited.
        (GDB/MI Thread Commands): Document the 'state' field in
        -thread-info output.
        (GDB/MI Program Execution): Mention --all and --thread-group
        options.
        (GDB/MI Variable Objects): Describe floating and fixed variable
        objects.
        (GDB/MI Miscellaneous Commands): Document -list-thread-groups.
2008-12-02 08:01:15 +00:00
Vladimir Prus 07e059b5a9 Implement -list-thread-groups --available
* Makefile.in (XMLFILES): Add osdata.dtd.
        (SFILES): Add osdata.c.
        (COMMON_OBS): Add osdata.o.
        * linux-nat.c: Include pwd.h, sys/types.h, gdb_dirent.h and xml-support.h.
        (linux_nat_xfer_osdata): New function.
        (linux_xfer_partial): Handle TARGET_OBJECT_OSDATA.
        * osdata.c: New file.
        * osdata.h: New file.
        * remote.c (PACKET_qXfer_osdata): New packet enum.
        (remote_protocol_features): Add "qXfer:osdata:read".
        (remote_read_qxfer): Handle TARGET_OBJECT_OSDATA.
        (extended_remote_can_run): New.
        (init_extended_remote_ops): Set to_can_run to
        extended_remote_can_run.
        (_initialize_remote): Add packet config command for
        "qXfer:osdata:read".
        * xml-support.c (obstack_xml_printf): New function.
        * xml-support.h (obstack_xml_printf): Declare.
        * target.c (target_get_osdata): New function.
        * target.h (enum target_object): Add TARGET_OBJECT_OSDATA.
        (target_os_data): Declare.
        * features/osdata.dtd: New file.
        * mi/mi-main.c (mi_list_thread_groups): Handle the --available
        option.
2008-12-02 07:57:38 +00:00
Doug Evans f3c85de60a * infrun.c (proceed): Delete unused local stop_signal. 2008-12-02 04:42:45 +00:00
gdbadmin a2e72c5ccb *** empty log message *** 2008-12-02 00:00:33 +00:00
gdbadmin b76dfd93dd *** empty log message *** 2008-12-01 00:00:32 +00:00
gdbadmin 800654fc42 *** empty log message *** 2008-11-30 00:00:33 +00:00
gdbadmin af21e36cb6 *** empty log message *** 2008-11-29 00:00:03 +00:00
Joel Brobecker 67f0aac52a * gdb.ada/int_deref.exp: Convert the addresses into long_integer
rather than integer, as integer might not be big enough when
        on 64bit targets.
2008-11-28 23:26:54 +00:00
Jan Kratochvil 8d90eea314 2008-11-25 monitor.c (monitor_insert_breakpoint): Remove, already in log before. 2008-11-28 21:58:06 +00:00
gdbadmin 6fce36a432 *** empty log message *** 2008-11-28 00:00:33 +00:00
Jerome Guitton c332165e45 * gdb.cp/formatted-ref.exp: Add equality test.
* gdb.ada/formatted_ref.exp: Ditto.
2008-11-27 09:52:55 +00:00
Tristan Gingold a80b95ba67 gdb:
2008-11-27  Tristan Gingold  <gingold@adacore.com>

	* NEWS: Add entry for new native configuration: Darwin.
	* configure.host: Add Darwin host.
	* configure.tgt: Add Darwin target.
	* defs.h (enum gdb_osabi): Add GDB_OSABI_DARWIN.
	* osabi.c (gdb_osabi_names): Add name for Darwin abi.
	* i386-darwin-nat.c: New file.
	* i386-darwin-tdep.c: New file.
	* machoread.c: New file.
	* darwin-nat-info.c: New file.
	* darwin-nat.c: New file.
	* darwin-nat.h: New file.
	* darwin.defs: New file.
	* config/i386/darwin.mh: New file.

gdb/doc:
2008-11-27  Tristan Gingold  <gingold@adacore.com>

	* gdb.texinfo (Darwin): Document Darwin specific features.
2008-11-27 09:23:01 +00:00
gdbadmin 7785a2a9da *** empty log message *** 2008-11-27 00:00:03 +00:00
Tristan Gingold 5a85c5216d 2008-11-26 Tristan Gingold <gingold@adacore.com>
* MAINTAINERS: Add myself for write after approval privileges.
2008-11-26 16:32:59 +00:00
Jerome Guitton 3e3d7139ee * value.h (allocate_value_lazy): New function declaration.
(value_free): Remove macro, make it a function.
	* value.c (value): Move actual content outside of the memory space
	of the struct; add a pointer to this actual content.
	(allocate_value_lazy, allocate_value_contents): New function.
	(allocate_value): Reimplement using these two new functions.
	(value_contents_raw, value_contents_all_raw): If no memory
	has been allocated yet for the actual content, allocate it.
	(value_contents_all): Resync with struct value's changes.
	(value_free): New function.
	(value_copy, value_primitive_field): Use new function
	allocate_value_lazy to allocate lazy values.
	(value_change_enclosing_type): Resync with struct value's changes.
	As the value is not reallocated, remove the special handling for
	the value chain (now obsolete).
	* valops.c (value_at_lazy): Use new function allocate_value_lazy.
	(value_fetch_lazy): Allocate value content. Use allocate_value_lazy
	to allocate lazy values.
	(value_slice): Use allocate_value_lazy to allocate lazy values.
2008-11-26 16:27:28 +00:00
Jan Kratochvil 5f019e5878 2008-11-25 ia64-tdep.c change: Reflect current `disable' in the ChangeLog entry. 2008-11-26 05:36:38 +00:00
Jan Kratochvil 939c61faff Fix automatic restoration of breakpoints memory for ia64.
* ia64-tdep.c: New #if check on BREAKPOINT_MAX vs. BUNDLE_LEN.
	(ia64_memory_insert_breakpoint): New comment part for SHADOW_CONTENTS
	content.  Remove variable instr.  New variable cleanup.  Force
	automatic breakpoints restoration.  PLACED_SIZE and SHADOW_LEN are now
	set larger, to BUNDLE_LEN - 2.  Variable `bundle' type update.  Return
	error if even just final target_write_memory has failed.
	(ia64_memory_remove_breakpoint): Rename variables bundle to bundle_mem
	and instr to instr_saved.  New variables bundle_saved and
	instr_breakpoint.  Comment new reasons why we need to disable automatic
	restoration of breakpoints.  Assert PLACED_SIZE and SHADOW_LEN.  New
	check of the original memory content.  Return error if even just final
	target_write_memory has failed.
	(ia64_breakpoint_from_pc): Implement the emulation of permanent
	breakpoints compatible with current bp_loc_is_permanent.
	(template_encoding_table): Make it `const'.
	* breakpoint.c (bp_loc_is_permanent): Support unsupported software
	breakpoints.  New variables `cleanup' and `retval'.
	* monitor.c (monitor_insert_breakpoint): Remove unused variable `bp'.
2008-11-26 05:27:48 +00:00
Jan Kratochvil a655d42411 * gdbint.texinfo (Target Conditionals): Extend the
gdbarch_breakpoint_from_pc description.
2008-11-26 05:26:40 +00:00
Jan Kratochvil fc9b693caa * gdb.base/breakpoint-shadow.exp, gdb.base/breakpoint-shadow.c: New.
* gdb.base/start.exp: New comment about an alternative - `runto_main'.
2008-11-26 05:25:56 +00:00
gdbadmin 14f03c6139 *** empty log message *** 2008-11-26 00:00:03 +00:00
gdbadmin c567841d5a *** empty log message *** 2008-11-25 00:00:33 +00:00
Tom Tromey 8acb6b92f9 * ada-lang.c (value_from_contents_and_address): Move...
* value.c: ... here.
	* ada-lang.h (value_from_contents_and_address): Move
	declaration...
	* value.h: ... here.
2008-11-24 23:21:16 +00:00
Doug Evans 4cab47abf7 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused. 2008-11-24 21:01:36 +00:00
Tom Tromey f9e31323b4 2008-11-24 Paul Pluzhnikov <ppluzhnikov@google.com>
* valprint.c (val_print_array_elements): Pass correct
	element address to val_print.
2008-11-24 18:10:11 +00:00
Daniel Jacobowitz f142445f87 * server.c (handle_v_run): Always use the supplied argument list. 2008-11-24 18:05:02 +00:00
Jan Kratochvil a0b7aece70 Fix access of an already freed memory.
* parse.c (parse_field_expression): Call xstrdup on `*name'.
	* completer.c (expression_completer): Free fieldname.
2008-11-24 17:05:43 +00:00
Daniel Jacobowitz d962ef8246 PR gdb/2474
* remote.c (remote_read_description_p): New function.
	(remote_start_remote): Try to fetch the target description
	before adding shared libraries.  Try again later if the
	target is running but stopped.
	(remote_open_1): Mark extended targets as exited by default.
	(remote_read_description): Check target_has_execution.
2008-11-24 16:53:44 +00:00
Jerome Guitton 88828b324a * alpha-mdebug-tdep.c (alpha_mdebug_frame_unwind_cache): Use
the frame address in block instead of the return address to
        locate the mdebug PDR of the frame.
2008-11-24 13:52:05 +00:00
gdbadmin cadb49f6d2 *** empty log message *** 2008-11-24 00:00:03 +00:00
gdbadmin 3c4fa988a8 *** empty log message *** 2008-11-23 00:00:03 +00:00
Vladimir Prus 249e11281f * gdb.texinfo (M68K Features): Fix typo. 2008-11-22 12:14:33 +00:00
Joel Brobecker d81191fc8c Remove the unused BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK.
* breakpoint.h (enum bpstat_what_main_action): Remove
        BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK.
        * breakpoint.c (bpstat_what): Delete catch_shlib_event from enum class.
        Remove the BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK column from
        variable table.
        * infrun.c (wait_for_inferior): Remove handling of
        BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK.
2008-11-22 04:41:45 +00:00
gdbadmin 325e2ec8db *** empty log message *** 2008-11-22 00:00:05 +00:00
Tom Tromey a9322a30ba * configure: Rebuild.
* configure.ac: Merge calls to AC_CHECK_FUNCS, AC_CHECK_HEADERS,
	AC_CHECK_DECLS, and AC_CHECK_MEMBERS.
2008-11-21 22:35:58 +00:00
Tom Tromey ca30a76297 * python/python-internal.h (PyGILState_Ensure): New define.
(PyGILState_Release): Likewise.
	(PyEval_InitThreads): Likewise.
	(PyThreadState_Swap): Likewise.
	(PyEval_InitThreads): Likewise.
	* python/python.c (_initialize_python): Initialize threads.
	Release GIL.
	(eval_python_from_control_command): Acquire GIL.
	(python_command): Likewise.
	* python/python-internal.h (make_cleanup_py_restore_gil):
	Declare.
	* python/python-utils.c (py_gil_restore): New function.
	(make_cleanup_py_restore_gil): Likewise.
2008-11-21 14:59:56 +00:00
gdbadmin 5a29d1a0ec *** empty log message *** 2008-11-21 00:00:33 +00:00
Doug Evans d2bf72c057 * frame.c (frame_debug_got_null_frame): Remove file arg.
All callers updated.
2008-11-20 22:16:16 +00:00
Andreas Schwab a9c640111d * gdb.base/foll-fork.exp (catch_fork_child_follow): Fix patterns
matching syscall entry point.
* gdb.base/foll-vfork.exp (tcatch_vfork_then_parent_follow)
(tcatch_vfork_then_child_follow): Likewise.  Finish through
vfork even if we stopped at the syscall trampoline.
2008-11-20 17:17:59 +00:00
Pedro Alves c7e8a53cdd * infrun.c (resume): If following a fork, also reset regcache,
gdbarch and pc.
2008-11-20 17:06:05 +00:00
Doug Evans e2fd701eb4 * printcmd.c (sym_info): Don't print the offset if it's zero.
* gdb.base/sepsymtab.exp: Update, old "info sym" format restored.
2008-11-20 16:13:11 +00:00
Pedro Alves 607cecd2d4 * infrun.c (resume): If following a fork, reread the current
thread.  Avoid dereferencing a possibly dangling pointer.
2008-11-20 13:23:26 +00:00
Doug Evans 642fd10146 * inferior.h (proceed_to_finish): Delete, unused.
(stop_registers): Tweak comment.
	* infrun.c (stop_registers): Tweak comment.
2008-11-20 00:35:23 +00:00
gdbadmin c7a9fda064 *** empty log message *** 2008-11-20 00:00:03 +00:00
Kevin Buettner 9bc7b6c67c * frv-tdep.c (frv_skip_main_prologue): New function.
(frv_gdbarch_init): Register frv_skip_main_prologue.
	* solib-frv.c (fetch_loadmap): Return early when no segments are
	found.
	(frv_relocate_main_executable): Return early when both interpreter
	and executable loadmap addresses are zero.
2008-11-19 21:17:07 +00:00
Bob Wilson d0107bb6ae gdb/
* xtensa-config.c (rmap): Remove entries for ar32 through ar63.  Add
	threadptr, scompare1, mmid, epc5, epc6, epc7, eps5, eps6, eps7,
	excsave5, excsave6, excsave7, cpenable, and vecbase registers.
	(xtensa_submask0, xtensa_submask1, xtensa_submask2)
	(xtensa_submask3, xtensa_submask4, xtensa_submask5, xtensa_submask6)
	(xtensa_submask7, xtensa_submask8, xtensa_submask9, xtensa_submask10)
	(xtensa_submask11, xtensa_submask12, xtensa_submask13, xtensa_submask14)
	(xtensa_submask15): Adjust register numbers.
	* xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
	(xtensa_regmap_table): Add entry for scompare1.
	* regformats/reg-xtensa.dat: Remove ar32 through ar63.  Add threadptr
	and scompare1.
gdb/gdbserver/
	* xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
	(xtensa_regmap_table): Add entry for scompare1.
2008-11-19 18:29:47 +00:00
Pedro Alves 6e5abd65ae * remote.c (escape_buffer): New.
(putpkt_binary, read_frame, getpkt_or_notif_sane_1): Use it.  Make
	sure debug output printing a packet buffer goes through a single
	fprintf_unfiltered call.
	* utils.c (vfprintf_unfiltered): If outputting timestamps, end
	output with a newline if it wasn't going to already.
2008-11-19 14:45:09 +00:00
gdbadmin eb0d4782bf *** empty log message *** 2008-11-19 00:00:03 +00:00
Paul Pluzhnikov 15c99a447e 2008-11-18 Paul Pluzhnikov <ppluzhnikov@google.com>
* maint.c (maintenance_translate_address): Fix a buglet.
2008-11-18 22:46:27 +00:00