Commit Graph

28804 Commits

Author SHA1 Message Date
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
Tom Tromey 127c81bc57 * jv-lang.c (java_language_defn): Use java_printchar,
java_printstr.
	(java_get_encoding): New function.
	(java_emit_char): Use generic_emit_char.
	(java_printchar): New function.
	(java_printstr): Likewise.
2011-07-01 18:28:52 +00:00
Joel Brobecker 25552254a3 crash when printing type of tagged type
If the debugging info is incorrect or incomplete, printing the
type description of a variable that's a variant tagged type can
trigger a crash.  The crash comes from us trying print a NULL
string which was supposed to be the parent type name.

We observed this behavior on bareboard targets where a-tags is
not always linked in, as is the case for native platforms, for
instance. Coupled with -feliminate-unused-debug-types, this leads
to GDB being unable to find type ada__tags__type_specific_data,
without which printing the type description above cannot be done
acurately.  There is an easy workaround for this limitation,
which is to compile at least 1 unit with
-fno-eliminate-unused-debug-types, but GDB should also be made
resilient to this situation.

gdb/ChangeLog:

        * ada-typeprint.c (print_record_type): If unable to decode
        the name of the parent type, use the encoded name.
2011-07-01 18:27:35 +00:00
Joel Brobecker d2d43431e8 Fix printing address of packed array
When trying to print the address of a non-packed array, GDB
correctly prints the type name and address:

    (gdb) print &var
    $2 = (access pa.var) 0xbffff1d8

However, it is behaving differently when dealing with a packed
array:

    (gdb) p &var
    (access array (4 .. 8) of boolean <packed: 1-bit elements>) (4 =>
    false, false, false, true, false)

The type description isn't all that bad, but GDB shouldn't be
printing the array value!

This patch fixes the `print` and `ptype` command on packed and
non-packed array.  It also fixes a gdb.ada test to match with
the new ouput.

gdb/ChangeLog (Jean-Charles Delay):

        * ada-typeprint.c (ada_print_type): Fix both PAD type and
        pointer to constrained packed array type output.
        * ada-valprint.c (ada_val_print_1): Fix pointer to constrained
        packed array output.

gdb/testsuite/ChangeLog (Jean-Charles Delay):

        * gdb.ada/packed_array.exp: Fix expected outout.
2011-07-01 18:27:25 +00:00
Joel Brobecker 54ae186fb5 Fix ada array bounds display
Array bounds were not correctly displayed when the SHOW parameter of
print_type functions is set to -1.  This shows up in the following
type of situation, where we have a declaration as follow:

    Anon_Array_Int_Obj : array (1..10) of Integer := (others => 8);

In GDB/MI mode, trying to print the type info for our array object
yields:

    (gdb) -var-create ai 0 Anon_Array_Int_Obj
    (gdb) -var-info-type ai
    ^done,type="array (...) of integer"

The actual bounds are missing.  Contrast this with what happens
when in GDB/CLI mode:

    (gdb) ptype Anon_Array_Int_Obj
    type = array (1 .. 10) of integer

This patch fixes array type printing accordingly. And as it turns
out, it also improves the output for one of the tests already present,
so it shows that it's not just the GDB/MI mode that's affected.

gdb/ChangeLog (Jean-Charles Delay):

	* ada-typeprint.c (print_array_type): removed if condition on show
	being negative for bounds printing.

gdb/testsuite/ChangeLog (Jean-Charles Delay):

	* gdb.ada/packed_array.exp: fixed expected output.
2011-07-01 18:27:12 +00:00
Joel Brobecker 8f17729f21 treat identical enum types as the same type
This is to avoid an unnecessary multiple-choice menu for an
expression involving an enumeral declared in two types, when
the second type is an identical copy of the first type. This
happens in the following situation:

       type Color is (Black, Red, Green, Blue, White);
       type RGB_Color is new Color range Red .. Blue;

In that case, an implict type is created, and is used as the base
type for type RGB_Color.  This base type is a copy of type Color.
We've added some extensive comments explaining the situation and
our approach further.

gdb/ChangeLog:

        * ada-lang.c (ada_identical_enum_types_p): New function.
        (symbols_are_identical_enums): New function.
        (remove_extra_symbols): Do nothing if NSYMS < 2.
        Use symbols_are_identical_enums.

gdb/testsuite/ChangeLog:

        * gdb.ada/same_enum: New testcase.
2011-07-01 18:26:50 +00:00
Joel Brobecker f5aa6869de missing type description for typedef to pointer value
If we evaluate an expression that results in a value that is a typedef
to pointer, then the debugger fails to print the type description
before printing the actual value:

    (gdb) print e.plan(1)
    $1 = 0x0

The expected output is:

    (gdb) print e.plan(1)
    $1 = (access integer) 0x0

gdb/ChangeLog:

        * ada-valprint.c (ada_value_print): Handle typedefs.

gdb/testsuite/ChangeLog:

        * gdb.ada/ptr_typedef: New testcase.
2011-07-01 18:26:22 +00:00
Joel Brobecker 8f465ea731 Add missing word in comment (ada-lang.c)
gdb/ChangeLog:

        * ada-lang.c (ada_evaluate_subexp): Add missing word in comment.
2011-07-01 18:25:59 +00:00
Joel Brobecker 828292f271 variables whose type is a typedef to an array pointer
If we declare a type as being an access to array type, and then
declare a variable of that type, for instance:

        type Some_Array is array [...];
        type Array_Access is access all Some_Array;
        Table : Array_Access := [...];

The variable "Table" may be defined in the debugging information
as being a typedef to the array pointer type. In the past, it was
defined directly as the array pointer type, but this has been changed
to make sure that the typedef type gets used.

If the typedef type wasn't used, it would allow the compiler to stop
emitting that typedef type when compiling with
-feliminate-unused-debug-types.  The removal of this typedef would
be a problem, because GDB relies on the typedef to create symbols
for pointer types, and without it, we would no longer be able to
do "ptype array_access".

This patch helps prevent incorrect output or even crashes when that
extra typedef layer is used.

The testing is already mostly covered by arrayptr.exp, but I still
added a 'ptype' test, just for good measure.

gdb/ChangeLog: (Eric Botcazou)

        * ada-lang.c (thin_descriptor_type): Deal with typedefs.
        (decode_constrained_packed_array): Likewise.
        (ada_evaluate_subexp) <TERNOP_SLICE>: Likewise.

gdb/testsuite/ChangeLog (Joel Brobecker):

        * gdb.ada/arrayptr.exp: Add ptype test.
2011-07-01 18:25:49 +00:00
Joel Brobecker 3536d9e3f5 Fix date in testsuite/ChangeLog entry. 2011-07-01 18:25:33 +00:00
Joel Brobecker 18920c4226 handle character-based enumeration typedefs
Consider the following type:

   type Char_Enum_Type is ('A', 'B', 'C', 'D');

If the compiler generates a Char_Enum_Type typedef in the debugging
information, the debugger fails in the following case:

   (gdb) p Char_Enum_Type'('B')
   $1 = 66

For our type, the underlying value of 'B' is actually 1, not 66
(ASCII 'B').  We are failing this case because we were not handling
typedef to enum types before.  This patch fixes this.

gdb/ChangeLog:

        * ada-exp.y (convert_char_literal): Handle typedef types.

gdb/testsuite/ChangeLog:

        * gdb.ada/char_enum: New testcase.
2011-07-01 18:25:17 +00:00
Joel Brobecker c90092fe9e Document ada_remove_trailing_digits more
gdb/ChangeLog:

        * ada-lang.c (ada_remove_trailing_digits): Expand documentation.
