Commit Graph

31345 Commits

Author SHA1 Message Date
Andrew Burgess 2f27adfe29 http://sourceware.org/ml/gdb-patches/2012-10/msg00525.html
gdb/ChangeLog

        PR cli/14772
        * c-typeprint.c (c_print_type): Don't print a space for vector
        types, this is handled within the suffix.
        (c_type_print_varspec_suffix): Add a space to vector suffix

gdb/testsuite/ChangeLog

        PR cli/14772
        * gdb.base/gnu_vector.c (union_with_vector_1)
        (struct_with_vector_1): Add new struct and union for testing
        ptype.
        * gdb.base/gnu_vector.exp: Add testing of ptype on vectors, and
        structs / unions containing vectors.
2012-10-31 09:26:22 +00:00
gdbadmin c70c126a54 *** empty log message *** 2012-10-31 00:00:33 +00:00
gdbadmin f3f8840bbd *** empty log message *** 2012-10-30 00:00:33 +00:00
gdbadmin a0a9cc8a7f *** empty log message *** 2012-10-29 00:00:32 +00:00
gdbadmin 401f7068c3 *** empty log message *** 2012-10-28 00:00:33 +00:00
gdbadmin 282178c4f4 *** empty log message *** 2012-10-27 00:00:32 +00:00
Pedro Alves 144db8270d 2012-10-26 Pedro Alves <palves@redhat.com>
* amd64-tdep.c (amd64_relocate_instruction): Use
	store_unsigned_integer instead of memcpy.
	* i386-tdep.c (i386_relocate_instruction): Ditto.
2012-10-26 19:34:09 +00:00
Pedro Alves 940c3c0683 2012-10-26 Pedro Alves <palves@redhat.com>
* infrun.c (handle_inferior_event) <TARGET_WAITKIND_SIGNALLED>:
	Remove comment.
2012-10-26 18:48:43 +00:00
Pedro Alves 47b1906506 2012-10-26 Pedro Alves <palves@redhat.com>
* infrun.c (handle_inferior_event) <TARGET_WAITKIND_SIGNALLED>:
	Remove comment.
2012-10-26 18:47:33 +00:00
Tom Tromey af4238e5f6 * gdb.texinfo (General Query Packets): Use @itemx for QAgent. 2012-10-26 18:18:55 +00:00
Pedro Alves 87d2d2a446 2012-10-26 Pedro Alves <palves@redhat.com>
* target.c (target_waitstatus_to_string): Handle
	TARGET_WAITKIND_VFORK_DONE.
2012-10-26 16:52:38 +00:00
Pedro Alves fed708ed1e 2012-10-26 Pedro Alves <palves@redhat.com>
* infrun.c (handle_inferior_event): Print TARGET_WAITKIND_VFORKED
	as "TARGET_WAITKIND_VFORKED", not "TARGET_WAITKIND_FORKED".
2012-10-26 16:47:17 +00:00
gdbadmin 6008649588 *** empty log message *** 2012-10-26 00:00:32 +00:00
Tom Tromey 687e43a437 * gdb.texinfo (General Query Packets): Use @itemx. 2012-10-25 16:16:06 +00:00
Yao Qi bb662ca6e4 gdb/testsuite:
* gdb.trace/ftrace.exp (test_fast_tracepoints): Use
	'setup_kfail' instead of 'setup_kfail_for_target'.
	* gdb.base/varargs.exp: Likewise.
	* lib/gdb.exp (setup_kfail_for_target): Remove.
2012-10-25 14:56:09 +00:00
Joel Brobecker 528b42ae75 gdb.base/ldbl_e308.exp: Do not allow "inf" in value output.
That was an attempt at handling the targets where sizeof(long double)
is less than 8, but the way it was implement allows the bug that
this testcase verifies to come back without being noticed.

gdb/testsuite/ChangeLog:

        * gdb.base/ldbl_e308.exp: Remove "inf" from possible expected
        output for "print inp" test.
