Commit Graph

3754 Commits

Author SHA1 Message Date
Ken Werner c37f7098e9 gdb:
* value.h (value_non_lval): Declare.
	* value.c (value_non_lval): New function.
	* eval.c (evaluate_subexp_standard) <UNOP_POSTINCREMENT,
	UNOP_POSTDECREMENT>: Call value_non_lval to ensure to return a
	non-lvalue.

gdb/testsuite:
	* gdb.base/exprs.exp: Add tests for pre-/post- in-/decrement operators.
2010-11-03 13:49:38 +00:00
Doug Evans 7b51bc51e1 New python module gdb.printing, and new commands info pretty-printer,
enable pretty-printer, disable pretty-printer.
	* NEWS: Mention them.
	* data-directory/Makefile.in (PYTHON_FILES): Add gdb/printing.py,
	gdb/command/__init__.py, gdb/command/pretty_printers.py.
	* python/lib/gdb/__init__.py: Install pretty-printer commands.
	* python/lib/gdb/printing.py: New file.
	* python/lib/gdb/command/__init__.py: New file.
	* python/lib/gdb/command/pretty_printers.py: New file.

	doc/
	* gdb.texinfo (Pretty Printing): Expand into three sections,
	introduction, example, and commands.
	(Python API): Delete section Disabling Pretty-Printers, merge into
	Selecting Pretty-Printers.
	(Writing a Pretty-Printer): New section.  Move the pretty-printer
	example here, and reformat to match python coding style.  Add a second
	example using the gdb.printing module.
	(Python modules): Add gdb.printing.

	testsuite/
	* gdb.python/py-pp-maint.c: New file.
	* gdb.python/py-pp-maint.exp: New file.
	* gdb.python/py-pp-maint.py: New file.
2010-11-02 22:44:13 +00:00
Tom Tromey 50c97f3812 gdb
* NEWS: Mention Guile removal.
	* defs.h (enum language) <language_scm>: Remove.
	* Makefile.in (SFILES): Remove scm-exp.c, scm-lang.c,
	scm-valprint.c.
	(HFILES_NO_SRCDIR): Remove scm-lang.h, scm-tags.h.
	(COMMON_OBS): Remove scm-exp.o, scm-lang.o, scm-valprint.o.
	* scm-exp.c, scm-lang.c, scm-valprint.c, scm-lang.h, scm-tags.h:
	Remove.
gdb/testsuite
	* gdb.base/default.exp: Remove "scheme" from language list.
2010-11-02 18:55:54 +00:00
Jan Kratochvil a289b8f64e gdb/
Revert:
	2010-10-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
		    Pedro Alves  <pedro@codesourcery.com>
	* gdbthread.h (currently_stepping): New declaration.
	* infrun.c (currently_stepping): Remove the forward declaration.
	(currently_stepping): Make it global.
	* linux-nat.c (resume_callback) <lp->stopped && lp->status == 0>: New
	variables tp and step, initialized them.  Pass STEP to to_resume.
	Print also possibly "PTRACE_SINGLESTEP" if STEP.  Initialize LP->STEP.
	* remote.c (currently_stepping_callback): New.
	(remote_vcont_resume)
	<ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid)>:
	New variable tp.  Call currently_stepping_callback and step such
	thread.

gdb/testsuite/
	Revert:
	2010-10-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
	* gdb.threads/sigstep-threads.exp: New file.
	* gdb.threads/sigstep-threads.c: New file.
2010-11-02 01:37:32 +00:00
Michael Snyder cd017491ca 2010-10-20 Michael Snyder <msnyder@vmware.com>
* gdb.threads/fork-child-threads.exp: Don't run on remote target.
2010-10-20 23:58:07 +00:00
Sami Wagiaalla 78c62ceee3 cvs add smartp.cc smartp.exp
Original changelog:
Support overloading of 'operator->'.
[...]
2010-10-19  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/smartp.exp: New test.
	* gdb.cp/smartp.cc : New test.
