Commit Graph

68255 Commits

Author SHA1 Message Date
Sami Wagiaalla 2db19d1e4d Added new namespace tests.
2011-01-31  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/nsnested.cc: New.
	* gdb.cp/nsnested.exp: New.
	* gdb.cp/nsnoimports.exp: New.
	* gdb.cp/nsnoimports.cc: New.
2011-01-31 18:29:02 +00:00
Tom Tromey 47a80e9093 PR python/12216:
* python/python.c (execute_gdb_command): Call
	prevent_dont_repeat.
	* top.c (suppress_dont_repeat): New global.
	(dont_repeat): Use it.
	(prevent_dont_repeat): New function.
	* command.h (prevent_dont_repeat): Declare.
2011-01-31 16:52:35 +00:00
Nick Clifton a22429b98e * write.c (write_contents): Include output file name and bfd error
value when reporting the inability to write to the output file.
	* config/tc-rx.c (rx_handle_align): Do not insert NOPs into align
	frag that has a non-zero fill value.

	* gas/all/align.d: Skip for the RX.
	* gas/elf/group1a.d: Likewise.
	* gas/elf/groupautoa.d: Likewise.
	* gas/elf/elf.exp: Do not run section5 test for the RX port.
	* gas/elf/section4.d: Likewise.
	* gas/elf/section7.d: Likewise.
	* gas/macros/semi.s: Fill with a non-zero pattern.
	* gas/macros/semi.d: Expect non-zero fill value.
	* gas/rx/bcnd.d: Update expected disassembly.
	* gas/rx/bra.d: Likewise.
	* gas/rx/macros.inc: Add reg1 macro.
	* gas/rx/max.sm: Use reg1 macro to avoid generating illegal NOP
	instruction.
	* gas/rx/mov.sm: Likewise.
	* gas/rx/max.d: Update expected disassembly.
	* gas/rx/mov.d: Likewise.
	* gas/rx/rx-asm-good.s: Use Renesas section names.
	* gas/rx/rx-asm-good.d: Update expected disassembly.
2011-01-31 16:43:15 +00:00
Tom Tromey 45a4356715 * infcmd.c (finish_backward): Use breakpoint_set_silent.
* python/py-breakpoint.c (bppy_set_silent): Use
	breakpoint_set_silent.
	(bppy_set_thread): Use breakpoint_set_thread.
	(bppy_set_task): Use breakpoint_set_task.
	* breakpoint.h (breakpoint_set_silent, breakpoint_set_thread)
	(breakpoint_set_task): Declare.
	(make_breakpoint_silent): Remove.
	* breakpoint.c (breakpoint_set_silent): New function.
	(breakpoint_set_thread): Likewise.
	(breakpoint_set_task): Likewise.
	(make_breakpoint_silent): Remove.
2011-01-31 15:16:59 +00:00
Tom Tromey 09d682a4f3 * breakpoint.h (user_breakpoint_p): Declare.
* breakpoint.c (user_breakpoint_p): New function.
	(breakpoint_1): Use it.
	(save_breakpoints): Likewise.
2011-01-31 15:07:49 +00:00
Alexandre Oliva 65b4571a45 PR libgcj/44341
* configure.ac: Discard --with-* flags for host when configuring
target libraries for cross build.
* configure: Rebuilt.
2011-01-31 05:26:01 +00:00
Joel Brobecker 9c4ea6c5a9 allow building GDB with Python support on MinGW
This makes several adjustements to the configure python-config.py
scripts to deal with the differences between a Unix install of Python
and a Windows install of Python (as downloaded from the Python website).

Differences:

  - The Python executable is directly in the python prefix directory
    as opposed to inside the bin/ subdirectory.

  - The name of the python library is does not have a dot in the version
    number: On Unix, we have libpython2.7, while on Windows, it's
    libpython27.  So the regexp extracting the python version from
    the Python lib filename had to be adjusted slightly.

    Also, the tests checking the name of the libpython had to be
    adjusted to allow for that.

  - There are no link options following the -lpython<version> switch
    on Windows, but the regexp extracting the python version was
    using it as a delimiter.  It had to be removed.

  - python-config.py does not work on Windows, mostly because
    some sysconfig variables are missing.  They are not necessary
    so the script was adapted to skip them if not defined.

  - The paths returned by python-config.py follow the Windows filename
    convention in terms of the directory separator, and this is causing
    trouble when the build environment is cygwin (while the compiler
    and Python are MinGW).  We could have fixed that in the configure
    script, but it felt simpler to do so in python-config.py