2012-10-25 11:16:18 +00:00
Mark Kettenis 635d23ff1a * gdb.base/varargs.exp: PR gdb/12790 is now fixed. 2012-10-25 08:59:07 +00:00
Mark Kettenis afdb064f98 * gdb.base/callfuncs.exp: PR gdb/12783 is now fixed. 2012-10-25 08:00:58 +00:00
gdbadmin a7dd0df59e *** empty log message *** 2012-10-25 00:00:33 +00:00
Joel Brobecker 2590b6456f Add comments in ravenscar_sparc_fetch_registers.
gdb/ChangeLog:

	* ravenscar-sparc-thread.c (ravenscar_sparc_fetch_registers):
	Add comments.
2012-10-24 19:08:16 +00:00
Joel Brobecker bed0c24398 remote packet sent after Ravenscar inferior exited
When debugging a program using the Ravenscar profile, the debugger
sometimes tries to send the following packet to the remote after
the inferior exited.

     (gdb) c
     Continuing.
     [...]
     Sending packet: $vCont;c:1#13...Ack
     Packet received: W00
     Sending packet: $Hg1#e0...putpkt: write failed: Broken pipe.

As the inferior exited, the remote has already disconnected, and thus
the operation fails.

The reason why GDB sends the package is because the ravenscar-thread
module tries to updates the list of threads.  But this doesn't make
sense, since the program has exited.  This patch fixes it.

gdb/ChangeLog:

        * ravenscar-thread.c (ravenscar_wait): Only update the list
        of threads and inferior_ptid if the inferior is still alive.
2012-10-24 18:19:50 +00:00
Joel Brobecker f69c91ad24 [Ada] use lbasename when testing if file is part of Ada runtime.
We use a list of regular expressions to match a symtab filenames
against the names of the files in the Ada runtime.  These regular
expressions do assume that the filename is a basename, however.
So make sure to evaluate these regular expressions against
the symtab's filename.

Without this patch, we run into problems when the Ada runtime was built
using a project file (through gprbuild).

gdb/ChangeLog:

        * ada-lang.c (is_known_support_routine): Use lbasename when
        matching the symtab's filename against
        known_runtime_file_name_patterns.
2012-10-24 18:17:22 +00:00
Joel Brobecker d99dcf51e1 [Ada] Allow assignment to wide string.
Given the following variable declaration...

   Www : Wide_String := "12345";

... this patch allows the following assignment to work:

   (gdb) set variable www := "qwert"

Without this patch, the debugger rejects the assignment because
the size of the array elements are different:

   (gdb) set www := "asdfg"
   Incompatible types in assignment

(on the lhs, we have an array of 2-bytes elements, and on the rhs,
we have a standard 1-byte string).

gdb/ChangeLog:

        * ada-lang.c (ada_same_array_size_p): New function.
        (ada_promote_array_of_integrals): New function.
        (coerce_for_assign): Add handling of arrays where the elements
        are integrals of a smaller size than the size of the target
        array element type.

gdb/testsuite/ChangeLog:

        * gdb.ada/set_wstr: New testcase.
2012-10-24 18:14:23 +00:00
Joel Brobecker 3256027470 off-by-one max exponent computation in convert_doublest_to_floatformat
Assuming the following variable definition:

    long double inp = 2.0;

On platforms where "long double" is a double precision IEEE flaoting
point, GDB currently behaves as follow:

    (gdb) set variable inp = 1.6e+308l
    (gdb) p inp
    $2 = inf   <<<<---- !!!!

Instead, the value of "inp" should be printed as:

    (gdb) p inp
    $1 = 1.6e+308

The problem is due to a small error in the comparison of the exponent
versus the maximum value this exponent can take, causing us to think
that the value was too big to fit. But it isn't.

gdb/ChangeLog:

        * doublest.c (convert_doublest_to_floatformat): Fix comparison
        against maximum exponent value.

gdb/testsuite/ChangeLog:

        * gdb.base/ldbl_e308.c, gdb.base/ldbl_e308.exp: New files.
2012-10-24 18:11:21 +00:00
Joel Brobecker 5a04cc987f [Ada] Skip unwind-seh.c when searching first "user" frame
On x86_64-windows with GCC 4.7 (using native SEH info), the debugger
behaves as follow:

    (gdb) catch exception unhandled
    Catchpoint 1: unhandled Ada exceptions
    (gdb) run
    Starting program: C:\[...]\b.exe

    Catchpoint 1, unhandled CONSTRAINT_ERROR at 0x000000000040cc57 in _GCC_specific_handler ([...]) at ../../../src/libgcc/unwind-seh.c:289
    [...]