2010-10-20 18:56:09 +00:00
Ulrich Weigand 8e6a5956eb * gdb.base/watch_thread_num.exp: Revert 2008-09-03 change.
Skip test completely if gdb,no_hardware_watchpoints.
2010-10-19 21:29:23 +00:00
Ulrich Weigand 2c04da0de0 * gdb.base/foll-fork.exp: Make regexps to match catchpoint hits more
strict, but do not check for any particular function name within libc.
2010-10-19 21:28:33 +00:00
Sami Wagiaalla 79afc5ef5d Support overloading of 'operator->'.
2010-10-19  Sami Wagiaalla  <swagiaal@redhat.com>

	 PR C++/11500:
	* valarith.c (value_x_unop): Handle STRUCTOP_PTR.
	* eval.c (evaluate_subexp_standard): Check for overload of
	'operator->'.
	* valarith.c (value_x_binop): Throw NOT_FOUND_ERROR.
	(value_x_unop): Ditto.
	* valops.c: Include "exceptions.h".
	(find_overload_match): Throw NOT_FOUND_ERROR.
	(value_struct_elt): Ditto.

2010-10-19  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/smartp.exp: New test.
	* gdb.cp/smartp.cc : New test.
2010-10-19 20:53:15 +00:00
Sami Wagiaalla 026ffab798 Support pointer to bool conversion.
2010-10-19  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdbtypes.h: Introduce BOOL_PTR_CONVERSION_BADNESS.
	* gdbtypes.c (rank_one_type): Use BOOL_PTR_CONVERSION_BADNESS
	for conversion.
	Make all other conversions illegal.

2010-10-19  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/converts.exp: Test pointer to bool conversion.
	Test pointer to long conversion.
	* gdb.cp/oranking.exp: Removed relevant kfail.
2010-10-19 16:07:25 +00:00
Tom Tromey 3a772aa44d gdb
* valprint.c (val_print_string): Pass 'encoding' to
	LA_PRINT_STRING.
gdb/testsuite
	* gdb.python/py-prettyprint.exp (run_lang_tests): Test encoding
	argument to lazy_string.
	* gdb.python/py-prettyprint.py (pp_ls_encoding): New global.
	(pp_ls.to_string): Use it.
	* gdb.python/py-prettyprint.c (main): Move declarations to top.
	Add "estring2" local.
2010-10-18 19:14:03 +00:00
Jan Kratochvil 5fc3827b43 gdb/testsuite/
Fix s390x compatibility.
	* gdb.dwarf2/pr11465.S (DW_TAG_pointer_type): Use PTRBITS.  Twice.
	* gdb.dwarf2/pr11465.exp: Set ptrbits, use it for -DPTRBITS.
2010-10-17 18:55:09 +00:00
Jan Kratochvil 8aeb23f364 gdb/
* gdbthread.h (currently_stepping): New declaration.
	* infrun.c (currently_stepping): Remove the forward declaration.
	(currently_stepping): Make it global.
	* linux-nat.c (resume_callback) <lp->stopped && lp->status == 0>: New
	variables tp and step, initialized them.  Pass STEP to to_resume.
	Print also possibly "PTRACE_SINGLESTEP" if STEP.  Initialize LP->STEP.
	* remote.c (currently_stepping_callback): New.
	(remote_vcont_resume)
	<ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid)>:
	New variable tp.  Call currently_stepping_callback and step such
	thread.

gdb/testsuite/
	* gdb.threads/sigstep-threads.exp: New file.
	* gdb.threads/sigstep-threads.c: New file.
2010-10-17 18:24:47 +00:00
Jan Kratochvil c1e5657246 gdb/
* infrun.c (follow_exec): Replace symbol_file_add_main by
	symbol_file_add with SYMFILE_DEFER_BP_RESET, set_initial_language and
	breakpoint_re_set.
	* m32r-rom.c (m32r_load, m32r_upload_command): Use parameter 0 for
	clear_symtab_users.
	* objfiles.c (free_all_objfiles): Likewise.
	* remote-m32r-sdi.c (m32r_load): Likewise.
	* solib-som.c (som_solib_create_inferior_hook): Likewise.
	* symfile.c (new_symfile_objfile): New comment for add_flags.  Call
	clear_symtab_users with ADD_FLAGS.
	(reread_symbols): Use parameter 0 for clear_symtab_users.
	(clear_symtab_users): New parameter add_flags.  Do not call
	breakpoint_re_set if SYMFILE_DEFER_BP_RESET.
	(clear_symtab_users_cleanup): Use parameter 0 for clear_symtab_users.
	* symtab.h (clear_symtab_users): New parameter add_flags.