gdb/ChangeLog:

        * configure.ac: Add handling of Python distribution on Windows.
        * python-config.py: If the LIBS, SYSLIBS, LIBPL and/or LINKFORSHARED
        sysconfig variables are not defined, then do not use them.
        On Windows, if LIBPL is not defined, then use prefix + '/libs'
        instead.  On Windows, return all paths using forward-slashes
        rather than backslashes.
2011-01-31 04:42:08 +00:00
Joel Brobecker ac534cba29 do not use python<version> subdir when including Python .h file
This is preparation work for being able to build GDB with Python
support on MinGW.

So far, the "python<version>" subdirectory needs to be specified
when including a Python header file.  In order to do that, we have
some special configury that tweaks the include path returned by
python-config.py such that the use of the subdirectory in the include
is necessary.  This was done in order to protect ourselves from
possible filename conflicts, since some of the filenames chosen by
Python were a little generic.

The problem is that this cannot work with a standard Python install
on MinGW systems.  On such systems, the .h files are located in
<python_prefix>/include.  So, in preparation for allowing us to build
GDB on MinGW with Python support enabled, this patch changes the
requirement to provide the "python<version>" subdirectory in the
include directive.

The positive consequence is that we no longer need to have a set
of #include directives for each version of Python, since the include
directive is now the same for all versions of Python.  However, the
downside is that we are losing the level of protection we were trying
to achieve by forcing the subdirectory in the include directive.
In order to reduce a bit the consequences of a possible conflict,
this patch also changes the location where the -I/path/to/python
switch goes, to be last in the list (suggested by Doug Evans).

One last change is the fact that we are now including Python.h
and all other Python include headers using angle brackets rather
than double-quotes.  This fixes a problem on case-insensitive
systems where #include "Python.h" causes our gdb/python/python.h
header to be included instead of Python's <Python.h> header.

gdb/ChangeLog:

	* configure.ac: Remove fallback behavior for building
	against Python.  Remove tweaking of Python include path.
	Add PYTHON_CPPFLAGS and PYTHON_LIBS substitution.
	(AC_TRY_LIBPYTHON):  Adjust program used in linking test.
	If link is successful, set PYTHON_CPPFLAGS and PYTHON_LIBS.
	Always restore CPPFLAGS and LIBS after linking test.
	* configure: Regenerated.
	* Makefile.in (INTERNAL_CPPFLAGS): Add @PYTHON_CPPFLAGS@.
	(INSTALLED_LIBS, CLIBS): Add @PYTHON_LIBS@.
	* python/python-internal.h: Adjust includes of Python .h files.
2011-01-31 04:41:27 +00:00
Joel Brobecker c2f0d045af Add missing i18n markup in tracepoint.c:traceframe_walk_blocks
gdb/ChangeLog:

 	* tracepoint.c (traceframe_walk_blocks): Add missing i18n markup
 	in error message.
2011-01-31 03:12:06 +00:00
Joel Brobecker 6b0c4c1f05 fix typo during interactive_mode check in gdb_has_a_terminal
Discovered by Pierre Muller.

gdb/ChangeLog:

        * inflow.c (gdb_has_a_terminal): Fix typo in interactive_mode
        value test.

gdb/testsuite/ChangeLog:

        * gdb.base/interact.exp: Add extra tests that verify that
        the value of the interactive-mode setting does not change
        after the script is sourced.
2011-01-31 03:11:40 +00:00
gdbadmin f4b54baf38 *** empty log message *** 2011-01-31 00:00:02 +00:00
Yao Qi 672c979515 2011-01-31 Yao Qi <yao@codesourcery.com>
* arm-linux-nat.c: Update calls to regcache_register_status
	instead of regcache_valid_p.
	* aix-thread.c: Likewise.
	* i386gnu-nat.c: Likewise.
