Commit Graph

28680 Commits

Author SHA1 Message Date
Tom Tromey 5e44ecb338 * dwarf2loc.c (locexpr_regname): New function.
(locexpr_describe_location_piece): Use it.
	(disassemble_dwarf_expression): Add per_cu argument.  Use
	locexpr_regname.
	<DW_OP_GNU_deref_type, DW_OP_GNU_const_type,
	DW_OP_GNU_regval_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret>:
	New cases.
	(locexpr_describe_location_1): Add per_cu argument.
	(locexpr_describe_location): Update.
	(loclist_describe_location): Update.
2011-07-08 19:54:55 +00:00
Tom Tromey e0e9434c89 * dwarf2expr.c (execute_stack_op): Add QUIT. 2011-07-08 16:02:59 +00:00
gdbadmin a0b50e655a *** empty log message *** 2011-07-08 00:00:03 +00:00
Jan Kratochvil 97d146f805 gdb/testsuite/
* gdb.java/jprint.exp (print a java.lang.String): xfail without system
	debug info.
2011-07-07 14:08:21 +00:00
Hui Zhu 26afc0d703 2011-07-07 Hui Zhu <teawater@gmail.com>
Revert:
	2011-07-06  Hui Zhu  <teawater@gmail.com>
	* remote.c (remote_start_remote): Add TRY_CATCH for
	remote_get_trace_status.
	* tracepoint.c (disconnect_tracing): Ditto.
2011-07-07 13:32:55 +00:00
Andrew Burgess a40a111fc7 http://sourceware.org/ml/gdb-patches/2011-07/msg00085.html
* cli/cli-setshow.c (do_setshow_command): Display var_zinteger
	variables as signed, not unsigned.
2011-07-07 08:38:37 +00:00
Joel Brobecker e2bd3b15a8 Minor forward declaration reformatting (jit.c)
gdb/ChangeLog:

 	* jit.c (jit_inferior_init): Reformat forward declaration.
2011-07-07 02:07:04 +00:00
gdbadmin 5df0ebe99e *** empty log message *** 2011-07-07 00:00:03 +00:00
matt rice e3d961fe96 MAINTAINERS (Write after approval): Add myself to the list. 2011-07-06 22:20:16 +00:00
matt rice facde0e593 gdb.python/python.exp: Update filename paths.
gdb.python/py-symtab.exp: Ditto.
2011-07-06 22:15:02 +00:00
Joel Brobecker 3b2a0cf216 Fix JIT clang-lli regression (unable to read JIT descriptor from memory)
2011-07-06  Paul Pluzhnikov  <ppluzhnikov@google.com>

        * jit.c (jit_inferior_init): Forward declare.
        (jit_breakpoint_re_set_internal): Call jit_inferior_init.

testsuite/ChangeLog:

2011-07-06  Paul Pluzhnikov  <ppluzhnikov@google.com>

        * gdb.base/jit-so.exp: New test.
        * gdb.base/jit-dlmain.c: New file.
        * gdb.base/jit-main.c: Allow "main" to be elsewhere.
2011-07-06 21:40:17 +00:00
Marek Polacek 438640d112 gdb.python/py-evthreads.exp: add missing $ 2011-07-06 19:52:21 +00:00
Mike Frysinger 33a365dfad gdb: testsuite: add Blackfin support
This fills out a few of the test places where needed for Blackfin targets.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-06 18:40:30 +00:00
Marek Polacek 8f7ae68682 Fix race in gdb.python/py-evthreads.exp 2011-07-06 15:00:15 +00:00
Hui Zhu 21083d0f0c Correct a email error. 2011-07-06 02:46:47 +00:00
Hui Zhu 0f3428f083 2011-07-06 Hui Zhu <teawater@gmail.com>
* remote.c (remote_start_remote): Add TRY_CATCH for
	remote_get_trace_status.
	* tracepoint.c (disconnect_tracing): Ditto.