gdb/testsuite/
	* gdb.base/pie-execl.exp: New file.
	* gdb.base/pie-execl.c: New file.
2010-10-17 17:45:17 +00:00
Jan Kratochvil 92163a10dc gdb/
PR exp/12117
	* gdbtypes.c (check_typedef): Clean up function comment.
	Keep track of instance flags as we strip typedefs and create a new
	type to preserve them if necessary.
	* gdbtypes.h (type) <instance_flags>: Extend the comment.

gdb/testsuite/
	PR exp/12117
	* gdb.cp/ptype-cv-cp.cc: New file.
	* gdb.cp/ptype-cv-cp.exp: New file.
2010-10-15 17:48:48 +00:00
Sami Wagiaalla 7062b0a0df Fixed void* vs int* overload issue (PR C++/10343).
2010-10-14  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdbtypes.h: Create BASE_PTR_CONVERSION_BADNESS.
	* gdbtypes.c (rank_one_type): Move type comparison code out of here
	to...
	(types_equal): ...here. And changed it as follows:
	Outside of typedefs type must be of the same TYPE_CODE.
	When compairing two pointers or references they are equal if their
	targets are equal.
	Correct pointer conversions.

2010-10-14  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/converts.cc: New test program.
	* gdb.cp/converts.exp: New test.
	* gdb.cp/overload.exp: Added test for void* vs int*.
	* gdb.cp/overload.exp: Ditto.
	* gdb.cp/oranking.exp: Removed related kfail.
2010-10-14 16:13:43 +00:00
Doug Evans 0e3509dbce New python module gdb.types.
* NEWS: Document it.
	* data-directory/Makefile.in (PYTHON_FILES): Add gdb/types.py.
	* python/lib/gdb/types.py: New file.

	testsuite/
	* lib/gdb-python.exp (gdb_check_python_config): New function.
	* gdb.python/Makefile.in (EXECUTABLES): Add lib-types.
	* gdb.python/lib-types.cc: New file.
	* gdb.python/lib-types.exp: New file.

	doc/
	* gdb.texinfo (Python): Add "Python modules".
	(Types in Python): Add reference to gdb.types section.
	(Python modules): New node.
2010-10-13 20:08:46 +00:00
Jan Kratochvil 8dc785338e gdb/
* python/py-breakpoint.c (bppy_set_condition): New comment.
	* python/py-cmd.c (cmdpy_function): Call also gdbpy_print_stack for
	failed PyUnicode_Decode.
	(cmdpy_completer): Skip element for failed
	python_string_to_host_string.
	(cmdpy_init): Return -1 on failed python_string_to_host_string.
	* python/py-frame.c (frapy_read_var): Extend the function comment.
	* python/py-function.c (fnpy_init): Return -1 on failed
	python_string_to_host_string.
	* python/py-inferior.c (infpy_read_memory, infpy_write_memory): Extend
	the function comment.
	(infpy_search_memory): Extend the function comment.  Remove the
	PyErr_SetString call on already set error state.
	* python/py-param.c (set_parameter_value): Extend the function
	comment.  Return -1 on failed python_string_to_host_string, twice.
	(set_attr): Extend the function comment.
	(compute_enum_values): Extend the function comment.  New variable
	back_to.  Protect self->enumeration by BACK_TO cleanups.  Return 0 on
	failed python_string_to_host_string.
	(get_doc_string): Call gdbpy_print_stack on failed
	python_string_to_host_string.
	(parmpy_init): Extend the function comment.
	* python/py-prettyprint.c (pretty_print_one_value): Likewise.
	(gdbpy_get_display_hint, print_children): Call gdbpy_print_stack on
	failed python_string_to_host_string.
	* python/py-value.c (valpy_new, valpy_getitem, valpy_call)
	(valpy_binop, valpy_richcompare): Extend the function comment.
	* python/python.c
	(struct python_env) <error_type, error_value, error_traceback>: New
	fields.
	(restore_python_env): Handle PyErr_Occurred.  Call PyErr_Restore.
	(ensure_python_env): Call PyErr_Fetch.
	* varobj.c (update_dynamic_varobj_children): Call gdbpy_print_stack on
	failed convert_value_from_python.
	(value_get_print_value): Call gdbpy_print_stack on failed
	python_string_to_target_python_string.