2011-07-01 18:24:52 +00:00
Yao Qi 54aeeb996d 2011-07-02 Yao Qi <yao@codesourcery.com>
* gdb.base/dump.exp (capture_pointer_with_type): New.
	Get value from address instead of name.
	Start GDB once, and do `dump' and `restore'
	tests together.
2011-07-01 16:42:42 +00:00
Mike Frysinger db863c4274 gdb: tests: set remotetimeout to gdb_load_timeout for remote targets
Rather than relying on the default remotetimeout value (which might be
too small for some slower devices), use the existing gdb_load_timeout
config option to set it.

This adds two new helpers for getting/setting the remotetimout to keep
the new logic simple.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-01 00:19:25 +00:00
gdbadmin 5429523ed4 *** empty log message *** 2011-07-01 00:00:33 +00:00
Tom Tromey f748fb4088 * varobj.c (varobj_create): Call do_cleanups on early exit path.
* valops.c (find_overload_match): Call do_cleanups on early exit
	path.
	* solib.c (solib_find): Call do_cleanups on early exit path.
2011-06-30 19:29:55 +00:00
Tom Tromey 3bb47e8bce * symfile-mem.c (symbol_file_add_from_memory): Call do_cleanups.
* solib-svr4.c (open_symbol_file_object): Call do_cleanups on all
	return paths.  Defer final do_cleanups until last return.
	* arm-tdep.c (arm_exidx_new_objfile): Make null cleanup after
	early return.
2011-06-30 18:48:19 +00:00
Tom Tromey 4727bad393 * Makefile.in (SUBDIR_MI_CFLAGS): Don't add -DMI_OUT=1. 2011-06-30 17:01:29 +00:00
Andrew Burgess bb361dbfaf http://sourceware.org/ml/gdb-patches/2011-06/msg00444.html
Add myself to the write after approval list.
2011-06-30 09:00:54 +00:00
Andrew Burgess e9e642a83f http://sourceware.org/ml/gdb-patches/2011-06/msg00442.html
Don't compile c++ tests for platforms that don't support c++.
2011-06-30 08:53:38 +00:00
gdbadmin b9c00dd73c *** empty log message *** 2011-06-30 00:00:32 +00:00
Jan Kratochvil e0d00bc749 gdb/
Disable epilogue unwinders on recent GCCs.
	* amd64-tdep.c (amd64_in_function_epilogue_p): New variable symtab,
	initialize it, return 0 on EPILOGUE_UNWIND_VALID.
	* dwarf2read.c (process_full_comp_unit): Initialize
	EPILOGUE_UNWIND_VALID.
	* i386-tdep.c (i386_in_function_epilogue_p): New variable symtab,
	initialize it, return 0 on EPILOGUE_UNWIND_VALID.
	* symtab.h (struct symtab): New field epilogue_unwind_valid.
2011-06-29 22:19:24 +00:00
Jan Kratochvil 4632c0d0ff gdb/
Code cleanup - reformatting.
	* dwarf2read.c (producer_is_gcc_ge_4_0): Rename to ...
	(producer_is_gcc_ge_4): ... here, change the return value.
	(process_full_comp_unit): New variable gcc_4_minor, adjust the value
	interpretation.
2011-06-29 22:17:57 +00:00
Jan Kratochvil 32019081a7 gdb/
Fix non-only rename list for Fortran modules import.
	* cp-namespace.c (cp_scan_for_anonymous_namespaces): Adjust the
	cp_add_using_directive caller.
	(cp_add_using_directive): New parameter excludes, describe it.  New
	variables ix and param.  Compare if also excludes match.  Allocate NEW
	with variable size, initialize EXCLUDES there.
	(cp_lookup_symbol_imports): New variable excludep, test
	current->EXCLUDES with it.
	* cp-support.h: Include vec.h.
	(struct using_direct): New field excludes, describe it.
	(DEF_VEC_P (const_char_ptr)): New.
	(cp_add_using_directive): New parameter excludes.
	* defs.h (const_char_ptr): New typedef.
	* dwarf2read.c (read_import_statement): New variables child_die,
	excludes and cleanups, read in excludes.
	(read_namespace): Adjust the cp_add_using_directive caller.

gdb/testsuite/
	Fix non-only rename list for Fortran modules import.
	* gdb.fortran/module.exp (print var_x, print var_y, print var_z): New
	tests.
	* gdb.fortran/module.f90 (module moduse): New.
	(program module): use moduse, test var_x, var_y and var_z.
2011-06-29 22:05:16 +00:00
Jan Kratochvil 70c622a3d2 gdb/
Code cleanup.
	* cp-namespace.c (cp_add_using_directive): Turn positive comparison to
	negative comparisons.
2011-06-29 22:02:58 +00:00
Tom Tromey 0ecee54cfd PR testsuite/12040:
* gdb.fortran/array-element.exp: Use f90, not f77.
	* gdb.fortran/complex.exp: Use f90, not f77.
	* gdb.fortran/derived-type.exp: Use f90, not f77.
	* gdb.fortran/library-module.exp: Use f90, not f77.
	* gdb.fortran/logical.exp: Use f90, not f77.
	* gdb.fortran/module.exp: Use f90, not f77.
	* gdb.fortran/multi-dim.exp: Use f90, not f77.
	* gdb.fortran/subarray.exp: Use f90, not f77.
2011-06-29 17:50:47 +00:00
Tom Tromey 39c4d40aa5 gdb
2011-06-29  André Pönitz  <andre.poenitz@nokia.com>

	* mi/mi-main.c (mi_cmd_list_features): Emit
	breakpoint-notifications.
gdb/doc
	* gdb.texinfo (GDB/MI Miscellaneous Commands): Document
	breakpoint-notifications feature.
2011-06-29 17:30:01 +00:00
Ulrich Weigand 6f5def7d9e * gdb.texinfo (Target Description): Remove warning about
possibly unstable format.
2011-06-29 16:28:22 +00:00
Tom Tromey 3b2b8feaf4 gdb
PR fortran/10036:
	* valprint.h (generic_emit_char, generic_printstr): Declare.
	* valprint.c (wchar_printable, append_string_as_wide)
	(print_wchar): Move from c-lang.c.
	(generic_emit_char): New function; mostly taken from c_emit_char.
	(generic_printstr): New function; mostly taken from c_printstr.
	* f-valprint.c (f_val_print) <TYPE_CODE_ARRAY>: Handle strings
	represented as arrays.
	<TYPE_CODE_CHAR>: Treat as TYPE_CODE_INT; recognize as character
	type.
	* f-typeprint.c (f_type_print_base) <TYPE_CODE_CHAR>: Treat
	identically to TYPE_CODE_INT.
	* f-lang.c (f_get_encoding): New function.
	(f_emit_char): Use generic_emit_char.
	(f_printchar): Replace comment.
	(f_printstr): Use generic_printstr.
	* dwarf2read.c (read_base_type) <DW_ATE_unsigned>: Handle Fortran
	"character" types specially.
	<DW_ATE_signed_char, DW_ATE_unsigned_char>: Make TYPE_CODE_CHAR
	for Fortran.
	* c-lang.c (wchar_printable, append_string_as_wide, print_wchar):
	Move to valprint.c
	(c_emit_char): Call generic_emit_char.
	(c_printstr): Call generic_printstr.
gdb/testsuite
	* gdb.fortran/charset.exp: New file.
	* gdb.fortran/charset.f90: New file.