This is after compiler the following code:

    procedure B is
    begin
       raise Constraint_Error;
    end B;

... using the following command:

    % gnatmake -g b

When hitting the exception catchpoint, it should have gone up the stack
all the way until finding the frame corresponding to procedure B.
But if stopped short because unwind-seh.c is compiled with debugging
information, and the debugger is also able to locate that source file.

To prevent this from happening, this patch adds unwind-seh.c to the list
of files that should be ignored, regardless of other factors.

gdb/ChangeLog:

        * ada-lang.h (ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS): Add entry for
        "unwind-seh.c".
2012-10-24 18:08:05 +00:00
Joel Brobecker 5ded533171 [Ada] Pointers to unconstrained arrays inside variant record.
gdb/ChangeLog:

        * ada-lang.c (ada_template_to_fixed_record_type_1): Do not
        strip typedef layer when computing the fixed type's field type,
        only when computing its size.

gdb/testsuite/ChangeLog:

        * gdb.ada/unc_arr_ptr_in_var_rec: New testcase.
2012-10-24 18:06:10 +00:00
Mark Kettenis d8d842913d * gdb.base/callfuncs.exp: PR gdb/12783 is now fixed. 2012-10-24 14:59:24 +00:00
Mark Kettenis 2445fd7b3a PR gdb/12783
* i386-tdep.c (i386_return_value): Handle complex double and long
double.
2012-10-24 14:56:01 +00:00
Jan Kratochvil 6e933c51ce gdb/testsuite/
* gdb.base/callfuncs.exp (do_function_calls): Fix
	setup_kfail_for_target for -m32 mode.
2012-10-24 13:45:51 +00:00
Joel Brobecker 8f205f9c40 [Windows] run program with space in path to exe.
The following works...

    % gdb c:\path to exe\foo.exe
    (gdb) start

... unless a file or directory called "c:\path" or "c:\path to" exist.
This is what happens in the latter case:

    (gdb) start
    [...]
    Error creating process C:\path to exe\foo.exe (error 193).

This is because we are calling CreateProcess (et al) without specifying
the lpApplicationName, so Windows determines the name of the executable
using the second argument, which is the entire command line.  This
command line is a space-separated list of tokens, so the space in
the path to the executable which potentially creates an ambiguity.
The ambiguity is automatically resolved unless we're in the situation
above.

The solution, as suggested by the MSDN documentation for CreateProcess
is to quote the executable name.

gdb/ChangeLog:

        * windows-nat.c (windows_create_inferior) [!__CYGWIN__]:
        New local variable args_len.
        Quote the name of the executable when computing the command line.
2012-10-24 13:40:16 +00:00
gdbadmin c886f0b40c *** empty log message *** 2012-10-24 00:00:02 +00:00
Mark Kettenis 274bd0009d * gdb.base/callfuncs.exp: PR gdb/12796, gdb/12798 and gdb/12800
are now fixed.
2012-10-23 18:25:25 +00:00
Mark Kettenis 7f7930dd88 PR gdb/12796
PR gdb/12798
PR gdb/12800
* amd64-tdep.h (enum amd64_regnum): Add AMD64_ST1_REGNUM and
AMD64_FTAG_REGNUM.
* amd64-tdep.c (amd64_classify): Classify complex types.
(amd64_return_value): Handle the COMPLEX_X87 class.
2012-10-23 18:16:55 +00:00
Yao Qi 545f743d64 gdb/testsuite:
* gdb.base/info-os.exp: Resume the inferior until it exits.
2012-10-23 15:49:11 +00:00
Joel Brobecker 38a69d0a4d Change target-wide-charset to UTF-16 on ppc-aix.
On ppc-aix, type wchar_t is 2 bytes long, so override the default
target-wide-charset (UTF-32) with UTF-16. This allows us to print
wide characters correctly.

gdb/ChangeLog:

        * rs6000-aix-tdep.c (rs6000_aix_auto_wide_charset): New function.
        (rs6000_aix_init_osabi): Set auto_wide_charset gdbarch method.
2012-10-23 15:37:21 +00:00
Joel Brobecker 83ab93c6ea Set default target-wide-charset setting to "UTF-16" for x86_64-windows.
Type wchar_t is only 2 bytes long on x86_64-windows.