2011-07-06 02:43:12 +00:00
gdbadmin dfea59b08c *** empty log message *** 2011-07-06 00:00:03 +00:00
Tom Tromey fc9f3a6978 * symtab.c (operator_chars): Now static.
* linespec.c (operator_chars): Don't declare.
2011-07-05 20:30:19 +00:00
Thiago Jung Bauermann 26e519b913 * ui-out.h (ui_out_field_core_addr): Fix typo in comment. 2011-07-05 18:36:52 +00:00
Tom Tromey eb2a6f420b gdb
* gnu-v3-abi.c (gnuv3_rtti_type): Check TYPE_CPLUS_REALLY_JAVA.
	* gdbtypes.h (struct cplus_struct_type) <is_java>: New field.
	(TYPE_CPLUS_REALLY_JAVA): New macro.
	* dwarf2read.c (process_structure_scope): Set
	TYPE_CPLUS_REALLY_JAVA.
gdb/testsuite
	* gdb.java/jprint.java (jprint.hi): New field.
	* gdb.java/jprint.exp: Print string.
2011-07-05 13:36:42 +00:00
Thiago Jung Bauermann 177b42fefa gdb/
* ada-lang.c: Fix typos.
	* amd64-tdep.c: Likewise.
	* breakpoint.c: Likewise.
	* cli/cli-decode.c: Likewise.
	* findcmd.c: Likewise.
	* inline-frame.c: Likewise.
	* mi/mi-main.c: Likewise.
	* minsyms.c: Likewise.
	* monitor.c: Likewise.
	* monitor.h: Likewise.
	* prologue-value.c: Likewise.
	* reverse.c: Likewise.
	* s390-tdep.c: Likewise.

gdb/testsuite/
	* gdb.base/call-sc.c: Likewise.
	* gdb.base/ifelse.exp: Likewise.
	* gdb.base/structs.c: Likewise.

gdb/doc/
	* gdb.texinfo: Likewise.
2011-07-05 04:35:00 +00:00
gdbadmin ec478a00d2 *** empty log message *** 2011-07-05 00:00:03 +00:00
Joel Brobecker efae1d9244 Minor comment reformatting in generic_elf_osabi_sniffer
Comment says it all.  I just felt that putting some new text in
a separate paragraph allowed us to clearly identify the section
about ELFOSABI_NONE, and the part that talks about the new
ELFOSABI_GNU.

gdb/ChangeLog:

        * osabi.c (generic_elf_osabi_sniffer): Minor comment reformatting.
2011-07-04 19:50:44 +00:00
Joel Brobecker 6040a59db5 ada-tasks.c: handle known tasks maintained by a simply-linked list.
The mapping between Ada tasks, and the underlying threads is
normally maintained by the GNAT runtime under the known_tasks
array.  For performance reasons, this array is just a static
array with 10_000 entries in it. However, this is not very
practical in certain environments where memory is limited.
For those environments, the runtime has been enhanced to use
an alternate scheme with a linked list.

This change enhances the Ada tasking support to recognize this
situation and use the correct way of reading the tasks info
based on the the situation.

gdb/ChangeLog  (Tristan Gingold)

	* ada-tasks.c (KNOWN_TASKS_LIST): New macro.
	(tcb_fieldno): Add activation_link field.
	(get_known_tasks_addr): Moved and rewritten.
	(get_tcb_types_info): Set activation_link field.
	(read_known_tasks_array): Add parameter.  Rewritten.
	(read_known_tasks_list): New function.
	(read_known_tasks): New function.
	(ada_build_task_list): Call read_known_tasks instead of
	read_known_tasks_array.
	* ravenscar-thread.c: Add first_task_name constant.
	(has_ravenscar_runtime): Check for task list too.
2011-07-04 19:32:07 +00:00
Joel Brobecker cb741e45a0 Minor changes in ada-tasks.c
Just some minor cleanup changes in preparation for an upcoming
change...

gdb/ChangeLog  (Tristan Gingold)

	* ada-tasks.c: Renames fieldno to actb_fieldno.
	(ada_get_task_number): Indentation.
	(get_tcb_types_info): Remove all parameters.  Write directly
	the globals.
	(ptid_from_atcb_common): Adjust.
	(read_atcb): Adjust.