2011-06-29 15:32:40 +00:00
Gary Benson 168e6d4402 gdb/
* breakpoint.c (bpstat_what): Removed duplicated case.
2011-06-29 15:20:34 +00:00
Tom Tromey 42159ca500 PR testsuite/12040:
* lib/future.exp: New file, mostly extracted from ada.exp.
	Rewrote compatibility code to use rename.
	(gdb_find_gfortran): New proc.
	(gdb_default_target_compile): Refresh from dejagnu; plus a pending
	gfortran patch.
	* lib/ada.exp (gdb_find_gnatmake, gdb_default_target_compile):
	Move to future.exp.
	* lib/gdb.exp: Always load future.exp.
2011-06-29 14:44:45 +00:00
gdbadmin d555a4fbf3 *** empty log message *** 2011-06-29 00:00:33 +00:00
Tom Tromey 1c033f8c71 * python/python-internal.h (PY_SSIZE_T_CLEAN): Define. 2011-06-28 13:09:12 +00:00
Yao Qi af69a5cef7 2011-06-28 Yao Qi <yao@codesourcery.com>
* gdb.cp/exception.cc: Don't include iostream.
	(bar): Remove print statement.
	(catcher): New.
	(main): Remove print statements.  Call function catcher.
	* gdb.cp/exception.exp : Don't match inferior's output in regexp.
	Set breakpoint on catcher, and check the value of parameter.
2011-06-28 08:36:18 +00:00
gdbadmin 50673a5a82 *** empty log message *** 2011-06-28 00:00:03 +00:00
Tom Tromey 5fe41fbfa2 * valops.c (find_overload_match): Call do_cleanups before early
return.
	* top.c (execute_command): Call do_cleanups before early return.
	(command_loop): Likewise.
	* stack.c (backtrace_command): Make a null cleanup early.  Don't
	conditionally call do_cleanups.
	* python/py-value.c (TRY_CATCH): Move cleanup handling into
	TRY_CATCH.
	* python/py-breakpoint.c (gdbpy_breakpoint_has_py_cond): Rearrange
	so cleanups are always run.
	* mi/mi-cmd-var.c (mi_cmd_var_delete): Reset old_cleanups.
	* findcmd.c (parse_find_args): Call do_cleanups on early return
	path.
	* dbxread.c (elfstab_build_psymtabs): Make a null cleanup early.
	Don't conditionally call do_cleanups.
	* cli/cli-script.c (execute_user_command): Initialize 'old_chain'
	later.
2011-06-27 19:21:51 +00:00
Eric Botcazou e26bd57dea * MAINTAINERS (Write After Approval): Use default email address. 2011-06-27 17:00:39 +00:00
Joel Brobecker 6c3097fcd3 Add Eric Botcazou to the list of `Write After Approval' contributors
* MAINTAINERS (Write After Approval): Add Eric Botcazou.
2011-06-27 16:38:27 +00:00
Joel Brobecker 369c397ba4 Add support for single register window model on SPARC
2011-06-27  Eric Botcazou  <ebotcazou@adacore.com>
        * sparc-tdep.h (struct sparc_frame_cache): Add frame_offset,
        saved_regs_mask and copied_regs_mask fields.
        (sparc_record_save_insn): New prototype.
        * sparc-tdep.c (sparc_alloc_frame_cache): Initialize the new fields.
        (sparc_record_save_insn): New function.
        (sparc_analyze_prologue): Add head comment.  Recognize store insns
        of call-saved registers.  Use OFFSET consistently.  Recognize flat
        frames and cache their settings.
        (sparc32_skip_prologue): Handle flat frames.
        (sparc_frame_cache): Add frame_offset to the base address.
        (sparc32_frame_cache): Adjust to new frame description.
        (sparc32_frame_prev_register): Likewise.
        * sparc64-tdep.c (sparc64_frame_prev_register): Likewise.
        * sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_cache): Likewise.
        * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_cache): Likewise.
        * sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_cache): Force the
        frame by calling sparc_record_save_insn.
        * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_cache): Likewise.
        * sparcobsd-tdep.c (sparc32obsd_sigtramp_frame_cache): Likewise.
        * sparc64obsd-tdep.c (sparc64obsd_frame_cache): Likewise.
2011-06-27 16:36:00 +00:00
Tristan Gingold b315ab2151 2011-06-27 Tristan Gingold <gingold@adacore.com>
* dwarf2read.c (struct dwarf2_section_info): Replace was_mmapped
	field by map_addr and map_len.
	(dwarf2_read_section): Adjust for the new bfd_mmap api.
	(munmap_section_buffer): Likewise.
2011-06-27 08:41:39 +00:00
gdbadmin bd82534596 *** empty log message *** 2011-06-27 00:00:33 +00:00
gdbadmin b91ffaa0ac *** empty log message *** 2011-06-26 00:00:33 +00:00
gdbadmin 44eb0d7fc2 *** empty log message *** 2011-06-25 00:00:02 +00:00
Tom Tromey ddd49eeec4 * varobj.c (update_dynamic_varobj_children): Make 'name' const.
* symtab.h (lookup_struct, lookup_union, lookup_enum): Update.
	* python/python.c (gdbpy_parameter): Make 'arg' const.
	(execute_gdb_command): Likewise.
	(gdbpy_decode_line): Likewise.  Copy it.
	(gdbpy_parse_and_eval): Make 'expr_string' const.  Copy it.
	(gdbpy_write): Make 'arg' const.
	* python/py-type.c (typy_lookup_typename): Make 'type_name'
	const.
	(gdbpy_lookup_type): Likewise.
	* python/py-prettyprint.c (print_children): Make 'name' const.
	* python/py-param.c (parmpy_init): Make 'name' const.  Copy it.
	* python/py-inferior.c (infpy_write_memory): Make 'buf_len' a
	Py_ssize_t.
	* python/py-function.c (fnpy_init): Make 'name' const.
	* python/py-cmd.c (cmdpy_init): Make 'name' const.  Copy it.
	(gdbpy_string_to_argv): Make 'input' const.
	* python/py-breakpoint.c (bppy_init): Make 'spec' const.  Copy
	it.
	* gdbtypes.h (lookup_typename): Update.
	* gdbtypes.c (lookup_typename): Make 'name' const.
	(lookup_struct): Likewise.
	(lookup_union): Likewise.
	(lookup_enum): Likewise.
2011-06-24 19:47:37 +00:00
Tom Tromey 5998129b54 * Makefile.in (HFILES_NO_SRCDIR): Add "common/" to
gdb_thread_db.h.  Move all common/ entries to be together.
	(TAGS): Don't depend on DEPFILES.
2011-06-24 19:29:49 +00:00
gdbadmin 756e0a9f0c *** empty log message *** 2011-06-24 00:00:03 +00:00
Yao Qi 6e586cc565 2011-06-23 Yao Qi <yao@codesourcery.com>
* infrun.c (start_remote): Move call init_wait_for_inferior to ...
	* remote.c (remote_start_remote): ... here.
	* monitor.c (monitor_open): ... here.
2011-06-23 15:08:01 +00:00
Yao Qi ab5c6a729c 2011-06-23 Yao Qi <yao@codesourcery.com>
* gdb.cp/mb-inline.exp: Parse the output of `info break' to check breakpoint
	1.2 is disabled.  KFAIL for uclinux.
2011-06-23 14:38:13 +00:00
Andrew Burgess 86c3c1fccc http://sourceware.org/ml/gdb-patches/2011-06/msg00136.html
2011-06-23  Andrew Burgess  <aburgess@broadcom.com>

	* gdbtypes.c (append_composite_type_field_aligned): Fix
	calculation of bit position based on alignment.