2011-01-30 23:16:33 +00:00
Alan Modra 38eb900395 daily update 2011-01-30 23:00:07 +00:00
gdbadmin 9ed0894745 *** empty log message *** 2011-01-30 00:00:03 +00:00
Alan Modra a3ec7a4927 daily update 2011-01-29 23:00:05 +00:00
Jan Kratochvil 80b23b6aeb gdb/
Fix crash.
	* valops.c (compare_parameters): Verify TYPE_NFIELDS before
	touching TYPE_FIELD_ARTIFICIAL.

gdb/testsuite/
	* gdb.cp/noparam.exp: New file.
	* gdb.cp/noparam.cc: New file.
2011-01-29 10:30:20 +00:00
Joseph Myers 5240d94db3 * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
field.
2011-01-29 00:12:52 +00:00
gdbadmin 21355e73e3 *** empty log message *** 2011-01-29 00:00:03 +00:00
Alan Modra c6b67b32dd daily update 2011-01-28 23:00:04 +00:00
Richard Earnshaw 4cd712bdad * MAINTAINERS: Move myself from Responsible Maintainers to Authorized
Committers.
2011-01-28 16:32:26 +00:00
Pedro Alves ffd5ec2486 gdb/
* tracepoint.c (tfile_xfer_partial): If there's no traceframe
	selected, don't try iterating over the traceframe's blocks.
	(tfile_has_stack): If there's no traceframe selected, then there's
	no stack.
	(tfile_has_registers): If there's no traceframe selected, then
	there's no registers.

	gdb/testsuite/
	* gdb.trace/tfile.exp: Test that with no traceframe selected,
	there's no stack or registers.
2011-01-28 16:18:55 +00:00
Pedro Alves e8c9e0a18f gdb/
* target.c (memory_xfer_partial): No need to restore shadows if we
	haven't read anything.
2011-01-28 16:00:16 +00:00
Pedro Alves de15c4ab2d gdb/
* mips-tdep.c (mips_print_register): Use get_frame_register_value
	and val_print_scalar_formatted.