gdb/testsuite/
	* gdb.python/py-error.exp: New file.
	* gdb.python/py-error.py: New file.
2010-10-13 13:24:40 +00:00
Jan Kratochvil 93c17e06d2 gdb/testsuite/
* gdb.base/break-interp.exp (test_ld): Replace gdb_expect by
	gdb_test_multiple.
2010-10-12 18:41:06 +00:00
Jan Kratochvil d8b34041e0 gdb/testsuite/
* gdb.base/break-interp.exp: Use ldlags for linking flags.
	* gdb.base/prelink.exp: Likewise.
	* gdb.base/solib-nodir.exp: Likewise.
	* lib/gdb.exp (gdb_compile) <*-*-openbsd*>
	(gdb_compile) <shlib_load>: Use ldlags for linking flags.
	* lib/prelink-support.exp (build_executable_own_libs): Likewise.
2010-10-12 18:12:49 +00:00
Ulrich Weigand e0cc584ecf * break-interp.exp (test_ld): Use two separate gdb_expect statements
for the "info files" test to avoid timeouts on slow machines.
2010-10-12 17:17:36 +00:00
Jan Kratochvil cfc353b10d gdb/testsuite/
* gdb.cp/infcall-dlopen.cc (openlib): Support NULL FILENAME.
	(main): Make openlib dummy call.
2010-10-11 21:36:26 +00:00
Jan Kratochvil d3d7896de3 gdb/testsuite/
Fix missing _start PIE relocation on ppc64 due to stop on dl_main.
	* break-interp.exp (reach): Move the core body ...
	(reach_1): ... here.  Use stop-on-solib-events for _dl_debug_state.
	(test_ld): Provide always real argument, even to the linker.  Replace
	dl_main by _dl_debug_state.
2010-10-11 08:47:47 +00:00
Jan Kratochvil 5e533c94a6 gdb/testsuite/
Fix results of prelinked PIEs on ppc*.
	* gdb.base/break-interp.exp (reach, test_core, test_attach_gdb):
	Accept also DISPLACEMENT "PRESENT".
	(main): Replace "ZERO" displacements by "PRESENT".
2010-10-11 08:45:12 +00:00
Sami Wagiaalla 3354061073 Test case for unimplemented overload cases.
2010-10-08  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/oranking.exp: New test.
	* gdb.cp/oranking.cc: New test program.
2010-10-08 18:28:46 +00:00
Ken Werner 3bdf2bbd3e gdb:
* valops.c (value_cast): Handle vector types.
	* valarith.c (value_binop): Widen scalar to vector if appropriate.
gdb/testsuite:
	* gdb.base/gnu_vector.c (ia, ib, fa, fb): New variables.
	* gdb.base/gnu_vector.exp: Add tests for scalar to vector widening.
2010-10-08 16:50:55 +00:00
Ken Werner 2f608a3a97 gdb:
* dwarf2read.c (read_tag_const_type): Handle const arrays.
gdb/testsuite:
	* gdb.base/constvars.c (logical, lugged, luck, lunar, lumen, lurk,
	lush, lynx) New constant.
	* gdb.base/constvars.exp: Test const array types.
	* gdb.dwarf2/dw2-strp.exp: Add const qualifier for ptype tests.