2011-06-23 09:51:57 +00:00
Marek Polacek 9497469fbd Fix races in mi2-var-display.exp. 2011-06-23 09:51:11 +00:00
Marek Polacek 5d197ed097 Fix races in mi2-return.exp. 2011-06-23 09:45:24 +00:00
Marek Polacek b9132588e0 Fix races in mi2-console.exp. 2011-06-23 09:40:50 +00:00
Marek Polacek e55595cad5 Fix races in mi2-basics.exp. 2011-06-23 09:38:14 +00:00
Yao Qi be777e08f4 gdb/testsuite/
* gdb.base/moribund-step.exp: Skip test if displaced stepping is not
	supported.
	* lib/gdb.exp (support_displaced_stepping): New.
2011-06-23 07:46:13 +00:00
Yao Qi 615556d61e 2011-06-23 Yao Qi <yao@codesourcery.com>
* gdb.threads/execl.exp: Skip on remote target.
2011-06-23 06:26:28 +00:00
gdbadmin 1c23ac0060 *** empty log message *** 2011-06-23 00:00:32 +00:00
Pedro Alves 28010a5d42 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.c (bpstat_stop_status): Call the check_status
	breakpoint_ops method.
	(print_one_breakpoint_location): Also print the condition for Ada
	exception catchpoints.
	(allocate_bp_location): New, factored out from
	allocate_bp_location.
	(allocate_bp_location): Adjust.  Call the owner breakpoint's
	allocate_location method, if there is one.
	(free_bp_location): Call the locations's dtor method, if there is
	one.
	(init_raw_breakpoint_without_location): New breakpoint_ops
	parameter.  Use it.
	(set_raw_breakpoint_without_location): Adjust.
	(init_raw_breakpoint): New breakpoint_ops parameter.  Pass it down.
	(set_raw_breakpoint): Adjust.
	(catch_fork_breakpoint_ops, catch_vfork_breakpoint_ops)
	(catch_syscall_breakpoint_ops): Install NULL allocate_location,
	re_set and check_status methods.
	(init_catchpoint): Don't memset, initialize thread, addr_string
	and enable_state.  Pass the ops down to init_raw_breakpoint.
	(install_catchpoint): Rename to ...
	(install_breakpoint): ... this, and make extern.
	(create_fork_vfork_event_catchpoint): Adjust.
	(catch_exec_breakpoint_ops): Install NULL allocate_location,
	re_set and check_status methods.
	(create_syscall_event_catchpoint): Adjust.
	(ranged_breakpoint_ops, watchpoint_breakpoint_ops)
	(masked_watchpoint_breakpoint_ops): Install NULL
	allocate_location, re_set and check_status methods.
	(catch_exec_command_1): Adjust.
	(gnu_v3_exception_catchpoint_ops): Install NULL allocate_location,
	re_set and check_status methods.
	(create_ada_exception_breakpoint): Rename to ...
	(init_ada_exception_breakpoint): ... this.  Add a struct
	breakpoint parameter, and delete the exp_string, cond_string and
	cond parameters.  Use init_raw_breakpoint, and don't install or
	mention the breakpoint yet.  Don't clear breakpoint fields that
	init_raw_breakpoint already clears.
	(re_set_breakpoint): Delete, split into ...
	(breakpoint_re_set_default, prepare_re_set_context): ... these new
	functions.
	(breakpoint_re_set_one): Call the breakpoint's
	breakpoint_ops->re_set implementation, if there's one.  Adjust.
	* breakpoint.h: Forward declare struct bpstats and struct bp_location.
	(struct bp_location_ops): New type.
	(struct bp_location): New field `ops'.
	(struct breakpoint_ops): New `allocate_location', `re_set' and
	`check_status' fields.  Make `breakpoint_hit''s description match
	reality.
	(init_bp_location): Declare.
	(breakpoint_re_set_default): Declare.
	(create_ada_exception_breakpoint): Rename to ...
	(init_ada_exception_breakpoint): ... this.  Add a struct
	breakpoint parameter, and delete the exp_string, cond_string and
	cond parameters.
	(install_breakpoint): Declare.
	* ada-lang.c: Include exceptions.h.
	<Ada exceptions description>: Update.
	(struct ada_catchpoint_location): New type.
	(ada_catchpoint_location_dtor): New function.
	(ada_catchpoint_location_ops): New global.
	(ada_catchpoint): New type.
	(create_excep_cond_exprs): New function.
	(dtor_exception, allocate_location_exception, re_set_exception)
	(should_stop_exception, check_status_exception): New functions.
	(print_one_exception, print_mention_exception)
	(print_recreate_exception): Adjust.
	(dtor_catch_exception, allocate_location_catch_exception)
	(re_set_catch_exception, check_status_catch_exception): New
	functions.
	(catch_exception_breakpoint_ops): Install them.
	(dtor_catch_exception_unhandled)
	(allocate_location_catch_exception_unhandled)
	(re_set_catch_exception_unhandled)
	(check_status_catch_exception_unhandled): New functions.
	(catch_exception_unhandled_breakpoint_ops): Install them.
	(dtor_catch_assert, allocate_location_catch_assert)
	(re_set_catch_assert, check_status_catch_assert): New functions.
	(catch_assert_breakpoint_ops): Install them.
	(ada_exception_catchpoint_p): Delete.
	(catch_ada_exception_command_split)
	(ada_exception_catchpoint_cond_string): Rename exp_string
	parameter to excep_string.  Adjust.
	(ada_parse_catchpoint_condition): Delete.
	(ada_exception_sal): Rename the exp_string parameter to
	excep_string.  Delete the cond_string and cond parameters.
	Adjust.
	(ada_decode_exception_location): Rename the exp_string parameter
	to excep_string.  Delete the cond_string and cond parameters.
	Adjust.
	(create_ada_exception_catchpoint): New function.
	(catch_ada_exception_command, ada_decode_assert_location)
	(catch_assert_command): Adjust.
	* ada-lang.h (ada_exception_catchpoint_p): Delete declaration.
2011-06-22 17:53:44 +00:00
Pedro Alves 9ac4176b6d 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* ada-lang.c: Include arch-utils.h.
	(ada_decode_exception_location): Make static.
	(catch_ada_exception_command): Moved here from breakpoint.c.
	(ada_decode_assert_location): Make static.
	(catch_assert_command): Moved here from breakpoint.c.
	(_initialize_ada_lang): Install the exception and assert
	catchpoint commands here.
	* ada-lang.h (ada_decode_exception_location)
	(ada_decode_assert_location): Delete declarations.
	* breakpoint.c (CATCH_PERMANENT, CATCH_TEMPORARY): Moved to
	breakpoint.h.
	(create_ada_exception_breakpoint): Make extern.
	(catch_ada_exception_command, catch_assert_command): Moved to
	ada-lang.c.
	(add_catch_command): Make extern.
	(_initilize_breakpoint): Don't install the exception and assert
	catchpoint commands here.
	* breakpoint.h (CATCH_PERMANENT, CATCH_TEMPORARY): Moved from
	breakpoint.c
	(add_catch_command, create_ada_exception_breakpoint): Declare.
2011-06-22 17:52:37 +00:00
Pedro Alves c56053d23c 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.c (init_raw_breakpoint_without_location): Don't add
	the breakpoint to the breakpoint chain here.
	(set_raw_breakpoint_without_location): Add the breakpoint to the
	breakpoint chain here.
	(init_raw_breakpoint): Adjust comments.
	(set_raw_breakpoint): Add the breakpoint to the breakpoint chain
	here.
	(init_catchpoint): Don't set the catchpoint's breakpoint number
	here.
	(install_catchpoint): New function.
	(create_fork_vfork_event_catchpoint)
	(create_syscall_event_catchpoint, catch_exec_command_1): Adjust to
	use install_catchpoint.