2011-01-28 15:42:01 +00:00
Pedro Alves 1c79eb8a7d gdb/gdbserver/
* regcache.c (init_register_cache): Initialize
	regcache->register_status.
	(free_register_cache): Release regcache->register_status.
	(regcache_cpy): Copy register_status.
	(registers_to_string): Print 'x's for unavailable registers.
	(supply_register): Mark the register's status valid or
	unavailable, depending on whether a buffer was passed in or not.
	(supply_register_zeroed): New.
	(supply_regblock): Mark the registers' status valid or
	unavailable, depending on whether a buffer was passed in or not.
	* regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
	(struct regcache): New `register_status' field.
	(supply_register_zeroed): Declare.
	* i387-fp.c (i387_xsave_to_cache): Zero out registers using
	supply_register_zeroed, rather than passing a NULL buffer to
	supply_register.
	* tracepoint.c (fetch_traceframe_registers): Update comment.
2011-01-28 13:36:32 +00:00
Pedro Alves 85724a0e60 2011-01-28 Pedro Alves <pedro@codesourcery.com>
* i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
	buffer explicit.
2011-01-28 12:58:00 +00:00
gdbadmin 0fda7d1689 *** empty log message *** 2011-01-28 00:00:33 +00:00
Alan Modra 2988010ff0 daily update 2011-01-27 23:00:05 +00:00
DJ Delorie eb6fae196b * config/tc-rx.c (md_convert_frag): If we can't compute the target
address, zero out the values stored in the object file to make
objdump's output consistent.
2011-01-27 22:38:32 +00:00
Pedro Alves 9f41c73181 gdb/
* tracepoint.c (tfile_read): New.
	(tfile_open): Use it.
	(tfile_get_traceframe_address): Use it.
	(tfile_trace_find): Use it.
	(walk_blocks_callback_func): New typedef.
	(match_blocktype): New function.
	(traceframe_walk_blocks): New function.
	(traceframe_find_block_type): New function.
	(tfile_fetch_registers, tfile_xfer_partial)
	(tfile_get_trace_state_variable_value): Use
	traceframe_find_block_type and tfile_read.
2011-01-27 21:39:24 +00:00
gdbadmin 7d71f58245 *** empty log message *** 2011-01-27 00:00:05 +00:00
Kevin Buettner cdefc55df3 * remote-mips.c: Add internationalization mark ups. Remove
trailing \n from already marked up strings.
2011-01-26 23:13:22 +00:00
Alan Modra 92e1a16bfa daily update 2011-01-26 23:00:06 +00:00
Tom Tromey a81766d88f gdb
* python/py-prettyprint.c (print_string_repr): Clear
	'addressprint' option when calling val_print_string.
	(print_children): Handle Val_pretty_default.  Clear 'addressprint'
	option when calling val_print_string.
gdb/testsuite
	* gdb.python/py-prettyprint.exp (run_lang_tests): Ensure no blank
	space before string output.  Add test for "set print pretty off"
	case.
2011-01-26 20:58:49 +00:00
Tom Tromey 74aedc4602 * python/python.c (gdbpy_solib_name): Use gdb_py_longest and
GDB_PY_LL_ARG.
	* python/python-internal.h (GDB_PY_LL_ARG, GDB_PY_LLU_ARG): New
	macros.
	(gdb_py_longest, gdb_py_ulongest): New typedefs.
	(gdb_py_long_from_longest, gdb_py_long_from_ulongest)
	(gdb_py_long_as_ulongest): New defines.
	(gdb_py_object_from_longest, gdb_py_object_from_ulongest)
	(gdb_py_int_as_long): Declare.
	* python/py-value.c (valpy_lazy_string): Use gdb_py_longest,
	GDB_PY_LL_ARG, gdb_py_object_from_longest.
	(valpy_long): Add comment.
	* python/py-utils.c (get_addr_from_python): Use
	gdb_py_long_as_ulongest.  Handle overflow properly.
	(gdb_py_object_from_longest): New function.
	(gdb_py_object_from_ulongest): Likewise.
	(gdb_py_int_as_long): Likewise.
	* python/py-type.c (typy_array): Use gdb_py_int_as_long.
	* python/py-symtab.c (salpy_get_pc): Use
	gdb_py_long_from_ulongest.
	(salpy_get_line): Use PyInt_FromLong.
	* python/py-param.c (set_parameter_value): Use
	gdb_py_int_as_long.
	* python/py-lazy-string.c (stpy_get_address): Use
	gdb_py_long_from_ulongest.
	* python/py-frame.c (frapy_pc): Use gdb_py_long_from_ulongest.
	* python/py-cmd.c (cmdpy_completer): Use gdb_py_int_as_long.
	* python/py-breakpoint.c (bppy_set_thread): Use
	gdb_py_int_as_long.
	(bppy_set_task): Likewise.
	(bppy_set_ignore_count): Likewise.
	(bppy_set_hit_count): Likewise.
	* python/py-block.c (blpy_get_start): Use
	gdb_py_object_from_ulongest.
	(blpy_get_end): Likewise.
	(gdbpy_block_for_pc): Use gdb_py_ulongest and GDB_PY_LLU_ARG.
2011-01-26 20:53:45 +00:00
Jan Kratochvil 6ec8b48eb8 binutils/
* dwarf.c (display_gdb_index): Support version 4, warn on version 3.
2011-01-26 10:27:46 +00:00
Kai Tietz ca19b261ec 2011-01-26 Kai Tietz <kai.tietz@onevision.com>
* config/tc-i386.c (md_begin): Set for x64 windows COFF target
        x86_dwarf2_return_column to 32.
2011-01-26 10:16:12 +00:00
Thiago Jung Bauermann e4f6d2ecc4 2011-01-25 Mathieu Lacage <mathieu.lacage@inria.fr>
PR/symtab 11766:
	* gdb/objfiles.h (struct objfile) <addr_low>: New field.
	* gdb/solib.c (solib_read_symbols): Check for addr_low in
	equality test for objfile, initialize addr_low if needed.
2011-01-26 01:55:19 +00:00
gdbadmin f829b0eccc *** empty log message *** 2011-01-26 00:00:02 +00:00
Alan Modra 9842b2ed21 daily update 2011-01-25 23:00:05 +00:00
Ian Lance Taylor d433c3ac5c * script.cc (script_add_extern): Rewrite to use
add_symbol_reference.
2011-01-25 18:55:24 +00:00
Pedro Alves b30aa27843 * tui/tui-regs.c (tui_register_format): Remove dead code. 2011-01-25 18:18:15 +00:00
Pedro Alves ab2188aa2a * printcmd.c (print_formatted): Use val_print_scalar_formatted
instead of print_scalar_formatted.
	(print_scalar_formatted): Don't handle 's' format strings here,
	and add an assertion that we never see such format here.
	* valprint.h (val_print_scalar_formatted): Declare.
	* valprint.c (val_print_scalar_formatted): New.
	* c-valprint.c (c_val_print): Use val_print_scalar_formatted
	instead of print_scalar_formatted.
	* jv-valprint.c (java_val_print): Ditto.
	* p-valprint.c (pascal_val_print): Ditto.
	* ada-valprint.c (ada_val_print_1): Ditto.
	* f-valprint.c (f_val_print): Ditto.
	* infcmd.c (registers_info): Ditto.
	* m2-valprint.c (m2_val_print): Ditto.
2011-01-25 17:59:00 +00:00
Pedro Alves 66d61a4cab * m2-valprint.c (print_unbounded_array): Pass
value_contents_for_printing rather than value_contents, to
	m2_print_array_contents.  Also pass in the value.
2011-01-25 17:43:29 +00:00
Jan Kratochvil 831adc1f7d gdb/
* dwarf2read.c (dwarf2_read_index, write_psymtabs_to_index)
	(save_gdb_index_command): Switch to .gdb_index version 4.
2011-01-25 17:25:12 +00:00
Doug Kwan 880473a6be 2011-01-25 Doug Kwan <dougkwan@google.com>
* gold/icf.cc (get_section_contents): Always lock section's object.
2011-01-25 17:14:59 +00:00
Pedro Alves 2062226976 * mi/mi-main.c (get_register): Use get_frame_register_value rather
than frame_register, and always pass a valid value to val_print.
2011-01-25 17:00:27 +00:00
Pedro Alves 585fdaa106 Centralize printing "<optimized out>".
gdb/
	* valprint.h (val_print_optimized_out): Declare.
	* cp-valprint.c (cp_print_value_fields): Use
	val_print_optimized_out.
	* jv-valprint.c (java_print_value_fields): Ditto.
	* p-valprint.c (pascal_object_print_value_fields): Ditto.
	* printcmd.c (print_formatted): Ditto.
	* valprint.c (valprint_check_validity): Ditto.
	(value_check_printable): Ditto.
	(val_print_optimized_out): New.

	gdb/doc/
	* gdb.texinfo: s/value optimized out/optimized out/g

	gdb/testsuite/
	* gdb.base/frame-args.exp: Adjust.
	* gdb.dwarf2/dw2-noloc.exp: Adjust.
	* gdb.dwarf2/dw2-inline-param.exp: Adjust.
	* gdb.dwarf2/pieces.exp: Adjust.
	* gdb.opt/clobbered-registers-O2.exp: Adjust.
	* gdb.opt/inline-locals.exp: Adjust.
	* gdb.threads/fork-child-threads.exp: Adjust.
2011-01-25 16:26:23 +00:00
Ken Werner d468832aa5 gdb/testsuite/ChangeLog
2011-01-25  Ken Werner  <ken.werner@de.ibm.com>

        * gdb.opencl/convs_casts.cl: Move program scope variables into the
        OpenCL kernel function. Add a comment as marker. Add address space
        qualifiers for the remaining program scope variables.
        * gdb.opencl/datatypes.cl: Likewise.
        * gdb.opencl/operators.cl: Likewise.
        * gdb.opencl/vec_comps.cl: Likewise.
        * gdb.opencl/convs_casts.exp: Replace gdb_test_multiple by gdb_test.
        Add breakpoint at the marker comment.
        * gdb.opencl/datatypes.exp: Likewise.
        * gdb.opencl/operators.exp: Likewise.
        * gdb.opencl/vec_comps.exp: Likewise.
2011-01-25 16:10:28 +00:00
Pedro Alves 29ec526351 gdb/
* infcmd.c (default_print_registers_info): Allocate values so to
	never pass a NULL value to val_print.
2011-01-25 15:47:58 +00:00
Pedro Alves de4127a3b2 * cp-valprint.c (cp_print_value): Treat the 'skip' local as
boolean.  Make sure to always pass a value that matches the
	contents buffer to callees.  Preserve `address' for following
	iterations.
	* value.c (value_contents_for_printing_const): New.
	(value_address): Constify value argument.
	* value.h (value_contents_for_printing_const): Declare.
	(value_address): Constify value argument.
2011-01-25 15:18:36 +00:00