2010-10-06 16:13:35 +00:00
Doug Evans aa2e2d8d77 Create subdir data-directory.
* Makefile.in (XML_SYSCALL_DIR, XML_SYSCALL_FILES): Moved to
	data-directory/Makefile.in.
	(SUBDIRS): Add data-directory.
	(all): Remove xml-syscall-copy dependency.
	(xml-syscall-copy): Moved to data-directory/Makefile.in as
	stamp-syscalls.
	(xml-syscall-install): Moved to data-directory/Makefile.in as
	install-syscalls.
	(install-only): Remove xml-syscall-install dependency.
	(all-data-directory): New rule.
	(data-directory/Makefile): New rule.
	* configure.ac (AC_OUTPUT): Add data-directory/Makefile.
	* configure: Regenerate.
	* data-directory/Makefile.in: New file.
	* python/lib/gdb/__init__.py: New file.

	testsuite/
	* gdb.base/catch-syscall.exp (do_syscall_tests): Update location
	of syscall staging area.
2010-10-06 16:02:45 +00:00
Ken Werner 2844d6b5a2 gdb:
* gdbtypes.h (struct main_type): Remove flag_nottext.
	(enum type_flag_value): Remove TYPE_FLAG_NOTTEXT.
	(enum type_instance_flag_value): Add TYPE_INSTANCE_FLAG_NOTTEXT.
	(TYPE_NOTTEXT): Use TYPE_INSTANCE_FLAG_NOTTEXT instead of flag_nottext.
	* gdbtypes.c (make_vector_type): Use TYPE_INSTANCE_FLAG_NOTTEXT instead
	of TYPE_FLAG_NOTTEXT.
	(init_type): Remove the initialization of the flag_nottext field.
	(gdbtypes_post_init): Use TYPE_INSTANCE_FLAG_NOTTEXT instead of
	TYPE_FLAG_NOTTEXT.
	* c-valprint.c (c_val_print): Remove TYPE_VECTOR check.
gdb/testsuite:
	* gdb.base/gnu_vector.c: Add variable c4.
	* gdb.base/gnu_vector.exp: Add tests for character vector printing.
	* gdb.arch/altivec-abi.exp: Fix expect pattern of character vectors.
2010-10-06 08:44:15 +00:00
Maciej W. Rozycki 7d8ac8bbbb * gdb.arch/altivec-abi.exp: Fix a typo. 2010-10-05 20:38:02 +00:00
Maciej W. Rozycki 84a02e5838 * lib/mi-support.exp (thread_selected_re): Correct pattern used
to match a thread ID.
2010-10-02 17:48:23 +00:00
Jan Kratochvil b18e6318c5 gdb/testsuite/
Fix s390x testcase compatibility.
	* gdb.dwarf2/dw2-double-set-die-type.S: Use .2byte, not .value.
2010-10-02 13:31:47 +00:00
Doug Evans a2c09bd0c7 * lib/gdb-python.exp: New file.
* gdb.python/py-block.exp: Use it.
	* gdb.python/py-breakpoint.exp: Ditto.
	* gdb.python/py-frame.exp: Ditto.
	* gdb.python/py-inferior.exp: Ditto.
	* gdb.python/py-param.exp: Ditto.
	* gdb.python/py-prettyprint.exp: Ditto.
	* gdb.python/py-shared.exp: Ditto.
	* gdb.python/py-symbol.exp: Ditto.
	* gdb.python/py-symtab.exp: Ditto.
	* gdb.python/py-type.exp: Ditto.
	* gdb.python/py-value.exp: Ditto.
	* gdb.python/python.exp: Ditto.
2010-10-01 17:03:50 +00:00
Tom Tromey 38f12cfce2 gdb
* value.c (value_primitive_field): Take 'offset' into account for
	packed field.
gdb/testsuite
	* gdb.base/anon.exp: New file.
	* gdb.base/anon.c: New file.
2010-09-30 18:58:08 +00:00
Tom Tromey 9ae8282da7 gdb
* completer.c (count_struct_fields): Handle anonymous structs and
	unions.
	(add_struct_fields): Likewise.