gdb/ChangeLog:

        * amd64-windows-tdep.c (amd64_windows_auto_wide_charset): New
        function.
        (amd64_windows_init_abi): Set auto_wide_charset gdbarch method
        to amd64_windows_auto_wide_charset.
2012-10-23 15:37:03 +00:00
Yao Qi f6fbab7d1b gdb/
* event-top.c (mark_async_signal_handler_wrapper): Remove.
	* event-top.h: Remove its declaration.
	(async_request_quit): Call mark_async_signal_handler instead of
	mark_async_signal_handler_wrapper.
	(async_do_nothing, async_disconnect): Likewise.
	(async_stop_sig): Likewise.
	* remote.c (handle_remote_sigint): Likewise.
	(handle_remote_sigint_twice): Likewise.
2012-10-23 06:20:49 +00:00
Yao Qi 05fa925168 gdb/
* event-top.c (sigint_token, sighup_token): Replace 'void *'
	with 'static struct async_signal_handler *'.
	(sighup_token, sigquit_token, sigstp_token): Likewise.
2012-10-23 06:12:04 +00:00
gdbadmin e92e81f4b8 *** empty log message *** 2012-10-23 00:00:33 +00:00
Ali Anwar 08af7a403c Ali Anwar <ali_anwar@codesourcery.com>
* gdbarch.sh (function_list): Use 'pstring' when printing a
	variable which could return NULL.
	* gdbarch.c: Regenerate.
2012-10-22 13:35:43 +00:00
gdbadmin 94dc4eaff7 *** empty log message *** 2012-10-22 00:00:33 +00:00
gdbadmin 2cce1bffff *** empty log message *** 2012-10-21 00:00:03 +00:00
gdbadmin 4a43d85f8c *** empty log message *** 2012-10-20 00:00:04 +00:00
Joel Brobecker beb4b03cbe ppc-aix osabi sniffer: Turn test of bfd flavour into assertion
Due to the way this function is registers, we know that given bfd's
flavour should always be bfd_target_xcoff_flavour, thus making
the former test always true, which means that this function should
always return GDB_OSABI_AIX, and never return GDB_OSABI_UNKNOWN.

This patch also fixes a typo detected by Tom Tromey that caused
the test itself to be completely ineffective.

gdb/ChangeLog (by Tom Tromey and Joel Brobecker):

        * rs6000-aix-tdep.c (rs6000_aix_osabi_sniffer): Replace
        inneffective if condition by gdb assertion.  Add function
        description comment.
2012-10-19 19:58:18 +00:00
Joel Brobecker a5b1262727 Document exp_descriptor.op_name should never return NULL.
This documents a constaint that struct exp_descriptor's "op_name"
method implementation should obey.  This might not have been part
of the initial design, but is currently true of all instantiations,
and already assumed by the current users.

gdb/ChangeLog:

        * parser-defs.h (struct exp_descriptor): Document constraint
        on return value for "op_name" callbacks.
2012-10-19 19:55:56 +00:00
xuepeng guo 99c7d5a823 Correct my ChangeLog entry 2012-10-19 07:50:20 +00:00
xuepeng guo 48b56b6a3e * gdb.base/ctxobj.exp: Skip if skip_shlib_tests returns true.
* gdb.base/print-file-var.exp: Likewise.
        * gdb.base/type-opaque.exp: Likewise.
2012-10-19 07:36:19 +00:00
gdbadmin 4493bd46ff *** empty log message *** 2012-10-19 00:00:03 +00:00
Tom Tromey 0b0865da62 * tracepoint.c (print_one_static_tracepoint_marker): Constify.
* symtab.c (iterate_over_some_symtabs): Constify.
	* source.h (symtab_to_fullname): Return 'const char *'.
	* source.c (symtab_to_fullname): Return 'const char *'.
	* python/py-symtab.c (stpy_fullname): Constify.
	* cli/cli-cmds.c (edit_command): Constify.
	* breakpoint.c (print_breakpoint_location)
	(update_static_tracepoint): Constify.
2012-10-18 20:14:45 +00:00
Tom Tromey 94b0e70d0c * breakpoint.c (compare_breakpoints): Fix comparison. 2012-10-18 20:12:21 +00:00