2011-07-04 19:31:49 +00:00
Thiago Jung Bauermann 7475b06c20 * symtab.c (in_prologue): Remove mention of ppc's refine_prologue_limit. 2011-07-04 18:51:12 +00:00
Thiago Jung Bauermann 15230f3745 * ui-out.c (ui_out_field_core_addr): Mention that the function
description is in the header file.
	* ui-out.h (ui_out_field_core_addr): Document function.
2011-07-04 18:50:17 +00:00
Thiago Jung Bauermann 65743aba62 * ui-out.c (ui_out_get_field_separator): Remove unused function.
* ui-out.h (ui_out_get_field_separator): Remove prototype.
2011-07-04 18:48:25 +00:00
Thiago Jung Bauermann c37a5aab6b * symtab.c (expand_line_sal): Remove empty line. 2011-07-04 18:47:09 +00:00
Thomas Schwinge 59adf69ea5 ELFOSABI_GNU.
gdb/
	* osabi.c (generic_elf_osabi_sniffer) <ELFOSABI_GNU>: Handle in the
	same way as ELFOSABI_NONE.
	<ELFOSABI_LINUX, ELFOSABI_HURD>: Remove cases.
2011-07-04 18:33:37 +00:00
Thiago Jung Bauermann e5dd410683 * breakpoint.c: Fix typos in comments.
* linespec.c: Likewise.
	* symtab.c: Likewise.