2011-06-22 17:16:42 +00:00
Pedro Alves d2f3fc74b7 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.c (create_catchpoint_without_mention)
	(create_catchpoint): Delete.
2011-06-22 17:16:00 +00:00
Pedro Alves b4d900402c 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.h (struct breakpoint): Delete field `exec_pathname'.
	* breakpoint.c (init_raw_breakpoint_without_location): Remove
	reference to exec_pathname.
	(struct exec_catchpoint): New type.
	(dtor_catch_exec): New function.
	(insert_catch_exec, print_it_catch_exec, print_one_catch_exec): Adjust.
	(catch_exec_breakpoint_ops): Install dtor_catch_syscall.
	(catch_exec_command_1): Adjust to use init_catchpoint.
	(delete_breakpoint): Remove reference to exec_pathname.
2011-06-22 17:15:06 +00:00
Pedro Alves be5c67c19c 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.h (struct breakpoint_ops): New field `dtor'.
	(struct breakpoint): Delete field `syscalls_to_be_caught'.
	* breakpoint.c (init_raw_breakpoint_without_location): Remove
	reference to syscalls_to_be_caught.
	(catch_fork_breakpoint_ops, catch_vfork_breakpoint_ops): Install a
	NULL `dtor'.
	(struct syscall_catchpoint): New type.
	(dtor_catch_syscall): New function.
	(insert_catch_syscall, remove_catch_syscall)
	(breakpoint_hit_catch_syscall, print_one_catch_syscall)
	(print_recreate_catch_syscall): Adjust.
	(catch_syscall_breakpoint_ops): Install dtor_catch_syscall.
	(catch_exec_breakpoint_ops): Install a NULL `dtor'.
	(create_syscall_event_catchpoint): Adjust to use init_catchpoint.
	(ranged_breakpoint_ops, watchpoint_breakpoint_ops)
	(masked_watchpoint_breakpoint_ops)
	(gnu_v3_exception_catchpoint_ops): Install a NULL `dtor'.
	(delete_breakpoint): Call the `dtor' breakpoint_ops method, if
	there is one.  Remove references to syscalls_to_be_caught.
	(catching_syscall_number): Adjust.
	* ada-lang.c (catch_exception_breakpoint_ops)
	(catch_exception_unhandled_breakpoint_ops)
	(catch_assert_breakpoint_ops): Install a NULL `dtor'.
2011-06-22 17:14:29 +00:00
Pedro Alves e29a4733b9 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.h (struct breakpoint): Delete forked_inferior_pid
	field.
	* breakpoint.c (init_raw_breakpoint_without_location): Remove
	reference to forked_inferior_pid.
	(struct fork_catchpoint): New type.
	(breakpoint_hit_catch_fork, print_it_catch_fork)
	(print_one_catch_fork, breakpoint_hit_catch_vfork)
	(print_it_catch_vfork, print_one_catch_vfork): Adjust.
	(create_fork_vfork_event_catchpoint): Adjust to use
	init_catchpoint.
2011-06-22 17:12:32 +00:00
Pedro Alves 346774a91f 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.c (add_to_breakpoint_chain)
	(init_raw_breakpoint_without_location): New functions, factored
	out from ...
	(set_raw_breakpoint_without_location): ... this one.
	(init_raw_breakpoint): New function, factored out from
	set_raw_breakpoint and adjusted to use
	init_raw_breakpoint_without_location.
	(set_raw_breakpoint): Adjust.
	(init_catchpoint): New function, factored out from
	create_catchpoint_without_mention and adjusted to use
	init_raw_breakpoint.
	(create_catchpoint_without_mention): Adjust.
2011-06-22 17:11:30 +00:00
Marek Polacek 833b0ca776 Fix races in gdb.mi/mi-var-display.exp. 2011-06-22 16:12:46 +00:00
Marek Polacek 1ee4023ae3 Fix races in gdb.mi/mi-nsitrall.exp. 2011-06-22 15:41:47 +00:00
Marek Polacek d0b1d6240c Fix races in gdb.mi/mi-nsmoribund.exp. 2011-06-22 15:38:00 +00:00
Marek Polacek 79aa92c124 Fix races in gdb.mi/mi-return.exp. 2011-06-22 15:32:16 +00:00
Tom Tromey c38c4bc5b2 * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_convert>: Treat type
argument of 0 specially.
2011-06-22 13:38:21 +00:00
Yao Qi b138ce370d gdb/
* infrun.c (handle_inferior_event): Remove write-only local variable
	`sw_single_step_trap_p'.
2011-06-22 10:09:22 +00:00
gdbadmin 8eebce8e67 *** empty log message *** 2011-06-22 00:00:33 +00:00
gdbadmin 06f68d32f6 *** empty log message *** 2011-06-21 00:00:03 +00:00
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
gdbadmin 598f424ddf *** empty log message *** 2011-06-02 00:00:03 +00:00
Yao Qi dbc0f13167 2011-06-01 Yao Qi <yao@codesourcery.com>
* gdb.base/ending-run.exp: Match __uClibc_main for uClibc.
2011-06-01 15:55:55 +00:00
Mike Frysinger f4b8c29b8a gdb: sim: automatically pass down sysroot
Since gdb sets up a nice sysroot path for us by default, automatically
pass it down to the sim target so it too gets a good default.  This does
not override anything the user explicitly specifies of course.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-01 15:29:07 +00:00
Yao Qi 1706c19944 2011-06-01 Yao Qi <yao@codesourcery.com>
* objfiles.h (obj_section_addr): Update reference to objfile from
	`abfd' to `obfd'.
	(obj_section_endaddr): Likewise.
2011-06-01 14:46:23 +00:00
Daniel Jacobowitz d19cd71304 Really correct email address. 2011-06-01 11:09:15 +00:00
Daniel Jacobowitz 8d07004de6 * MAINTAINERS: Update my email address and affiliation. Also
update Ian Lance Taylor's affiliation.  Use UTF-8 for ludo@gnu.org.
2011-06-01 11:03:58 +00:00
gdbadmin 8dbe69d249 *** empty log message *** 2011-06-01 00:00:03 +00:00
Keith Seitz fd336a18df PR c++/12750
* gdb.cp/static-method.cc: New file.
	* gdb.cp/static-method.exp: New file.
2011-05-31 22:14:21 +00:00
Keith Seitz e8eb7bc534 PR c++/12750
* linespec.c (get_search_block): New function.
	(find_methods): Add FILE_SYMTATB parameter and use it and
	get_search_block to pass an appropriate block to
	lookup_symbol_in_namespace.
	(decode_line_1): Record if *ARGPTR is single-quote enclosed.
	Check if *ARGPTR starts with a filename first.
	If it does, call locate_first_half again to locate the next
	"first half" of the linespec.
	Pass FILE_SYMTATB to decode_objc and decode_compound.
	Swallow the trailing single-quote if IS_SQUOTE_ENCLOSED.
	(locate_first_half): Stop on the first colon seen.
	(decode_compound): Add FILE_SYMTAB parameter.
	Pass FILE_SYMTAB to lookup_prefix_sym and find_method.
	(lookup_prefix_sym): Add FILE_SYMTAB parameter and use
	get_search_block with lookup_symbol.
	(find_method): Add FILE_SYMTAB parameter and pass it to
	find_methods.
	(decode_objc): Use get_search_block.