gdb/testsuite
	* gdb.base/completion.exp: Test completion through anonymous
	union.
	* gdb.base/break1.c (struct some_struct): Add anonymous union.
2010-09-30 17:51:39 +00:00
Jan Kratochvil e9e07ba6db gdb/
Fix printing parameters of inlined functions.
	* ada-lang.c (is_known_support_routine)
	(ada_unhandled_exception_name_addr_from_raise): Provide NULL parameter
	for find_frame_funname.
	* python/py-frame.c (frapy_name): Likewise.
	* stack.c (find_frame_funname): New parameter funcp.  Update the
	function comment.  Fill it in.
	(print_frame): New variable func.  Initialize it by
	find_frame_funname.  Print arguments only if FUNC is not NULL.  Use
	FUNC as the parameter of print_args_stub.
	* stack.h (find_frame_funname): New parameter funcp.  Remove the
	function declaration comment.

gdb/testsuite/
	Fix printing parameters of inlined functions.
	* gdb.dwarf2/dw2-inline-param.exp: New file.
	* gdb.dwarf2/dw2-inline-param-main.c: New file.
	* gdb.dwarf2/dw2-inline-param.S: New file.
2010-09-30 10:29:00 +00:00
Jan Kratochvil cd2effb255 gdb/
PR corefiles/12071.
	* inferior.c (have_live_inferiors): New variables old_chain, inf and
	tp.  Iterate INFERIOR_LIST and call target_has_execution.

gdb/testsuite/
	PR corefiles/12071.
	* gdb.base/corefile.exp (quit with a process, no question: load core)
	(quit with a core file): New tests.
2010-09-30 10:24:40 +00:00
Jan Kratochvil bceffbf360 gdb/
Fix GDB crash on inferior calls with self-referencing classes.
	* gnu-v3-abi.c (gnuv3_pass_by_reference): Do not call itself on static
	member fields.

gdb/testsuite/
	Fix GDB crash on inferior calls with self-referencing classes.
	* gdb.dwarf2/dw2-cp-infcall-ref-static.exp: New file.
	* gdb.dwarf2/dw2-cp-infcall-ref-static-main.c: New file.
	* gdb.dwarf2/dw2-cp-infcall-ref-static.S: New file.
2010-09-29 22:32:52 +00:00
Jan Kratochvil 1736ad1102 gdb/
Fix lost siginfo_t for inferior calls.
	* infrun.c
	(struct inferior_thread_state) <siginfo_gdbarch, siginfo_data>: New.
	(save_inferior_thread_state): New variables regcache, gdbarch and
	siginfo_data.  Initialize SIGINFO_DATA if gdbarch_get_siginfo_type_p.
	Move INF_STATE allocation later, pre-clear it.  Initialize REGISTERS
	using REGCACHE.
	(restore_inferior_thread_state): New variables regcache and gdbarch.
	Restore SIGINFO_DATA for matching GDBARCH.  Restore REGISTERS using
	REGCACHE.  Free also SIGINFO_DATA.

gdb/testsuite/
	Fix lost siginfo_t for inferior calls.
	* gdb.base/siginfo-infcall.exp: New file.
	* gdb.base/siginfo-infcall.c: New file.
2010-09-24 18:35:28 +00:00
Joel Brobecker a176ad9221 Fix order of ChangeLog entries.
(entry added at wrong location by patch).
2010-09-22 20:08:04 +00:00
Joel Brobecker 05692c42a6 preserve columnar alignment.
gdb/testsuite/ChangeLog:

        * gdb.dwarf2/dw2-const.S: Minor (space) reformatting.
2010-09-22 20:06:58 +00:00
Jan Kratochvil c2b0a2291a gdb/
* dwarf2read.c (die_needs_namespace) <DW_TAG_variable>: Add also
	DW_TAG_constant.

gdb/testsuite/
	* gdb.fortran/module.exp (fully qualified name of DW_TAG_constant):
	New test.
	* gdb.fortran/module.f90 (mod1) <var_const>: New constant.