2011-07-04 18:31:25 +00:00
Joel Brobecker d40102a141 Do not load .eh_frame section from separete object files
We don't need to read the .eh_frame section from the separate
object files, because this data is already present in the
main executable (it needs to, or the program wouldn't work).

We discovered this investigating a problem with the 'next' command,
which was due to unwind failures, which came from the fact that
the .eh_frame was incorrectly relocated.

gdb/ChangeLog (Tristan Gingold):

    * dwarf2-frame.c (dwarf2_build_frame_info): Do not load .eh_frame
    section in separate object files.
2011-07-04 16:30:09 +00:00
Jan Kratochvil 2f741504c0 gdb/
Fix false GCC warning.
	* linespec.c (decode_line_1): Initialize values.
2011-07-04 14:16:14 +00:00
gdbadmin 9821e17216 *** empty log message *** 2011-07-04 00:00:02 +00:00
gdbadmin 662835875e *** empty log message *** 2011-07-03 00:00:02 +00:00
Jan Kratochvil e17476d75f gdb/testsuite/
* gdb.cp/m-static.exp: Call get_compiler_info.
	(static const int initialized nowhere): Call setup_xfail for gcc <= 4.4.
	* gdb.cp/pr9167.exp (p b): Likewise.
	* gdb.cp/temargs.exp: Do not set have_pr_45024_fixed for gcc 4.6.
	(test value of P in inner_m, test type of Z in inner_m): Call
	setup_xfail for gcc <= 4.5.
2011-07-02 15:13:13 +00:00
Jan Kratochvil 46fc714c1b gdb/testsuite/
* gdb.cp/m-static.exp: Call get_compiler_info.
	(static const int initialized nowhere): Call setup_xfail for gcc<=4.4.
2011-07-02 12:08:44 +00:00
gdbadmin b50c5470c5 *** empty log message *** 2011-07-02 00:00:02 +00:00
Jan Kratochvil 418c7cf761 gdb/
* linespec.c (find_method): Accept the function type automatically only
	if it was specified with parameter types.

gdb/testsuite/
	* gdb.cp/paren-type.cc: New files.
	* gdb.cp/paren-type.exp: New files.
2011-07-01 20:27:59 +00:00
Jan Kratochvil 3d50dd94cb gdb/
Stop on first linespec terminator instead of eating what we can.
	* linespec.c (is_linespec_boundary): New function.
	(name_end): Remove function.
	(keep_name_info): New parameter on_boundary, replace the body.
	(decode_line_1): Provide the parameter to keep_name_info.
	(decode_compound): Likewise.  Drop the trailing java return type
	handling.  Twice.

gdb/testsuite/
	Stop on first linespec terminator instead of eating what we can.
	* gdb.cp/minsym-fallback-main.cc (main): Call also C::operator ().
	* gdb.cp/minsym-fallback.cc (C::operator ()): Define.
	* gdb.cp/minsym-fallback.exp (break 'C::f()'): Change to ...
	(break C::f()): ... this one.
	(break C::operator()()): New test.
	* gdb.cp/minsym-fallback.h (C::operator ()): Declare.
	* gdb.java/jmisc.exp (break jmisc.main(java.lang.String[])int): New
	test.
2011-07-01 20:19:04 +00:00
Jan Kratochvil dcf9f4ab7f gdb/
Fall back linespec to minimal symbols.
	* linespec.c (decode_line_1): New variable ex, saved_argptr.  Protect
	decode_compound by TRY_CATCH, fall back on minsyms if it failed.
	(find_method, symbol_found): Change error to cplusplus_error.

gdb/testsuite/
	Fall back linespec to minimal symbols.
	* gdb.base/psymtab.exp (Don't search past end of psymtab.): Update the
	error message.
	* gdb.cp/cplusfuncs.exp (list foo::operator int*): Likewise.
	* gdb.cp/minsym-fallback-main.cc: New file.
	* gdb.cp/minsym-fallback.cc: New file.
	* gdb.cp/minsym-fallback.exp: New file.
	* gdb.cp/minsym-fallback.h: New file.
2011-07-01 20:16:39 +00:00
Jan Kratochvil bc68c4e5f8 gdb/Changelog fix:
* symtab.c (symbol_find_demangled_name): Remove DMGL_VERBOSE.
2011-07-01 19:19:13 +00:00
Jan Kratochvil 3f542ed1a3 gdb/
* symtab.c (symbol_find_demangled_name): Likewise.

gdb/testsuite/
	* gdb.cp/no-dmgl-verbose.cc: New file.
	* gdb.cp/no-dmgl-verbose.exp: New file.
2011-07-01 19:18:36 +00:00
Jan Kratochvil 900e11f9ec gdb/
* dwarf2read.c (check_physname): New variable.
	(dwarf2_physname): Prefer DW_AT_linkage_name over dwarf2_compute_name.
	(show_check_physname): New function.
	(_initialize_dwarf2_read): Add `check-physname' for check_physname.

gdb/doc/
	* gdb.texinfo (Debugging Output): Document set debug
	check-physname.

gdb/testsuite/
	* gdb.base/break-interp.exp (reach_1, test_ld): Allow also the prefix
	__GI_.
	* gdb.cp/psymtab-parameter.cc (func): Make it a template function.
	(f): New function.
	* gdb.cp/psymtab-parameter.exp (complete break 'func(): Rename to ...
	(complete p 'func<short>(): ... here.
	* gdb.dwarf2/dw2-linkage-name-trust-main.cc: New file.
	* gdb.dwarf2/dw2-linkage-name-trust.S: New file.
	* gdb.dwarf2/dw2-linkage-name-trust.exp: New file.
	* gdb.cp/temargs.exp (test type of F in k3_m, test value of F in k3_m):
	Make them KFAIL gcc/49546.
2011-07-01 19:12:12 +00:00
Joel Brobecker 2301925dd2 remove comment in machoread.c (macho_symfile_read)
Does not seem to be applicable to the current code anymore.

gdb/ChangeLog:

        * machoread.c (macho_symfile_read): Delete OBE comment.
2011-07-01 18:36:45 +00:00
Joel Brobecker 38947ccadc [mach-o] get rid of current_oso global
This current_oso global was used to store the OSO's symbol table
in order to relocate common symbols.  But it is also making the
assumption that all sections are going to be immediately relocated
as macho_add_oso_symfile does:
  - Initialize the current_oso
  - Use it through symbol_file_add_from_bfd
  - Reset the current_oso (to all fields NULL)

What actually happens is that the .debug_frame section gets read
lazily, and thus relocated at a later time.  This relocation causes
current_oso.symbol_table to be initialized (see macho_symfile_relocate)
again.  And this eventually causes to trip the...

        gdb_assert (current_oso.symbol_table == NULL);

...assertion to fail because the symbol_table was never free'ed.
To be complete, this happens because macho_symfile_relocate was
called outside of macho_add_oso_symfile's control, where the
set-global/use/unset-global dance happens.

But it looks like keeping this global around is not necessary, as
this symbol table is only used to relocate the common symbols.
We can do that prior to relocating the rest of the symbols.

gdb/ChangeLog:

        * machoread.c (struct macho_oso_data): Delete.
        (current_oso): Delete.
        (macho_relocate_common_syms): New function, mostly extracted
        out of
        (macho_add_oso_symfile): Call macho_relocate_common_syms.
        Remove code that sets and unset current_oso.
        (macho_symfile_relocate): Delete handling of common symbols,
        now moved to macho_relocate_common_syms.
2011-07-01 18:36:36 +00:00
Joel Brobecker a7aa0d73a2 [Darwin] Do not crash (failed assertion) after PT_KILL ptrace error
It might not be a debugger bug that caused the PT_KILL ptrace operation
to fail.  So emit a warning instead, and try to continue.

This patch also tries to handle the case where ptrace return -1,
but left errno set to zero.  According to the ptrace man page,
it is possible for some ptrace operations to return -1 in non-error
situations, and to detect those situations, it explains that errno
should be set prior to calling ptrace, and then checked again after.

gdb/ChangeLog:

        * darwin-nat.c (darwin_ptrace): Add documentation.
        Set errno to zero before calling ptrace.  If ptrace returns
        -1 and errno is zero, then change then return zero.
        (darwin_kill_inferior): Issue a warning instead of triggering
        a failed assertion when the PT_KILL ptrace operations returned
        nonzero.
2011-07-01 18:36:28 +00:00
Joel Brobecker 5e9bc145ee Darwin/detach: Do not resume inferior after ptrace detach
When trying to detach from an inferior that we start from the debugger,
GDB prints the following warning:

    (gdb) detach
    Detaching from program: /[...]/foo, process 74593
    warning: Mach error at "/[...]/darwin-nat.c:445" in function "darwin_resume_inferior": (os/kern) failure (0x5)

The warning comes from the following code in darwin_detach:

     darwin_resume_inferior (inf);

This is because the process has already been resumed by the
PT_DETACH ptrace operation that has just been performed.

On the other hand, when trying to detach from an inferior that
was started outside of debugger control (thus after having attached
the debugger to that inferior), things go smoothly.  That's because
we don't use ptrace to control the process in that case, and so
the resume is perfectly justified.

This patch makes sure that we resume the inferior during the detach
only when we're NOT using ptrace.

gdb/ChangeLog:

        * darwin-nat.c (darwin_detach): Call darwin_resume_inferior
        only when inf->private->no_ptrace.
2011-07-01 18:36:12 +00:00
Joel Brobecker 00eb2c4ae8 bettter display for temporary Ada exception catchpoints
Temporary catchpoints on Ada exceptions are now displayed as "Temporary
catchpoint" as opposed to just "Catchpoint".  This is cosmetic only, but
in line with what's done for other catchpoints as well as breakpoints.

gdb/ChangeLog:

        * ada-lang.c (print_it_exception): Print temporary catchpoints
        as "Temporary catchpoint".
        (print_mention_exception): Likewise.

gdb/testsuite/ChangeLog:

        * gdb.ada/catch_ex.exp: Add temporary catchpoint tests.
2011-07-01 18:35:36 +00:00
Jan Kratochvil 85a20c42ea gdb/testsuite/
Test GCC PR debug/49546.
	* gdb.cp/temargs.exp (set sixth breakpoint for temargs)
	(test type of F in k3_m, test value of F in k3_m): New.
	* gdb.cp/temargs.cc (struct S3, struct K3): New.
	(main): New variable k3.  Call k3.k3_m.
2011-07-01 18:32:06 +00:00