2011-05-31 22:13:51 +00:00
Keith Seitz fa8b9902af PR symtab/12704
* gdb.cp/anon-ns.cc: New file.
	* gdb.cp/anon-ns.exp: New file.
2011-05-31 21:54:49 +00:00
Keith Seitz 2b1dbab03d PR symtab/12704
* cp-namespace.c (ANONYMOUS_NAMESPACE_LEN): Remove.
	(cp_scan_for_anonymous_namespaces): Use CP_ANONYMOUS_NAMESPACE_STR
	and CP_ANONYMOUS_NAMESPACE_LEN.
	(cp_is_anonymous): Likewise.
	* cp-support.h (CP_ANONYMOUS_NAMESPACE_STR): Define.
	(CP_ANONYMOUS_NAMESPACE_LEN): Define.
	* dwarf2read.c (namespace_name): Likewise.
	(fixup_partial_die): Likewise.
	* linespec.c (decode_compound): If CP_ANONYMOUS_NAMESPACE_STR is
	seen in the input, keep it.
2011-05-31 21:54:07 +00:00
Pedro Alves 0a5b1e09bf 2011-05-31 Pedro Alves <pedro@codesourcery.com>
gdb/gdbserver/
	* linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
	assertion.
	* win32-i386-low.c (i386_dr_low_get_addr): Ditto.

	gdb/testsuite/
	* gdb.arch/i386-dr3-watch.c: New file.
	* gdb.arch/i386-dr3-watch.exp: New file.
2011-05-31 21:18:56 +00:00
gdbadmin 9ad61fd62f *** empty log message *** 2011-05-31 00:00:32 +00:00
Pedro Alves 6d549500db 2011-05-30 Pedro Alves <pedro@codesourcery.com>
gdb/
	* target.h (enum inferior_event_type): Delete INF_QUIT_REQ.
	* inf-loop.h (inferior_event_handler_wrapper): Delete.
	* inf-loop.c (inferior_event_handler_wrapper): Delete.
	(inferior_event_handler): Don't handle INF_QUIT_REQ.
	* remote.c (_initialize_remote): Register
	async_remote_interrupt_twice directly as
	sigint_remote_twice_token event.
2011-05-30 21:16:35 +00:00
Pedro Alves 395bff701e 2011-05-30 Pedro Alves <pedro@codesourcery.com>
gdb/
	* target.h (enum inferior_event_type): Delete INF_ERROR.
	* inf-loop.c (inferior_event_handler): Don't handle INF_ERROR.
2011-05-30 20:54:24 +00:00
Pedro Alves 9722416428 2011-05-30 Pedro Alves <pedro@codesourcery.com>
gdb/
	* interps.c (interp_set): Don't cancel continuations.