2010-09-22 19:22:44 +00:00
Joel Brobecker e8ae22d197 [testsuite] dw2-const.S: fix type reference size on 64bit platforms.
The testcase was failing on various 64bit platforms, because the
debugging info said that the target type for a const type is a
4-byte reference.  In the asm file, I used a .long directive, but
the size of .long is of course dependent on the platform.  This
replaces this .long by a .4byte directive.

gdb/testsuite/ChangeLog:

        * gdb.dwarf2/dw2-const.S: Use .4byte to reference the target
        type of our const type.
2010-09-22 19:13:40 +00:00
Joel Brobecker 72929c628e DWARF: Add support for DW_TAG_constant DIEs
gdb/ChangeLog:

        * dwarf2read.c (scan_partial_symbols): Add handling of
        DW_TAG_constant DIEs.
        (add_partial_symbol, load_partial_dies, new_symbol): Likewise.

gdb/testsuite/ChangeLog:

        * gdb.dwarf2/dw2-const.S, gdb.dwarf2/dw2-const.exp: New files.
2010-09-22 16:15:34 +00:00
Sami Wagiaalla ec32282347 Fix PR 12028: "GDB crashes on a double free during overload resolution "
2010-09-22  Sami Wagiaalla  <swagiaal@redhat.com>

	PR C++/12028
	* valops.c (find_oload_champ_namespace_loop): removed incorrect
	'old_cleanups' reassignment.

2010-09-22  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/pr12028.cc: New.
	* gdb.cp/pr12028.exp: New.
2010-09-22 15:48:59 +00:00
Phil Muldoon 875b4ff565 2010-09-16 Phil Muldoon <pmuldoon@redhat.com>
PR mi/11407
	* mi/mi-cmd-stack.c (list_args_or_locals): Catch exceptions from
	read_var_value and common_val_print and print a warning.

2010-09-16  Phil Muldoon  <pmuldoon@redhat.com>
            Jan Kratochvil  <jan.kratochvil@redhat.com>

	PR mi/11407
	* gdb.mi/dw2-ref-missing-frame-func.c: New File.
	* gdb.mi/dw2-ref-missing-frame-main.c New File.
	* gdb.mi/dw2-ref-missing-frame.S New File.
	* gdb.mi/dw2-ref-missing-frame.exp New File.
2010-09-16 13:47:55 +00:00
Tom Tromey 7155d5780a gdb
PR symtab/8399:
	* dwarf2loc.c (locexpr_describe_location_piece): Don't call error
	for unrecognized frame base expression.
gdb/testsuite
	PR symtab/8399:
	* gdb.threads/tls.exp: Remove kfail.  Update expected output.
2010-09-14 19:39:59 +00:00
Tom Tromey 515ed53230 gdb
PR exp/11803:
	* value.c (value_static_field): Use value_of_variable.
gdb/testsuite
	PR exp/11803:
	* gdb.threads/tls.exp: Use C++.
	(check_thread_local): Use K::another_thread_local.
	* gdb.threads/tls.c (class K): New.
	(another_thread_local): Now a member of K.
	(spin): Update.  No longer K&R C.
2010-09-14 19:08:30 +00:00
Sami Wagiaalla 450ca57cac Fix PR 11992: C++ 'this' scope sometimes does not work
2010-09-13  Sami Wagiaalla  <swagiaal@redhat.com>

	PR symtab/11992:
	* c-exp.y (classify_name): Check is_a_member_of_this before returning
	UNKNOWN_CPP_NAME.

2010-09-13  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/koenig.cc: created class for testing member lookup.
	* gdb.cp/koenig.exp: Added test for member lookup.
2010-09-13 20:41:05 +00:00
Jan Kratochvil dbd492a377 gdb/testsuite/
Fix false FAILs on sourcetree topdir directory containing "kill".
	* gdb.base/sigall.exp (test_one_sig) <advance to $nextsig>: Extend the
	source line matching regexp.
2010-09-13 20:05:04 +00:00