2011-05-30 20:13:29 +00:00
Jan Kratochvil 07e78767d6 gdb/
* linux-nat.c (linux_lwp_is_zombie): Use xsnprintf.
2011-05-30 19:26:36 +00:00
Pedro Alves fa4cd53f7d 2011-05-30 Pedro Alves <pedro@codesourcery.com>
gdb/
	* continuations.h (continuation_ftype): Add `err' parameter.
	Document parameters.
	(do_all_continuations, do_all_continuations_thread)
	(do_all_intermediate_continuations)
	(do_all_intermediate_continuations_thread)
	(do_all_inferior_continuations): Add `err' parameter.
	* continuations.c (do_my_continuations_1, do_my_continuations)
	(do_all_inferior_continuations, do_all_continuations_ptid)
	(do_all_continuations_thread_callback)
	(do_all_continuations_thread, do_all_continuations)
	(do_all_intermediate_continuations_thread_callback)
	(do_all_intermediate_continuations_thread)
	(do_all_intermediate_continuations): Add `err' parameter, and pass
	it down all the way to the continuations proper.
	* inf-loop.c (inferior_event_handler): If fetching an inferior
	event throws an error, don't pop the target, and still call the
	continuations, but with `err' set.  Adjust all other continuation
	calls.
	* breakpoint.c (until_break_command_continuation): Add `err'
	parameter.
	* infcmd.c (step_1_continuation): Add `err' parameter.  Don't
	issue another step if `err' is set.
	(struct until_next_continuation_args): New.
	(until_next_continuation): Add `err' parameter.  Adjust.
	(until_next_command): Adjust.
	(struct finish_command_continuation_args): Add `thread' field.
	(finish_command_continuation): Add `err' parameter.  Handle it.
	(finish_forward): Adjust.
	(attach_command_continuation): Add `err' parameter.  Handle it.
	* infrun.c (infrun_thread_stop_requested_callback): Adjust to
	cancel the continuations.
	* interps.c (interp_set): Adjust to cancel the continuations.
	* thread.c (clear_thread_inferior_resources): Adjust to cancel the
	continuations rather than discarding.
	(free_thread): Don't clear thread inferior resources here.
	(delete_thread_1): Do it here instead.  And do it before removing
	the thread from the threads list.  Tag the thread as exited before
	clearing thread inferior resources.
2011-05-30 18:04:32 +00:00
Joel Brobecker c2949be03b Rephrase error message in infcall.c:call_function_by_hand
No real change besides the error message.

gdb/ChangeLog:

	* infcall.c (call_function_by_hand): Rephrase error message.
2011-05-30 16:08:28 +00:00
Yao Qi 0578b8d157 2011-05-30 Yao Qi <yao@codesourcery.com>
* gdb.base/callfuncs.c (t_structs_fc): New.
	(t_structs_dc, t_structs_ldc): New.
	(t_double_many_args):
	(DEF_FUNC_MANY_ARGS_1, DEF_FUNC_MANY_ARGS_2): Define.
	(DEF_FUNC_MANY_ARGS_3, DEF_FUNC_VALUES_1): Define.
	(DEF_FUNC_VALUES_2, DEF_FUNC_VALUES_3): Define.
	* gdb.base/callfuncs.exp: Call new functions.
2011-05-30 02:51:58 +00:00
Yao Qi ff4d2c6018 2011-05-30 Yao Qi <yao@codesourcery.com>
* gdb.base/callfuncs.exp (rerun_and_prepare): New.
	Call rerun_and_prepare for each test to isolate effects.
2011-05-30 02:32:21 +00:00
Yao Qi 6680506ef0 2011-05-30 Yao Qi <yao@codesourcery.com>
* gdb.base/varargs.c (find_max_float_real): New.
        (find_max_double_real, find_max_long_double_real): New.
        * gdb.base/varargs.exp: Call these new added functions.
	* lib/gdb.exp (setup_kfail_for_target): New.
2011-05-30 02:27:51 +00:00
Yao Qi e43ec454f9 2011-05-30 Yao Qi <yao@codesourcery.com>
* gdb.base/funcargs.c (callca, callcb, callcc): New.
	(callcd, callce, callcf, callc1a, callc1b): New.
	(callc2a, callc2b): New.
	* gdb.base/funcargs.exp (complex_args): New.
	(complex_integral_args, complex_float_integral_args): New.
	* lib/gdb.exp (support_complex_tests): New.  Determine
	whether to run test cases on _Complex types.
2011-05-30 02:20:16 +00:00
gdbadmin a773502202 *** empty log message *** 2011-05-30 00:00:03 +00:00
gdbadmin b3c88224d5 *** empty log message *** 2011-05-29 00:00:32 +00:00
gdbadmin 597a1b9a54 *** empty log message *** 2011-05-28 00:00:32 +00:00
Pedro Alves 619cebe87f 2011-05-27 Pedro Alves <pedro@codesourcery.com>
gdb/
	* defs.h (struct thread_info, struct inferior): Delete forward
	declarations.
	* breakpoint.h (struct thread_info): New forward declaration.
	* observer.sh (struct inferior): New forward declaration.
	* python/python-internal.h (struct inferior): New forward
	declaration.
2011-05-27 18:39:49 +00:00
Pedro Alves be34f8494e 2011-05-27 Pedro Alves <pedro@codesourcery.com>
* defs.h (struct continuation, continuation_ftype)
	(continuation_free_arg_ftype, add_continuation)
	(do_all_continuations, do_all_continuations_thread)
	(discard_all_continuations, discard_all_continuations_thread)
	(add_intermediate_continuation, do_all_intermediate_continuations)
	(do_all_intermediate_continuations_thread)
	(discard_all_intermediate_continuations)
	(discard_all_intermediate_continuations_thread)
	(add_inferior_continuation, do_all_inferior_continuations)
	(discard_all_inferior_continuations): Move to ...
	* continuations.h: ... this new file.
	* breakpoint.c, continuations.c, event-top.c, inf-loop.c,
	infcmd.c, inferior.c, infrun.c, interps.c: Include
	continuations.h.
2011-05-27 18:28:18 +00:00
Jan Kratochvil 432b4d03ad gdb/
Fix PR 10970, PR 12702.
	* linux-nat.c (linux_lwp_is_zombie): New function.
	(wait_lwp): Initialize status.  New variable prev_mask.  Block signals.
	Check for linux_lwp_is_zombie.  Use WNOHANG and sigsuspend.

gdb/testsuite/
	* gdb.threads/leader-exit.c: New file.
	* gdb.threads/leader-exit.exp: New file.
2011-05-27 16:55:39 +00:00
Pedro Alves b0f260d61e 2011-05-27 Pedro Alves <pedro@codesourcery.com>
gdb/
	* defs.h (continuation_ftype, continuation_free_arg_ftype): New
	typedefs.
	(add_continuation, add_intermediate_continuation)
	(add_inferior_continuation): Use them.
	* continuations.c (struct continuation): Use them.
	(make_continuation_ftype): Delete.
	(make_continuation, add_inferior_continuation, add_continuation)
	(add_intermediate_continuation): Use continuation_ftype and
	continuation_free_arg_ftype.  Rename parameters to shorter names.
2011-05-27 14:56:14 +00:00
Pedro Alves af1e9a32aa 2011-05-27 Pedro Alves <pedro@codesourcery.com>
gdb/
	* continuations.c (make_continuation): Make it return void.
	(do_my_continuations): Rename to ...
	(do_my_continuations_1): ... this.  Remove old_chain parameter and
	adjust.
	(do_my_continuations): New.
	(discard_my_continuations): Rename to ...
	(discard_my_continuations_1): ... this.  Remove old_chain
	parameter and adjust.
	(discard_my_continuations): New.
	(add_inferior_continuation): Simplify.
	(do_all_inferior_continuations): Reimplement on top
	do_my_continuations.
	(discard_all_inferior_continuations): Simplify.
	(add_continuation): Simplify.
	(do_all_continuations_ptid): Simplify.
	(discard_all_continuations_thread_callback): Simplify.
	(add_intermediate_continuation): Simplify.
	(discard_all_intermediate_continuations_thread_callback):
	Simplify.
2011-05-27 14:32:08 +00:00
Marek Polacek 6caf069d24 gdb.mi/mi-nonstop.exp: Replace gdb_test_multiple with mi_gdb_test. 2011-05-27 14:16:43 +00:00
Pedro Alves 50c0c01734 2011-05-27 Pedro Alves <pedro@codesourcery.com>
gdb/
	* utils.c (struct continuation, add_continuation)
	(add_inferior_continuation)
	(do_all_inferior_continuations, discard_all_inferior_continuations)
	(restore_thread_cleanup, do_all_continuations_ptid)
	(do_all_continuations_thread_callback)
	(do_all_continuations_thread, do_all_continuations)
	(discard_all_continuations_thread_callback)
	(discard_all_continuations_thread, discard_all_continuations)
	(add_intermediate_continuation)
	(do_all_intermediate_continuations_thread_callback)
	(do_all_intermediate_continuations_thread)
	(do_all_intermediate_continuations)
	(discard_all_intermediate_continuations_thread_callback)
	(discard_all_intermediate_continuations_thread)
	(discard_all_intermediate_continuations): Move to ...
	* continuations.c: ... this new file, and adjust to no longer
	implement continuations on top of cleanups.
	* Makefile.in (SFILES): Add continuations.c.
	(COMMON_OBS): Add continuations.o.
2011-05-27 14:00:25 +00:00
Marek Polacek 97fce28b40 gdb.mi: Get rid of the non-stop testcases. 2011-05-27 12:47:10 +00:00
gdbadmin cc67cf82dc *** empty log message *** 2011-05-27 00:00:33 +00:00
Pedro Alves d8b344530c 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* inferior.h (enum exec_direction_kind): Delete EXEC_ERROR.
	* infrun.c (show_exec_direction_func): Don't handle EXEC_ERROR.
	Internal error on invalid values.
	* reverse.c: Don't handle EXEC_ERROR.
	* mi/mi-main.c: Don't handle EXEC_ERROR.
2011-05-26 18:23:32 +00:00
Pedro Alves 3223143295 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* record.c: Include event-loop.h, inf-loop.h.
	(record_beneath_to_async): New global.
	(tmp_to_async): New global.
	(record_async_inferior_event_token): New global.
	(record_open_1): Don't error out if async is enabled.
	(record_open): Handle to_async.  Create an async event source in
	the event loop.
	(record_close): Delete the async event source.
	(record_resumed): New global.
	(record_execution_dir): New global.
	(record_resume, record_core_resume): Set them.  Register the
	target on the event loop.
	(record_wait): Rename to ...
	(record_wait_1): ... this.  Add more debug output.  Handle
	TARGET_WNOHANG, and the target beneath returning
	TARGET_WAITKIND_IGNORE.
	(record_wait): Reimplement on top of record_wait_1.
	(record_async_mask_value): New global.
	(record_async, record_async_mask, record_can_async_p)
	(record_is_async_p, record_execution_direction): New functions.
	(init_record_ops, init_record_core_ops): Install new methods.
	* infrun.c (fetch_inferior_event): Temporarily switch the global
	execution direction to the direction the target was going.
	(execution_direction): Change type to int.
	* target.c (default_execution_direction): New function.
	(update_current_target): Inherit and de_fault
	to_execution_direction.
	* target.h (struct target_ops) <to_execution_direction>: New
	field.
	(target_execution_direction): New macro.
	* inferior.h (execution_direction): Change type to int.
2011-05-26 18:11:33 +00:00
Pedro Alves 949dc678a8 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcall.c (call_function_by_hand): Don't allow calling functions
	in reverse execution mode.
2011-05-26 16:23:08 +00:00
Pedro Alves c13bd2b52e 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcmd.c (finish_command): Allow async finish in reverse.
2011-05-26 16:11:45 +00:00
Yao Qi 6938fd346a 2011-05-26 Yao Qi <yao@codesourcery.com>
gdb/
	* gdb_thread_db.h: Delete.  Move to ...
	* common/gdb_thread_db.h: ... here.

	gdb/gdbserver/
	* Makefile.in (thread-db.o): Track dependence to
	common/gdb_thread_db.h.
	* thread-db.c: include gdb_thread_db.h from right place.
2011-05-26 15:49:26 +00:00
Pedro Alves 9da8c2a0fa 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcmd.c (finish_backward): Set a step-resume breakpoint at the
	function's entry point instead of a manually managed momentary
	breakpoint, and only ever issue one proceed call.
	* infrun.c (handle_inferior_event) <BPSTAT_WHAT_STEP_RESUME>: If
	doing a reverse-finish, switch to stepi mode, to do another step.
	(insert_step_resume_breakpoint_at_sal): Make public.
	(normal_stop): No need to save function value return registers if
	going reverse.
	* inferior.h (insert_step_resume_breakpoint_at_sal): Declare.

	gdb/testsuite/
	* gdb.reverse/finish-reverse-bkpt.exp: New test.
2011-05-26 15:32:38 +00:00
Pedro Alves 2c03e5bed3 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* breakpoint.h (enum bptype) <bp_hp_step_resume>: New.
	(enum bpstat_what_main_action): Move BPSTAT_WHAT_STEP_RESUME
	before BPSTAT_WHAT_STOP_SILENT.  Add BPSTAT_WHAT_HP_STEP_RESUME
	at the end.
	* breakpoint.c (update_breakpoints_after_exec): Also delete hp
	step-resume breakpoints.
	(print_it_typical): Handle bp_hp_step_resume.
	(bpstat_what): Ditto.
	(bptype_string): Ditto.
	(print_one_breakpoint_location): Ditto.
	(allocate_bp_location): Ditto.
	(mention): Ditto.
	(breakpoint_re_set_one): Ditto.
	* infrun.c (handle_inferior_event): Adjust.  Split
	BPSTAT_WHAT_STEP_RESUME handling in BPSTAT_WHAT_STEP_RESUME and
	BPSTAT_WHAT_HP_STEP_RESUME.
	(insert_step_resume_breakpoint_at_sal): Rename to ...
	(insert_step_resume_breakpoint_at_sal_1): ... this.  Add bptype
	parameter.  Handle it.
	(insert_step_resume_breakpoint_at_sal): Reimplement on top of
	insert_step_resume_breakpoint_at_sal_1.
	(insert_step_resume_breakpoint_at_frame): Rename to ...
	(insert_hp_step_resume_breakpoint_at_frame): ... this.  Adjust to
	set a high-priority step-resume breakpoint.
	(insert_step_resume_breakpoint_at_frame): Adjust comment.
	(insert_step_resume_breakpoint_at_caller): Ditto.

	gdb/testsuite/
	* gdb.reverse/next-reverse-bkpt-over-sr.exp: New test.
2011-05-26 14:59:18 +00:00
Pedro Alves 51be5b68a5 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* breakpoint.c (iterate_over_related_breakpoints): New.
	(do_map_delete_breakpoint): New.
	(delete_command): Pass do_map_delete_breakpoint to
	map_breakpoint_numbers.
	(do_disable_breakpoint): New.
	(do_map_disable_breakpoint): Iterate over the breakpoint's related
	breakpoints.
	(do_enable_breakpoint): Rename to ...
	(enable_breakpoint_disp): ... this.
	(enable_breakpoint): Adjust.
	(do_enable_breakpoint): New.
	(enable_once_breakpoint): Delete.
	(do_map_enable_breakpoint): New.
	(do_map_enable_once_breakpoint): New.
	(enable_once_command, enable_delete_command)
	(delete_trace_command): Iterate over the breakpoint's related
	breakpoints.
2011-05-26 14:21:24 +00:00
Pedro Alves 4a1be8d214 * alpha-tdep.c (alpha_cannot_fetch_register): Don't return true
for ALPHA_ZERO_REGNUM.
	(alpha_supply_int_regs): Explicitly supply zero as the value for
	ALPHA_ZERO_REGNUM in the register cache.
	* alpha-nat.c (fetch_osf_core_registers): Ditto.
2011-05-26 13:57:46 +00:00
Yao Qi 59d70315fb 2011-05-26 Yao Qi <yao@codesourcery.com>
* gdb/gdb_thread_db.h: Remove HAVE_UINTPTR_T.
2011-05-26 08:09:25 +00:00
Tristan Gingold 251d32d96e 2011-05-26 Tristan Gingold <gingold@adacore.com>
* symfile.h (struct dwarf2_section_names): New type.
	(struct dwarf2_debug_sections): New type.
	(dwarf2_has_info): Add parameter.
	* dwarf2read.c (dwarf2_elf_names): New variable.
	(INFO_SECTION, ABBREV_SECTION, LINE_SECTION, LOC_SECTION)
	(MACINFO_SECTION, STR_SECTION, RANGES_SECTION, TYPES_SECTION)
	(FRAME_SECTION, EH_FRAME_SECTION, GDB_INDEX_SECTION): Remove.
	(dwarf2_has_info): Add names parameter.  Pass names
	to dwarf2_locate_sections.
	(section_is_p): Rewrite using the names parameter.
	(dwarf2_locate_sections): Use section names from the names parameter.
	* coffread.c (coff_symfile_read): Adjust call to dwarf2_has_info.
	* elfread.c (read_psyms): Ditto.
	* machoread.c (macho_symfile_read): Ditto.
2011-05-26 07:47:10 +00:00
gdbadmin 39f8b7c1fa *** empty log message *** 2011-05-26 00:00:32 +00:00
Andreas Schwab 652c71b432 PR gdb/8677
* event-loop.c (handle_file_event): Don't handle POLLHUP as error.
2011-05-25 07:59:04 +00:00
gdbadmin 012ca7c8a8 *** empty log message *** 2011-05-25 00:00:33 +00:00
Keith Seitz 2e21250dbc PR breakpoint/12803
* gdb.cp/cmpd-minsyms.cc (a): New method.
	(b): New method.
	(c): New method.
	* gdb.cp/cmpd-minsyms.exp: Add tests for new methods.
2011-05-24 21:00:45 +00:00
Keith Seitz f17170e5e2 PR breakpoint/12803
* linespec.c (keep_name_info): Add handling for "volatile" keyword.
	(decode_compound): Unconditionally call	keep_name_info.
2011-05-24 21:00:09 +00:00
Pedro Alves cdac0397bf 2011-05-24 Pedro Alves <pedro@codesourcery.com>
gdb/
	* breakpoint.c (watchpoint_check): If the watchpoint went out of
	scope, clear its command list.
	(map_breakpoint_numbers): Don't walk the related breakpoints list
	of each breakpoint.

	gdb/testsuite/
	* gdb.base/commands.exp (watchpoint_command_test): Check that the
	watchpoint's command list didn't execute when the watchpoint went
	out of scope.
2011-05-24 15:03:30 +00:00
Tom Tromey 91d4fe3f85 * MAINTAINERS: Move Jim Blandy to past maintainers. 2011-05-24 14:52:30 +00:00
Tristan Gingold 3017a00367 2011-05-24 Tristan Gingold <gingold@adacore.com>
* symfile.h (enum dwarf2_section_enum): New type.
	(dwarf2_get_section_info): New prototype.
	* dwarf2read.c (dwarf2_get_section_info): Replace parameter
	section_name by sect.  Use a switch to select the info.
	* dwarf2-frame.c (warf2_get_section_info): Remove prototype.
	(dwarf2_build_frame_info): Adjust calls to dwarf2_get_section_info.
2011-05-24 12:40:17 +00:00
Pierre Muller ee5683ab05 ../commit.txt~ 2011-05-24 12:01:22 +00:00