binutils-gdb.git
11 years agoChangeLog entries for the remove-symbol-file commits.
Nicolas Blanc [Tue, 29 Oct 2013 16:32:17 +0000 (17:32 +0100)]
ChangeLog entries for the remove-symbol-file commits.

11 years agogdb.mi/mi-console.c, gdb.mi/mi-stack.c: Remove local emacs variables defining change...
Pedro Alves [Tue, 29 Oct 2013 13:48:25 +0000 (13:48 +0000)]
gdb.mi/mi-console.c, gdb.mi/mi-stack.c: Remove local emacs variables defining change-log-default-name.

These references to ChangeLog-mi are stale.
testsuite/gdb.mi/ChangeLog-mi doesn't exist anymore, since:

...
commit 2dd627049d915a78ba15b65ab718d54958d115bf
Author: Andrew Cagney <cagney@redhat.com>
Date:   Sat Jun 23 21:47:09 2001 +0000

    Rename gdb.mi/ChangeLog-mi to gdb.mi/ChangeLog.  Update everything.
...
commit 48efe7049b1c286c702621e2f3e89e4584df2bd2
Author: Andrew Cagney <cagney@redhat.com>
Date:   Mon Jan 12 15:16:44 2004 +0000

    Eliminate the old mi/tui specific ChangeLog files as in ...

    Added Files:
        mi/ChangeLog-1999-2003 testsuite/gdb.mi/ChangeLog-1999-2003
        tui/ChangeLog-1998-2003
    Removed Files:
        mi/ChangeLog testsuite/gdb.mi/ChangeLog tui/ChangeLog

Tested with 'make check RUNTESTFLAGS="--directory=gdb.mi"' on x86_64 Fedora 17.

gdb/testsuite/
2013-10-29  Pedro Alves  <palves@redhat.com>

* gdb.mi/mi-console.c, gdb.mi/mi-stack.c: Remove local emacs
variable setting change-log-default-name to ChangeLog-mi.

11 years agoPrint <unavailable> for unavailable registers in info register output.
Andrew Burgess [Tue, 29 Oct 2013 13:24:11 +0000 (13:24 +0000)]
Print <unavailable> for unavailable registers in info register output.

  https://sourceware.org/ml/gdb-patches/2013-08/msg00171.html

gdb/ChangeLog

* infcmd.c (default_print_one_register_info): Use val_print to
print all values even optimized out or unavailable ones.  Don't
try to print a raw form of optimized out or unavailable values.

gdb/testsuite/ChangeLog

* gdb.trace/unavailable.exp (gdb_unavailable_registers_test):
Expect <unavailable> pattern.

11 years agoTest adding and removing a symbol file at runtime.
Nicolas Blanc [Wed, 17 Jul 2013 09:44:26 +0000 (11:44 +0200)]
Test adding and removing a symbol file at runtime.

This test exercises the commands 'add-symbol-file'
and 'remove-symbol-file'.

2013-10-29  Nicolas Blanc  <nicolas.blanc@intel.com>

gdb/testsuite
* gdb.base/sym-file-lib.c: New file.
* gdb.base/sym-file-loader.c: New file.
* gdb.base/sym-file-loader.h: New file.
* gdb.base/sym-file-main.c: New file.
* gdb.base/sym-file.exp: New file.

Signed-off-by: Nicolas Blanc <nicolas.blanc@intel.com>
11 years agoFunction is_elf_target.
Nicolas Blanc [Wed, 17 Jul 2013 09:40:12 +0000 (11:40 +0200)]
Function is_elf_target.

2013-10-29  Nicolas Blanc  <nicolas.blanc@intel.com>

gdb/testsuite
* lib/gdb.exp (is_elf_target): New function.

Signed-off-by: Nicolas Blanc <nicolas.blanc@intel.com>
11 years agoCreate target sections for user-added symbol files.
Nicolas Blanc [Wed, 17 Jul 2013 09:33:45 +0000 (11:33 +0200)]
Create target sections for user-added symbol files.

Add the sections of the symbol files that are provided via
'add-symbol-file' to the set of current target sections.
User-added sections are removed upon notification of free_objfile
when their corresponding object file is deleted.

2013-10-29  Nicolas Blanc  <nicolas.blanc@intel.com>

* exec.h (add_target_sections_of_objfile): New declaration.
* exec.c (add_target_sections_of_objfile): New function.
* symfile.c (add_symbol_file_command): Update current target sections.
(symfile_free_objfile): New function.
(_initialize_symfile): Register observer for free_objfile events.

Signed-off-by: Nicolas Blanc <nicolas.blanc@intel.com>
11 years agoDocumentation for the remove-symbol-file command.
Nicolas Blanc [Fri, 5 Apr 2013 07:15:56 +0000 (09:15 +0200)]
Documentation for the remove-symbol-file command.

2013-10-29  Nicolas Blanc  <nicolas.blanc@intel.com>

* NEWS: Add description of the remove-symbol-file command.
gdb/doc
* gdb.texinfo (Commands to Specify Files): Add description
of the remove-symbol-file command.

Signed-off-by: Nicolas Blanc <nicolas.blanc@intel.com>
11 years agoNew remove-symbol-file command.
Nicolas Blanc [Tue, 12 Mar 2013 10:10:18 +0000 (11:10 +0100)]
New remove-symbol-file command.

New command for removing symbol files added via
the add-symbol-file command.

2013-10-29  Nicolas Blanc  <nicolas.blanc@intel.com>

* breakpoint.c (disable_breakpoints_in_freed_objfile): New function.
* objfiles.c (free_objfile): Notify free_objfile.
(is_addr_in_objfile): New function.
* objfiles.h (is_addr_in_objfile): New declaration.
* printcmd.c (clear_dangling_display_expressions): Act upon free_objfile
events instead of solib_unloaded events.
(_initialize_printcmd): Register observer for free_objfile instead
of solib_unloaded notifications.
* solib.c (remove_user_added_objfile): New function.
* symfile.c (remove_symbol_file_command): New command.
(_initialize_symfile): Add remove-symbol-file.
gdb/doc
* observer.texi: New free_objfile event.

Signed-off-by: Nicolas Blanc <nicolas.blanc@intel.com>
11 years agoSimplify REGISTRY cleanup usages
Yao Qi [Thu, 24 Oct 2013 12:42:02 +0000 (20:42 +0800)]
Simplify REGISTRY cleanup usages

In registry.c:registry_clear_data, the registered data is iterated and
invoke each 'free' function with the data passed:

  for (registration = data_registry->registrations, i = 0;
       i < fields->num_data;
       registration = registration->next, i++)
    if (fields->data[i] != NULL && registration->data->free != NULL)
      adaptor (registration->data->free, container, fields->data[i]);

we can see that data is passed to function 'free' and data is not NULL.
In each usage, we don't have to get the data again through key and
do NULL pointer checking.  This patch is to simplify them.

gdb:

2013-10-29  Yao Qi  <yao@codesourcery.com>

* auto-load.c (auto_load_pspace_data_cleanup): Get data from
parameter 'arg' instead of from program_space_data.
* objfiles.c (objfiles_pspace_data_cleanup): Likewise.
* solib-darwin.c (darwin_pspace_data_cleanup): Likewise.
* solib-dsbt.c (dsbt_pspace_data_cleanup): Likewise.
* solib-svr4.c (svr4_pspace_data_cleanup): Likewise.
* inflow.c (inflow_inferior_data_cleanup): Get data from
parameter 'arg' instead of inferior_data.
* registry.h: Add comments.

11 years agobreakpoint.c:watchpoints_triggered: simplify a tiny bit.
Pedro Alves [Mon, 28 Oct 2013 18:34:37 +0000 (18:34 +0000)]
breakpoint.c:watchpoints_triggered: simplify a tiny bit.

I was reading this, checking the the possible returns, and this
particular path confused a tiny little.  Above we do:

  if (!stopped_by_watchpoint)
    {
...
      return 0;
    }

so any return after that always return true.

Tested on x86_64 Fedora 17.

gdb/
2013-10-28  Pedro Alves  <palves@redhat.com>

* breakpoint.c (watchpoints_triggered)
<!target_stopped_data_address>: Hardcode return 1.

11 years agoFix typo in gdb/testsuite/gdb.arch/thumb2-it.S.
Tom de Vries [Wed, 23 Oct 2013 09:19:46 +0000 (11:19 +0200)]
Fix typo in gdb/testsuite/gdb.arch/thumb2-it.S.

2013-10-28  Tom de Vries  <tom@codesourcery.com>

* gdb.arch/thumb2-it.S (it_8): Fix typo.

11 years agoinfrun.c:process_event_stop_test: Reindent.
Pedro Alves [Mon, 28 Oct 2013 16:39:06 +0000 (16:39 +0000)]
infrun.c:process_event_stop_test: Reindent.

gdb/
2013-10-28  Pedro Alves  <palves@redhat.com>

* infrun.c (process_event_stop_test): Remove unnecessary scoping
level and reindent.

11 years agoinfrun.c:handle_inferior_event: Make process_event_stop_test label a function.
Pedro Alves [Mon, 28 Oct 2013 16:39:06 +0000 (16:39 +0000)]
infrun.c:handle_inferior_event: Make process_event_stop_test label a function.

Now that all ecs->random_signal handing is always done before the
'process_event_stop_test' label, we can easily make that a real
function and actually give it a describing comment that somewhat makes
sense.

Reindenting the new function will be handled in a follow up patch.

2013-10-28  Pedro Alves  <palves@redhat.com>

* infrun.c (process_event_stop_test): New function, factored out
from handle_inferior_event.
(handle_inferior_event): 'process_event_stop_test' is now a
function instead of a goto label -- adjust.

11 years agoinfrun.c:handle_inferior_event: Move process_event_stop_test goto label.
Pedro Alves [Mon, 28 Oct 2013 16:39:06 +0000 (16:39 +0000)]
infrun.c:handle_inferior_event: Move process_event_stop_test goto label.

We only ever call "goto process_event_stop_test;" right after checking
that ecs->random_signal is clear.  The code at the
process_event_stop_test label looks like:

  /* For the program's own signals, act according to
     the signal handling tables.  */

  if (ecs->random_signal)
    {
     ... random signal handling ...
     return;
    }
  else
    {
     ... the stop tests that actually matter for the goto callers.
    }

So this moves the label into the else branch.  It'll make converting
process_event_stop_test into a function a bit clearer.

gdb/
2013-10-28  Pedro Alves  <palves@redhat.com>

* infrun.c (handle_inferior_event): Move process_event_stop_test
goto label to the else branch of the ecs->random_signal check,
along with FRAME and GDBARCH re-fetching.

11 years agoinfrun.c:handle_inferior_event: Put all ecs->random_signal tests together.
Pedro Alves [Mon, 28 Oct 2013 16:39:05 +0000 (16:39 +0000)]
infrun.c:handle_inferior_event: Put all ecs->random_signal tests together.

I recently added a new ecs->random_signal test after the "switch back to
stepped thread" code, and before the stepping tests.  Looking at
making process_event_stop_test a proper function, I realized it'd be
better to keep ecs->random_signal related code together.  To do that,
I needed to factor out the "switch back to stepped thread" code to a new
function, and call it in both the "random signal" and "not random
signal" paths.

gdb/
2013-10-28  Pedro Alves  <palves@redhat.com>

* infrun.c (switch_back_to_stepped_thread): New function, factored
out from handle_inferior_event.
(handle_inferior_event): Adjust to call
switch_back_to_stepped_thread.  Call it also at the tail of the
random signal handling, and return, instead of also handling
random signals just before the stepping tests.

11 years agoinfrun.c:handle_inferior_event: Remove some more dead code.
Pedro Alves [Mon, 28 Oct 2013 16:39:05 +0000 (16:39 +0000)]
infrun.c:handle_inferior_event: Remove some more dead code.

'ecs' is always memset before being passed to handle_inferior_event.
The stop func is only filled in later in the flow.  And since "Remove
dead sets/clears of ecs->random signal", nothing ever sets
ecs->random_signal before this part is reached either.

(Also tested with some added assertions in place.)

gdb/
2013-10-28  Pedro Alves  <palves@redhat.com>

* infrun.c (clear_stop_func): Delete.
(handle_inferior_event): Don't call clear_stop_func and don't
clear 'ecs->random_signal'.

11 years agoRename field 'lang' to 'lang_ops'.
Yao Qi [Sat, 26 Oct 2013 07:27:13 +0000 (15:27 +0800)]
Rename field 'lang' to 'lang_ops'.

On 10/25/2013 11:34 AM, Joel Brobecker wrote:
> Also, as a followup, I think it would be beneficial if we renamed
> field "lang" in the varobj_root into "lang_ops". I think it's more
> descriptive, especially since "lang" is used elsewhere with different
> meanings (and types).

Here is the patch to rename 'lang' to 'lang_ops'.  Committed as obvious.

gdb:

2013-10-27  Yao Qi  <yao@codesourcery.com>

* varobj.c (struct varobj_root) <lang>: Rename to 'lang_ops'.
(varobj_create, varobj_get_path_expr): Update.
(varobj_value_has_mutated, varobj_update): Likewise.
(create_child_with_value, new_root_variable): Likewise.
(number_of_children, name_of_variable): Likewise.
(value_of_child, my_value_of_variable): Likewise.
(varobj_value_is_changeable_p): Likewise.

11 years agoNew field la_varobj_ops in struct language_defn
Yao Qi [Thu, 17 Oct 2013 13:15:21 +0000 (21:15 +0800)]
New field la_varobj_ops in struct language_defn

This is a follow-up series to move language stuff out of varobj.c.

This patch adds a new field la_varobj_ops in struct language_defn so
that each language has varobj-related options.  Not every language
supports varobj, and the operations are identical to operations of c
languages.

'struct language_defn' is the ideal place to save all language-related
operations.  After this patch, some cleanups can be done in patch 2/2,
which removes language-related stuff completely from varobj.c.

Regression tested on x86_64-linux.

gdb:

2013-10-25  Yao Qi  <yao@codesourcery.com>

* language.h (struct lang_varobj_ops): Declare.
(struct language_defn) <la_varobj_ops>: New field.
* ada-lang.c: Include "varobj.h"
(defn ada_language_defn): Initialize field 'la_varobj_ops' by
ada_varobj_ops.
* c-lang.c: Include "varobj.h"
(c_language_defn): Initialize field 'la_varobj_ops' by
c_varobj_ops.
(cplus_language_defn): Initialize field 'la_varobj_ops' by
cplus_varobj_ops.
(asm_language_defn): Initialize field 'la_varobj_ops' by
default_varobj_ops.
(minimal_language_defn): Likewise.
* d-lang.c (d_language_defn): Likewise.
* f-lang.c (f_language_defn): Likewise.
* go-lang.c (go_language_defn): Likewise.
* m2-lang.c (m2_language_defn): Likewise.
* objc-lang.c (objc_language_defn): Likewise.
* opencl-lang.c (opencl_language_defn): Likewise.
* p-lang.c (pascal_language_defn): Likewise.
* language.c (unknown_language_defn): Likewise.
(auto_language_defn): Likewise.
(local_language_defn): Likewise.
* jv-lang.c (java_language_defn): Initialize field
'la_varobj_ops' by java_varobj_ops.
* varobj.c (varobj_create): Update.
* varobj.h (default_varobj_ops): Define macro.

11 years agotestsuite: Fix gdb.base/bang.exp for remote stubs without exit
Anton Kolesov [Wed, 9 Oct 2013 08:58:14 +0000 (12:58 +0400)]
testsuite: Fix gdb.base/bang.exp for remote stubs without exit

Some remote stubs do not have a proper exit() function implementation.
gdb.base/bang.exp was failing on those targets due to timeout.  With
this patch bang.exp uses already defined library procedures to handle
this situation gracefully without breaking native targets.

Tested with x86_64 (unix, native-gdbserver) and with arc-*-elf32.

gdb/testsuite/ChangeLog:

2013-10-25  Anton Kolesov  <Anton.Kolesov@synopsys.com>  (tiny change)

* gdb.base/bang.exp: Use gdb_continue_to_end to properly support
remote stubs where exit() behaviour is unreliable.

11 years agoPrint nonexisting/optimized out static fields gracefully.
Pedro Alves [Fri, 25 Oct 2013 10:37:13 +0000 (11:37 +0100)]
Print nonexisting/optimized out static fields gracefully.

With:

 struct static_struct { static int aaa; };
 struct static_struct sss;
 int main () { return 0; }

We get:

 (gdb) p sss
 $1 = {static aaa = <optimized out>}
 (gdb) p sss.aaa
 field aaa is nonexistent or has been optimized out

Note that the "field aaa ..." message is an error being thrown.

GDB is graceful everywhere else when printing optimized out values.
IOW it usually prints an <optimized out> value and puts that in the
value history.  I see no reason for here to be different, more so that
when the print the whole "containing" object (well, it's a static
field, so it's not really a container), we already print <optimized
out>.

After the patch:

 (gdb) p sss
 $1 = {static aaa = <optimized out>}
 (gdb) p sss.aaa
 $2 = <optimized out>

The value_entirely_optimized_out checks are there to preserve
behavior.  Without those, if the static field is a struct/union, GDB
would go and print its fields one by one (and print <optimized out>
for each).

Tested on x86_64 Fedora 17.

gdb/
2013-10-25  Pedro Alves  <palves@redhat.com>

* cp-valprint.c (cp_print_value_fields): No longer handle a NULL
static field value.
(cp_print_static_field): If the value is entirely optimized out,
print <optimized out> here.
* jv-valprint.c (java_print_value_fields): No longer handle a NULL
static field value.
* p-valprint.c (pascal_object_print_static_field): If the value is
entirely optimized out, print <optimized out> here.
* valops.c (do_search_struct_field)
(value_struct_elt_for_reference): No longer handle a NULL static
field value.
* value.c (value_static_field): Return an optimized out value
instead of NULL.

gdb/testsuite/
2013-10-25  Pedro Alves  <palves@redhat.com>

* gdb.cp/m-static.exp: Adjust expected output of printing a
nonexistent or optimized out static field.  Also test printing the
the "container" object.

11 years ago PR binutils/15994
Nick Clifton [Fri, 25 Oct 2013 08:33:59 +0000 (09:33 +0100)]
PR binutils/15994
* dwarf2.c (lookup_address_in_line_info_table): Change return type
to be the range of addresses covered by the table.
(comp_unit_find_nearest_line): Likewise.
(find_line): Search all CUs.  Select the one that matches and
covers the smallest address range.

11 years ago PR binutils/15994
Nick Clifton [Fri, 25 Oct 2013 08:32:43 +0000 (09:32 +0100)]
PR binutils/15994
* dwarf2.c (lookup_address_in_line_info_table): Change return type
to be the range of addresses covered by the table.
(comp_unit_find_nearest_line): Likewise.
(find_line): Search all CUs.  Select the one that matches and
covers the smallest address range.

11 years ago * nm.c (display_rel_file): Treat bfd_error_no_symbols as
Nick Clifton [Fri, 25 Oct 2013 08:29:07 +0000 (09:29 +0100)]
* nm.c (display_rel_file): Treat bfd_error_no_symbols as
non-fatal.

11 years ago* nm.c (display_rel_file): Treat bfd_error_no_symbols as
Nick Clifton [Fri, 25 Oct 2013 08:26:56 +0000 (09:26 +0100)]
* nm.c (display_rel_file): Treat bfd_error_no_symbols as
  non-fatal.

11 years ago * binutils-all/objdump.exp (cps_expected): Add MSP430 to list.
Nick Clifton [Fri, 25 Oct 2013 08:24:57 +0000 (09:24 +0100)]
* binutils-all/objdump.exp (cps_expected): Add MSP430 to list.

11 years agoSend qXfer:traceframe-info:read when traceframe is selected.
Yao Qi [Thu, 24 Oct 2013 01:28:33 +0000 (09:28 +0800)]
Send qXfer:traceframe-info:read when traceframe is selected.

When I do 'si', I find many 'qXfer:traceframe-info:read' packets are sent,
which is not necessary.  It slows down the single step.
(gdb) si
Sending packet: $qTStatus#49...Packet received: T0;tnotrun:0;tframes:0;tcreated:0;tfree:500000;tsize:500000;circular:0;disconn:0;starttime:0;stoptime:0;username:;notes::
Sending packet: $Z0,80483c7,1#b4...Packet received: OK
Sending packet: $Z0,4ce5b6b0,1#6e...Packet received: OK
Sending packet: $QPassSignals:e;10;14;17;1a;1b;1c;21;24;25;2c;4c;#5f...Packet received: OK
Sending packet: $vCont;s:p1b15.1b15;c#20...Packet received: T0505:44efffbf;04:44efffbf;08:d1830408;thread:p1b15.1b15;core:3;
Sending packet: $qXfer:traceframe-info:read::0,fff#0b...Packet received: E01
Sending packet: $mbfffef40,40#c0...Packet received: d183040878efffbf2e840408030000000000a040030000000500000070efffbf07000000010000004984040807000000030000000500000000000000b396e84c
Sending packet: $qXfer:traceframe-info:read::0,fff#0b...Packet received: E01
Sending packet: $qXfer:traceframe-info:read::0,fff#0b...Packet received: E01
Sending packet: $qXfer:traceframe-info:read::0,fff#0b...Packet received: E01
Sending packet: $z0,80483c7,1#d4...Packet received: OK
Sending packet: $z0,4ce5b6b0,1#8e...Packet received: OK
Sending packet: $qXfer:traceframe-info:read::0,fff#0b...Packet received: E01
Sending packet: $qXfer:traceframe-info:read::0,fff#0b...Packet received: E01
Sending packet: $qXfer:traceframe-info:read::0,fff#0b...Packet received: E01
Sending packet: $qXfer:traceframe-info:read::0,fff#0b...Packet received: E01
Sending packet: $qXfer:traceframe-info:read::0,fff#0b...Packet received: E01
Sending packet: $qXfer:traceframe-info:read::0,fff#0b...Packet received: E01

This problem was introduced by this patch
(https://sourceware.org/ml/gdb-patches/2013-04/msg00000.html), in
which get_traceframe_number is not checked before calling
traceframe_available_memory.  This patch moves the check to
remote_traceframe_info, say, if GDB doesn't have traceframe selected, GDB
doesn't need to send qXfer:traceframe-info:read packets.

With this patch applied, there is no qXfer:traceframe-info:read sent
out and single step is speed up a little bit.

Here is the experiment I did:

   Num of single step Original Patched

single-step cpu_time 10000 8.08 7.57
single-step cpu_time 20000 16.23 14.23
single-step cpu_time 30000 24.19 21.59
single-step cpu_time 40000 32.49 28.0
single-step wall_time 10000 14.1974210739 13.2641420364
single-step wall_time 20000 28.5278921127 25.0541369915
single-step wall_time 30000 42.5864038467 38.0038759708
single-step wall_time 40000 57.2107698917 49.2350611687
single-step vmsize 10000 16128 16388
single-step vmsize 20000 16128 16388
single-step vmsize 30000 16260 16520
single-step vmsize 40000 16444 16704

The patch is tested on x86_64-linux.

gdb:

2013-10-24  Yao Qi  <yao@codesourcery.com>

* remote.c (remote_traceframe_info): Return early if
traceframe is not selected.

11 years agoChange mode of gas/configure back to 0755
Yao Qi [Fri, 25 Oct 2013 07:04:06 +0000 (15:04 +0800)]
Change mode of gas/configure back to 0755

11 years agoFix changelog.
Yao Qi [Fri, 25 Oct 2013 06:55:52 +0000 (14:55 +0800)]
Fix changelog.

gdb/

Add changelog entry for my previous commit.

11 years agoRemove global traceframe_fun and traceframe_sal
Yao Qi [Thu, 24 Oct 2013 00:46:07 +0000 (08:46 +0800)]
Remove global traceframe_fun and traceframe_sal

I happen to see traceframe_fun and traceframe_sal are static variables,
which are not necessary to me.  They are only used in set_traceframe_context,
and they are not stateful.  This patch is to remove them.

gdb:

2013-10-24  Yao Qi  <yao@codesourcery.com>

* tracepoint.c (traceframe_fun): Remove.
(traceframe_sal): Remove.
(set_traceframe_context): Add local variables.

11 years agoMinor coding style fixes in varobj.h
Joel Brobecker [Fri, 25 Oct 2013 03:18:50 +0000 (07:18 +0400)]
Minor coding style fixes in varobj.h

No actual code change, just a minor style fix.

gdb/ChangeLog:

        * varobj.h (struct lang_varobj_ops): Remove spaces between '*'
        and parameter name.

11 years agotestsuite: Persistent gdbserver cleanup
Maciej W. Rozycki [Thu, 24 Oct 2013 22:32:30 +0000 (23:32 +0100)]
testsuite: Persistent gdbserver cleanup

* lib/gdb.exp (gdb_finish): Send a kill request to `gdbserver'
if in the persistent mode.
* gdb.trace/disconnected-tracing.exp: Reconnect before completion.

11 years agoAvoid producing broken non-native core files
Maciej W. Rozycki [Thu, 24 Oct 2013 19:37:49 +0000 (20:37 +0100)]
Avoid producing broken non-native core files

gdb/
* linux-tdep.c (linux_corefile_thread_callback): Propagate any
failure from register information collection.

gdb/testsuite/
* lib/gdb.exp (gdb_gcore_cmd): Also handle a "Target does not
support core file generation" reply.

11 years agoFix ChangeLog typo
Maciej W. Rozycki [Thu, 24 Oct 2013 19:35:45 +0000 (20:35 +0100)]
Fix ChangeLog typo

11 years agolinux-tdep.c: Remove unused `num_notes' struct member
Maciej W. Rozycki [Thu, 24 Oct 2013 19:26:37 +0000 (20:26 +0100)]
linux-tdep.c: Remove unused `num_notes' struct member

* linux-tdep.c (linux_corefile_thread_data): Remove `num_notes'
member.
(linux_corefile_thread_callback): Update accordingly.
(linux_make_corefile_notes): Likewise.

11 years agoMake STARTUP_WITH_SHELL a runtime toggle -- add new "set/show startup-with-shell...
Pedro Alves [Thu, 24 Oct 2013 15:10:05 +0000 (16:10 +0100)]
Make STARTUP_WITH_SHELL a runtime toggle -- add new "set/show startup-with-shell" option.

Occasionaly we hear about people having problems with GDB not being
able to start programs (with "run"/"start").  GDB spawns a shell to
start the program, and most often, it'll be the case that the problem
is actually with the user's shell setup.

GDB has code to disable the use of the shell to start programs.
That's the STARTUP_WITH_SHELL macro that native targets could set to 0
in their nm.h file (though no target actually uses it nowadays).

This patch makes that setting a run-time knob instead.  This will be
useful to quickly diagnose such shell issues, and might also come in
handy at other times (such as when debugging the shell itself, if you
don't have a different shell handy).

gdb/
2013-10-24  Pedro Alves  <palves@redhat.com>

* NEWS (New options): Mention set/show startup-with-shell.
* config/alpha/nm-osf3.h (START_INFERIOR_TRAPS_EXPECTED): Set to 2
instead of 3.
* fork-child.c (fork_inferior, startup_inferior): Handle 'set
startup-with-shell'.
(show_startup_with_shell): New function.
(_initialize_fork_child): Register the set/show startup-with-shell
commands.
* inf-ptrace.c (inf_ptrace_create_inferior): Remove comment.
* inf-ttrace.c (inf_ttrace_him): Remove comment.
* procfs.c (procfs_init_inferior): Remove comment.
* infcmd.c (startup_with_shell): New global.
* inferior.h (startup_with_shell): Declare global.
(STARTUP_WITH_SHELL): Delete.
(START_INFERIOR_TRAPS_EXPECTED): Set to 1 by default instead of 2.

gdb/doc/
2013-10-24  Pedro Alves  <palves@redhat.com>

* gdb.texinfo (Starting): Document set/show startup-with-shell.

11 years agoinfrun debug output: print enum gdb_signal symbol names instead of POSIX signal names.
Pedro Alves [Wed, 23 Oct 2013 15:14:53 +0000 (16:14 +0100)]
infrun debug output: print enum gdb_signal symbol names instead of POSIX signal names.

The other day while debugging something related to random signals, I
got confused with "set debug infrun 1" output, for it said:

 infrun: TARGET_WAITKIND_STOPPED
 infrun: stop_pc = 0x323d4e8b94
 infrun: random signal 20

On GNU/Linux, 20 is SIGTSTP.  For some reason, it took me a few
minutes to realize that 20 is actually a GDB signal number, not a
target signal number (duh!).  In any case, I propose making GDB's
output clearer here:

One way would be to use gdb_signal_to_name, like already used
elsewhere:

 infrun: TARGET_WAITKIND_STOPPED
 infrun: stop_pc = 0x323d4e8b94
 infrun: random signal SIGCHLD (20)

but I think that might confuse someone too ("20? Why does GDB believe
SIGCHLD is 20?").  So I thought of printing the enum string instead:

 infrun: TARGET_WAITKIND_STOPPED
 infrun: stop_pc = 0x323d4e8b94
 infrun: random signal GDB_SIGNAL_CHLD (20)

Looking at a more complete infrun debug log, we had actually printed
the (POSIX) signal name name a bit before:

 infrun: target_wait (-1, status) =
 infrun:   9300 [Thread 0x7ffff7fcb740 (LWP 9300)],
 infrun:   status->kind = stopped, signal = SIGCHLD
 ...
 infrun: TARGET_WAITKIND_STOPPED
 infrun: stop_pc = 0x323d4e8b94
 infrun: random signal 20

So I'm now thinking that it'd be even better to make infrun output
consistently use the enum symbol string, like so:

 infrun: clear_proceed_status_thread (Thread 0x7ffff7fca700 (LWP 25663))
 infrun: clear_proceed_status_thread (Thread 0x7ffff7fcb740 (LWP 25659))
- infrun: proceed (addr=0xffffffffffffffff, signal=144, step=1)
+ infrun: proceed (addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT, step=1)
- infrun: resume (step=1, signal=0), trap_expected=0, current thread [Thread 0x7ffff7fcb740 (LWP 25659)] at 0x400700
+ infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0x7ffff7fcb740 (LWP 25659)] at 0x400700
 infrun: wait_for_inferior ()
 infrun: target_wait (-1, status) =
 infrun:   25659 [Thread 0x7ffff7fcb740 (LWP 25659)],
- infrun:   status->kind = stopped, signal = SIGCHLD
+ infrun:   status->kind = stopped, signal = GDB_SIGNAL_CHLD
 infrun: infwait_normal_state
 infrun: TARGET_WAITKIND_STOPPED
 infrun: stop_pc = 0x400700
- infrun: random signal 20
+ infrun: random signal (GDB_SIGNAL_CHLD)
 infrun: random signal, keep going
- infrun: resume (step=1, signal=20), trap_expected=0, current thread [Thread 0x7ffff7fcb740 (LWP 25659)] at 0x400700
+ infrun: resume (step=1, signal=GDB_SIGNAL_CHLD), trap_expected=0, current thread [Thread 0x7ffff7fcb740 (LWP 25659)] at 0x400700
 infrun: prepare_to_wait
 infrun: target_wait (-1, status) =
 infrun:   25659 [Thread 0x7ffff7fcb740 (LWP 25659)],
- infrun:   status->kind = stopped, signal = SIGTRAP
+ infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
 infrun: infwait_normal_state
 infrun: TARGET_WAITKIND_STOPPED
 infrun: stop_pc = 0x400704
 infrun: stepi/nexti
 infrun: stop_stepping

GDB's signal numbers are public and hardcoded (see
include/gdb/signals.h), so there's really no need to clutter the
output with numeric values in some places while others not.  Replacing
the magic "144" with GDB_SIGNAL_DEFAULT in "proceed"'s debug output
(see above) I think is quite nice.

I posit that all this makes it clearer to newcomers that GDB has its
own signal numbering (and that there must be some mapping going on).

Tested on x86_64 Fedora 17.

gdb/
2013-10-23  Pedro Alves  <palves@redhat.com>

* common/gdb_signals.h (gdb_signal_to_symbol_string): Declare.
* common/signals.c: Include "gdb_assert.h".
(signals): New field 'symbol'.
(SET): Use the 'symbol' parameter.
(gdb_signal_to_symbol_string): New function.
* infrun.c (handle_inferior_event) <random signal>: In debug
output, print the random signal enum as string in addition to its
number.
* target/waitstatus.c (target_waitstatus_to_string): Print the
signal's enum value as string instead of the (POSIX) signal name.

11 years agoFix off-by-one errors in *scanf format strings.
Gary Benson [Wed, 23 Oct 2013 12:58:26 +0000 (13:58 +0100)]
Fix off-by-one errors in *scanf format strings.

In the first hunk, the format string was off-by-one for cmd, and cmd
itself was larger than the maximum size required.  cmd was reduced in
size and the format string adjusted.

In the second hunk, the format string was off-by-one for local_address,
remote_address and extra, although the buffers for the two addresses
were large enough for this not to matter.  The specifiers for the two
addresses was corrected, and a number of unused variables including
extra were suppressed from parsing.

In the third hunk, the format string was off-by-one for name,
dependencies and status.  This code was rewritten using strtok since
dependencies can be arbitrarily long.

gdb/
2013-10-23  Gary Benson  <gbenson@redhat.com>

PR 16013
* common/linux-osdata.c (command_from_pid): Reduced size of cmd
from 32 to 18.  Adjusted fscanf format string accordingly.
(Avoids leaving cmd unterminated.)
(print_sockets): Do not parse tlen, inode, sl, timeout, txq, rxq,
trun, retn or extra.  (Avoids leaving extra unterminated.)  Check
that local_address and remote_address will not overflow.
(linux_xfer_osdata_modules): Parse lines using strtok to avoid
leaving dependencies unterminated.  Parse size as "%u" to match
definition.

11 years agoRemove dead sets/clears of ecs->random signal.
Pedro Alves [Tue, 22 Oct 2013 14:11:28 +0000 (15:11 +0100)]
Remove dead sets/clears of ecs->random signal.

'*ecs' is always memset by handle_inferior_event's callers, so all
these clears are unnecessary.  There's one place that sets the flag to
true, but, afterwards, before ecs->random_signal is ever read, we
reach the part of handle_inferior_even that clears ecs->random_signal,
among other things:

  clear_stop_func (ecs);
  ecs->event_thread->stepping_over_breakpoint = 0;
  bpstat_clear (&ecs->event_thread->control.stop_bpstat);
  ecs->event_thread->control.stop_step = 0;
  stop_print_frame = 1;
  ecs->random_signal = 0;
  stopped_by_random_signal = 0;

So all these ecs->random_signal accesses are dead code.

Tested on x86_64 Fedora 17.

gdb/
2013-10-22  Pedro Alves  <palves@redhat.com>

* infrun.c (handle_inferior_event) <thread hop>: Don't clear or
set ecs->random signal.

11 years agoAdd missing ChangeLog entries for previous commits.
Pedro Alves [Tue, 22 Oct 2013 15:24:25 +0000 (16:24 +0100)]
Add missing ChangeLog entries for previous commits.

11 years agoinfrun.c:keep_going: update comments.
Pedro Alves [Tue, 22 Oct 2013 14:11:27 +0000 (15:11 +0100)]
infrun.c:keep_going: update comments.

This function still has comments referring back to when it was a goto
label in wait_for_inferior, eons ago.  Looking closer, actually most
of its comments could use a facelift (contents/formatting/typos).
That's what this patch does.

gdb/
2013-10-22  Pedro Alves  <palves@redhat.com>

* infrun.c (keep_going): Update comments.

11 years agoremote: Map invalid signal numbers to GDB_SIGNAL_UNKNOWN.
Pedro Alves [Tue, 22 Oct 2013 14:02:28 +0000 (15:02 +0100)]
remote: Map invalid signal numbers to GDB_SIGNAL_UNKNOWN.

I realized that remote.c is not validating input here.  Currently, if
a remote stub sends in an invalid signal number (or put another way,
if a future stub sends a new signal an old GDB doesn't know about),
GDB will do out of bounds accesses in the
signal_pass/signal_stop/signal_program arrays.  It'll probably be a
long while before we add another signal number (and buggy stubs should
just be fixed), but can't hurt to be defensive.

Tested on x86_64 Fedora 17, native gdbserver.

gdb/
2013-10-22  Pedro Alves  <palves@redhat.com>

* remote.c (remote_parse_stop_reply) <'T'/'S'/'X' replies>: Map
invalid signal numbers to GDB_SIGNAL_UNKNOWN.

11 years agoFix up a couple oddities in GDB's signal names and strings.
Pedro Alves [Tue, 22 Oct 2013 11:16:51 +0000 (12:16 +0100)]
Fix up a couple oddities in GDB's signal names and strings.

- The Mach exception/signals escaped the TARGET_ -> GDB_ prefix change
  done a while ago, but there's no real reason for that.  I grepped
  for TARGET_EXC and fixed all found, which unsurprisingly, means
  darwin-nat.c needed fixing.  I think the change there is as obvious
  and trivial as it can get, so I'd be quite surprised if this broke
  anything there somehow.

- GDB_SIGNAL_LAST's description string was unnecessarily inconsistent
  with the enum name.

Built on x86_64 Fedora 17.

gdb/
2013-10-22  Pedro Alves  <palves@redhat.com>

* include/gdb/signals.def (TARGET_EXC_BAD_ACCESS): Rename to
GDB_EXC_BAD_ACCESS.
(TARGET_EXC_BAD_INSTRUCTION): Rename to GDB_EXC_BAD_INSTRUCTION.
(TARGET_EXC_ARITHMETIC): Rename to GDB_EXC_ARITHMETIC.
(TARGET_EXC_EMULATION): Rename to GDB_EXC_EMULATION.
(TARGET_EXC_SOFTWARE): Rename to GDB_EXC_SOFTWARE.
(TARGET_EXC_BREAKPOINT): Rename to GDB_EXC_BREAKPOINT.
(GDB_SIGNAL_LAST): Change description string.
* common/signals.c (gdb_signal_from_host, do_gdb_signal_to_host):
Adjust to signal renaming.
* darwin-nat.c (darwin_decode_message): Likewise.

11 years ago2013-10-22 Jose E. Marchesi <jose.marchesi@oracle.com>
Jose E. Marchesi [Tue, 22 Oct 2013 09:34:36 +0000 (02:34 -0700)]
2013-10-22  Jose E. Marchesi  <jose.marchesi@oracle.com>

* MAINTAINERS (Write After Approval): Add myself to the list.

11 years agobinutils doc update
Tom Tromey [Mon, 12 Aug 2013 20:04:37 +0000 (14:04 -0600)]
binutils doc update

Here's another small patch to lay the groundwork for the git
conversion.  This one updates the BFD and binutils documentation for
the move.

bfd:
* doc/bfdint.texi (BFD generated files): Mention git, not cvs.
binutils:
* MAINTAINERS: Mention git, not cvs.
* README: Mention git, not cvs.

11 years agofix ARI for git migration
Tom Tromey [Tue, 17 Sep 2013 15:19:25 +0000 (09:19 -0600)]
fix ARI for git migration

This fixes the ARI script for the git migration.

* contrib/ari/create-web-ari-in-src.sh: Update for git.

11 years agofix CONTRIBUTE for git migration
Tom Tromey [Tue, 17 Sep 2013 15:18:52 +0000 (09:18 -0600)]
fix CONTRIBUTE for git migration

This fixes gdb's CONTRIBUTE file for the git migration.

* CONTRIBUTE: Update for git.

11 years ago2013-10-21 Jose E. Marchesi <jose.marchesi@oracle.com>
Jose E. Marchesi [Mon, 21 Oct 2013 12:42:02 +0000 (12:42 +0000)]
2013-10-21  Jose E. Marchesi  <jose.marchesi@oracle.com>

PR gdb/15986
* gdb.base/run.c (main): gdb_get_line_number tag added for
commands.exp.
(factorial): Likewise.

* gdb.base/commands.exp (watchpoint_command_test): Use
gdb_get_line_number in order to determine the locations in run.c
where local_var is detected to go out of scope.

11 years ago2013-10-21 Jose E. Marchesi <jose.marchesi@oracle.com>
Jose E. Marchesi [Mon, 21 Oct 2013 12:34:25 +0000 (12:34 +0000)]
2013-10-21  Jose E. Marchesi  <jose.marchesi@oracle.com>

* gdb.base/gnu_vector.exp: Care about endianness when casting
scalars to vectors.

11 years agodaily update
Alan Modra [Sun, 20 Oct 2013 23:00:04 +0000 (23:00 +0000)]
daily update

11 years agodaily update
Alan Modra [Sat, 19 Oct 2013 23:00:04 +0000 (23:00 +0000)]
daily update

11 years agodaily update
Alan Modra [Fri, 18 Oct 2013 23:00:05 +0000 (23:00 +0000)]
daily update

11 years ago2013-10-18 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
Chao-ying Fu [Fri, 18 Oct 2013 21:16:57 +0000 (21:16 +0000)]
2013-10-18  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

* gas/mips/micromips@msa-branch.d, gas/mips/msa-branch.d,
gas/mips/msa-branch.s: New.
* gas/mips/mips.exp: Run new tests.

11 years ago2013-10-18 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
Chao-ying Fu [Fri, 18 Oct 2013 21:14:25 +0000 (21:14 +0000)]
2013-10-18  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

* config/tc-mips.c (fpr_read_mask): Test MSA registers.
(fpr_write_mask): Test MSA registers.
(can_swap_branch_p): Check fpr write followed by fpr read.

11 years ago * lib/gdb.exp (build_executable_from_specs): Remove duplicate set
Tom Tromey [Fri, 18 Oct 2013 20:40:03 +0000 (20:40 +0000)]
* lib/gdb.exp (build_executable_from_specs): Remove duplicate set
of "binfile".

11 years agoHardware watchpoints turned off, inferior not yet started.
Andrew Burgess [Fri, 18 Oct 2013 16:25:14 +0000 (16:25 +0000)]
Hardware watchpoints turned off, inferior not yet started.

  https://sourceware.org/ml/gdb-patches/2013-10/msg00477.html

gdb/ChangeLog

* breakpoint.c (update_watchpoint): If hardware watchpoints are
forced off, downgrade them to software watchpoints if possible,
and error out if not possible.
(watch_command_1): Move watchpoint type selection closer to
watchpoint creation, and extend the comments.

gdb/testsuite/ChangeLog

* gdb.base/watchpoints.exp: Add test for setting software
watchpoints of different types before starting the inferior.

11 years ago[gdb/16062] stepi sometimes doesn't make progress
Pedro Alves [Fri, 18 Oct 2013 14:28:34 +0000 (14:28 +0000)]
[gdb/16062] stepi sometimes doesn't make progress

I noticed something odd while doing "stepi" over a fork syscall:

 ...
 (gdb) set disassemble-next-line on
 ...
 (gdb) si
 0x000000323d4ba7c2      131       pid = ARCH_FORK ();
    0x000000323d4ba7a4 <__libc_fork+132>:        64 4c 8b 04 25 10 00 00 00      mov    %fs:0x10,%r8
    0x000000323d4ba7ad <__libc_fork+141>:        31 d2   xor    %edx,%edx
    0x000000323d4ba7af <__libc_fork+143>:        4d 8d 90 d0 02 00 00    lea    0x2d0(%r8),%r10
    0x000000323d4ba7b6 <__libc_fork+150>:        31 f6   xor    %esi,%esi
    0x000000323d4ba7b8 <__libc_fork+152>:        bf 11 00 20 01  mov    $0x1200011,%edi
    0x000000323d4ba7bd <__libc_fork+157>:        b8 38 00 00 00  mov    $0x38,%eax
 => 0x000000323d4ba7c2 <__libc_fork+162>:        0f 05   syscall
    0x000000323d4ba7c4 <__libc_fork+164>:        48 3d 00 f0 ff ff       cmp    $0xfffffffffffff000,%rax
    0x000000323d4ba7ca <__libc_fork+170>:        0f 87 2b 01 00 00       ja     0x323d4ba8fb <__libc_fork+475>
 (gdb) si
 0x000000323d4ba7c4      131       pid = ARCH_FORK ();
    0x000000323d4ba7a4 <__libc_fork+132>:        64 4c 8b 04 25 10 00 00 00      mov    %fs:0x10,%r8
    0x000000323d4ba7ad <__libc_fork+141>:        31 d2   xor    %edx,%edx
    0x000000323d4ba7af <__libc_fork+143>:        4d 8d 90 d0 02 00 00    lea    0x2d0(%r8),%r10
    0x000000323d4ba7b6 <__libc_fork+150>:        31 f6   xor    %esi,%esi
    0x000000323d4ba7b8 <__libc_fork+152>:        bf 11 00 20 01  mov    $0x1200011,%edi
    0x000000323d4ba7bd <__libc_fork+157>:        b8 38 00 00 00  mov    $0x38,%eax
    0x000000323d4ba7c2 <__libc_fork+162>:        0f 05   syscall
 => 0x000000323d4ba7c4 <__libc_fork+164>:        48 3d 00 f0 ff ff       cmp    $0xfffffffffffff000,%rax
    0x000000323d4ba7ca <__libc_fork+170>:        0f 87 2b 01 00 00       ja     0x323d4ba8fb <__libc_fork+475>
 (gdb) si
 0x000000323d4ba7c4      131       pid = ARCH_FORK ();
    0x000000323d4ba7a4 <__libc_fork+132>:        64 4c 8b 04 25 10 00 00 00      mov    %fs:0x10,%r8
    0x000000323d4ba7ad <__libc_fork+141>:        31 d2   xor    %edx,%edx
    0x000000323d4ba7af <__libc_fork+143>:        4d 8d 90 d0 02 00 00    lea    0x2d0(%r8),%r10
    0x000000323d4ba7b6 <__libc_fork+150>:        31 f6   xor    %esi,%esi
    0x000000323d4ba7b8 <__libc_fork+152>:        bf 11 00 20 01  mov    $0x1200011,%edi
    0x000000323d4ba7bd <__libc_fork+157>:        b8 38 00 00 00  mov    $0x38,%eax
    0x000000323d4ba7c2 <__libc_fork+162>:        0f 05   syscall
 => 0x000000323d4ba7c4 <__libc_fork+164>:        48 3d 00 f0 ff ff       cmp    $0xfffffffffffff000,%rax
    0x000000323d4ba7ca <__libc_fork+170>:        0f 87 2b 01 00 00       ja     0x323d4ba8fb <__libc_fork+475>
 (gdb) si
 0x000000323d4ba7ca      131       pid = ARCH_FORK ();
    0x000000323d4ba7a4 <__libc_fork+132>:        64 4c 8b 04 25 10 00 00 00      mov    %fs:0x10,%r8
    0x000000323d4ba7ad <__libc_fork+141>:        31 d2   xor    %edx,%edx
    0x000000323d4ba7af <__libc_fork+143>:        4d 8d 90 d0 02 00 00    lea    0x2d0(%r8),%r10
    0x000000323d4ba7b6 <__libc_fork+150>:        31 f6   xor    %esi,%esi
    0x000000323d4ba7b8 <__libc_fork+152>:        bf 11 00 20 01  mov    $0x1200011,%edi
    0x000000323d4ba7bd <__libc_fork+157>:        b8 38 00 00 00  mov    $0x38,%eax
    0x000000323d4ba7c2 <__libc_fork+162>:        0f 05   syscall
    0x000000323d4ba7c4 <__libc_fork+164>:        48 3d 00 f0 ff ff       cmp    $0xfffffffffffff000,%rax
 => 0x000000323d4ba7ca <__libc_fork+170>:        0f 87 2b 01 00 00       ja     0x323d4ba8fb <__libc_fork+475>

Notice how the third "si" didn't actually make progress.

Turning on infrun and lin-lwp debug, we see:

 (gdb)
 infrun: clear_proceed_status_thread (process 5252)
 infrun: proceed (addr=0xffffffffffffffff, signal=144, step=1)
 infrun: resume (step=1, signal=0), trap_expected=0, current thread [process 5252] at 0x323d4ba7c4
 LLR: Preparing to step process 5252, 0, inferior_ptid process 5252
 RC: Not resuming sibling process 5252 (not stopped)
 LLR: PTRACE_SINGLESTEP process 5252, 0 (resume event thread)
 sigchld
 infrun: wait_for_inferior ()
 linux_nat_wait: [process -1], []
 LLW: enter
 LNW: waitpid(-1, ...) returned 5252, No child processes
 LLW: waitpid 5252 received Child exited (stopped)
 LLW: Candidate event Child exited (stopped) in process 5252.
 SEL: Select single-step process 5252
 LLW: exit
 infrun: target_wait (-1, status) =
 infrun:   5252 [process 5252],
 infrun:   status->kind = stopped, signal = SIGCHLD
 infrun: infwait_normal_state
 infrun: TARGET_WAITKIND_STOPPED
 infrun: stop_pc = 0x323d4ba7c4
 infrun: random signal 20
 infrun: stepi/nexti
 infrun: stop_stepping

So the inferior got a SIGCHLD (because the fork child exited while
we're doing 'si'), and since that signal is set to "nostop noprint
pass" (by default), it's considered a random signal, so it should not
cause a stop.  But, it resulted in an immediate a stop_stepping call
anyway.  So the single-step never really finished.

This is a regression caused by:

 [[PATCH] Do not respawn signals, take 2.]
 https://sourceware.org/ml/gdb-patches/2012-06/msg00702.html

Specifically, caused by this change (as mentioned in the "the lost
step issue first" part of that mail):

 diff --git a/gdb/infrun.c b/gdb/infrun.c
 index 53db335..3e8dbc8 100644
 --- a/gdb/infrun.c
 +++ b/gdb/infrun.c
 @@ -4363,10 +4363,8 @@ process_event_stop_test:
    (leaving the inferior at the step-resume-breakpoint without
    actually executing it).  Either way continue until the
    breakpoint is really hit.  */
 -      keep_going (ecs);
 -      return;
      }
 -
 +  else
    /* Handle cases caused by hitting a breakpoint.  */
    {

That made GDB fall through to the

>   /* In all-stop mode, if we're currently stepping but have stopped in
>   some other thread, we need to switch back to the stepped thread.  */
>  if (!non_stop)

part.  However, if we don't have a stepped thread to get back to,
we'll now also fall through to all the "stepping" tests.  For line
stepping, that'll turn out okay, as we'll just end up realizing the
thread is still in the stepping range, and needs to be re-stepped.
However, for stepi/nexti, we'll reach:

  if (ecs->event_thread->control.step_range_end == 1)
    {
      /* It is stepi or nexti.  We always want to stop stepping after
         one instruction.  */
      if (debug_infrun)
 fprintf_unfiltered (gdb_stdlog, "infrun: stepi/nexti\n");
      ecs->event_thread->control.stop_step = 1;
      print_end_stepping_range_reason ();
      stop_stepping (ecs);
      return;
    }

and stop, even though the thread actually made no progress.  The fix
is to restore the keep_going call, but put it after the "switch back
to the stepped thread" code, and before the stepping tests.

Tested on x86_64 Fedora 17, native and gdbserver.  New test included.

gdb/
2013-10-18  Pedro Alves  <palves@redhat.com>

PR gdb/16062
* infrun.c (handle_inferior_event): Keep going if we got a random
signal we should not stop for, instead of falling through to the
step tests.

gdb/testsuite/
2013-10-18  Pedro Alves  <palves@redhat.com>

PR gdb/16062
* gdb.threads/stepi-random-signal.c: New file.
* gdb.threads/stepi-random-signal.exp: New file.

11 years ago * config/tc-tic6x.c (tic6x_parse_operand): Revert previous delta.
Nick Clifton [Fri, 18 Oct 2013 14:08:00 +0000 (14:08 +0000)]
* config/tc-tic6x.c (tic6x_parse_operand): Revert previous delta.

11 years ago * ld-cris/asneed1.d: New test.
Hans-Peter Nilsson [Fri, 18 Oct 2013 02:38:35 +0000 (02:38 +0000)]
* ld-cris/asneed1.d: New test.

11 years ago * elf32-cris.c (cris_elf_check_relocs): Don't assume
Hans-Peter Nilsson [Fri, 18 Oct 2013 02:37:51 +0000 (02:37 +0000)]
* elf32-cris.c (cris_elf_check_relocs): Don't assume
a registered dynobj means that a .got has been created.

11 years agogdb/
Yao Qi [Fri, 18 Oct 2013 02:09:57 +0000 (02:09 +0000)]
gdb/

* c-varobj.c (cplus_number_of_children): Fix indentation.

11 years agodaily update
Alan Modra [Thu, 17 Oct 2013 23:00:04 +0000 (23:00 +0000)]
daily update

11 years ago * gdb.mi/mi-breakpoint-changed.exp (test_insert_delete_modify):
Maciej W. Rozycki [Thu, 17 Oct 2013 22:02:29 +0000 (22:02 +0000)]
* gdb.mi/mi-breakpoint-changed.exp (test_insert_delete_modify):
Fix comment typo.
* lib/gdb.exp (gdb_init): Likewise.

11 years agofix for PR gdb/15995
Tom Tromey [Thu, 17 Oct 2013 18:29:28 +0000 (18:29 +0000)]
fix for PR gdb/15995

This patch fixes PR gdb/15995.

The bug here is that gdb's printf command does not flush the output
stream.  This makes a printf that is not newline-terminated interleave
incorrectly with other forms of output, such as that generated via a
call to an external program using "shell".

I note that the "output" command already does this flushing.

The fix is to call gdb_flush in printf_command.

Built and regtested on x86-64 Fedora 18.
New test case included.

PR gdb/15995:
* printcmd.c (printcmd): Call gdb_flush.

* gdb.base/printcmds.exp (test_printf): Test printf flushing.

11 years agoremove unused field from struct elfinfo
Tom Tromey [Thu, 17 Oct 2013 15:41:46 +0000 (15:41 +0000)]
remove unused field from struct elfinfo

I noticed that one field in elfread.c:struct elfinfo is unused.
This patch removes it.

* elfread.c (struct elfinfo) <stabindexsect>: Remove.
(elf_locate_sections): Update.

11 years agoRemove ada-varobj.h.
Yao Qi [Thu, 17 Oct 2013 13:31:33 +0000 (13:31 +0000)]
Remove ada-varobj.h.

As a result of previous patch, extern functions in ada-varobj.c can be
made static, and ada-varobj.h can be removed too.

gdb:

2013-10-17  Yao Qi  <yao@codesourcery.com>

* Makefile.in (HFILES_NO_SRCDIR): Remove ada-varobj.h.
* ada-varobj.c: Remove the include of ada-varobj.h.
(ada_varobj_get_number_of_children): Declare.
(ada_varobj_get_name_of_child): Make it static.
(ada_varobj_get_path_expr_of_child): Likewise.
(ada_varobj_get_value_of_child): Likewise.
(ada_varobj_get_type_of_child): Likewise.
(ada_varobj_get_value_of_array_variable): Likewise.
* ada-varobj.h: Remove.

11 years agogdb/
Yao Qi [Thu, 17 Oct 2013 13:28:37 +0000 (13:28 +0000)]
gdb/

* Makefile.in (SFILES): Add c-varobj.c and jv-varobj.c.
(COMMON_OBS): Add c-varobj.o and jv-varobj.o.
* ada-varobj.c: Include "varobj.h".
(ada_number_of_children): New.  Moved from varobj.c.
(ada_name_of_variable, ada_name_of_child): Likewise.
(ada_path_expr_of_child, ada_value_of_child): Likewise.
(ada_type_of_child, ada_value_of_variable): Likewise.
(ada_value_is_changeable_p, ada_value_has_mutated): Likewise.
(ada_varobj_ops): New.
* c-varobj.c, jv-varobj.c: New file.  Moved from varobj.c.
* gdbtypes.c (get_target_type): New.  Moved from varobj.c.
* gdbtypes.h (get_target_type): Declare.
* varobj.c: Remove the inclusion of "ada-varobj.h" and
"ada-lang.h".
(ANONYMOUS_STRUCT_NAME): Move it to c-varobj.c.
(ANONYMOUS_UNION_NAME): Likewise.
(get_type, get_value_type, get_target_type): Remove declarations.
(value_get_print_value, varobj_value_get_print_value): Likewise.
(c_number_of_children, c_name_of_variable): Likewise.
(c_name_of_child, c_path_expr_of_child): Likewise.
(c_value_of_child, c_type_of_child): Likewise.
(c_value_of_variable, cplus_number_of_children): Likewise.
(cplus_class_num_children, cplus_name_of_variable): Likewise.
(cplus_name_of_child, cplus_path_expr_of_child): Likewise.
(cplus_value_of_child, cplus_type_of_child): Likewise.
(cplus_value_of_variable, java_number_of_children): Likewise.
(java_name_of_variable, java_name_of_child): Likewise.
(java_path_expr_of_child, java_value_of_child): Likewise.
(java_type_of_child, java_value_of_variable): Likewise.
(ada_number_of_children, ada_name_of_variable): Likewise.
(ada_name_of_child, ada_path_expr_of_child): Likewise.
(ada_value_of_child, ada_type_of_child): Likewise.
(ada_value_of_variable, ada_value_is_changeable_p): Likewise.
(ada_value_has_mutated): Likewise.
(struct language_specific): Move it to varobj.h.
(CPLUS_FAKE_CHILD): Move it to varobj.h.
(restrict_range): Rename it varobj_restrict_range.  Make it extern.
Callers update.
(get_path_expr_parent): Rename it to varobj_get_path_expr_parent.
Make it extern.
(is_anonymous_child): Move it to c-varobj.c and rename to
varobj_is_anonymous_child.  Caller update.
(get_type): Move it to c-varobj.c.
(get_value_type): Rename it varobj_get_value_type.  Make it
extern.
(get_target_type): Move it gdbtypes.c.
(varobj_formatted_print_options): New function.
(value_get_print_value): Rename it to
varobj_value_get_print_value and make it extern.
(varobj_value_is_changeable_p): Make it extern.
(adjust_value_for_child_access): Move it to c-varobj.c.
(default_value_is_changeable_p): Rename it to
varobj_default_value_is_changeable_p.  Make it extern.
(c_number_of_children, c_name_of_variable): Move it to c-varobj.c
(c_name_of_child, c_path_expr_of_child): Likewise.
(c_value_of_child, c_type_of_child): Likewise.
(c_value_of_variable, cplus_number_of_children): Likewise.
(cplus_class_num_children, cplus_name_of_variable): Likewise.
(cplus_name_of_child, cplus_path_expr_of_child): Likewise.
(cplus_value_of_child, cplus_type_of_child): Likewise.
(cplus_value_of_variable): Likewise.
(java_number_of_children, java_name_of_variable): Move it to jv-varobj.c.
(java_name_of_child, java_path_expr_of_child): Likewise.
(java_value_of_child, java_type_of_child): Likewise.
(java_value_of_variable): Likewise.
(ada_number_of_children, ada_name_of_variable): Move it to ada-varobj.c.
(ada_name_of_child, ada_path_expr_of_child): Likewise.
(ada_value_of_child, ada_type_of_child): Likewise.
(ada_value_of_variable, ada_value_is_changeable_p): Likewise.
(ada_value_has_mutated): Likewise.
* varobj.h (CPLUS_FAKE_CHILD): New macro, moved from varobj.c.
(struct lang_varobj_ops): New.  Renamed by 'struct language_specific'.
(c_varobj_ops, cplus_varobj_ops): Declare.
(java_varobj_ops, ada_varobj_ops): Declare.
(varobj_default_value_is_changeable_p): Declare.
(varobj_value_is_changeable_p): Declare.
(varobj_get_value_type, varobj_is_anonymous_child): Declare.
(varobj_get_path_expr_parent): Declare.
(varobj_value_get_print_value): Declare.
(varobj_formatted_print_options): Declare.
(varobj_restrict_range): Declare.

11 years ago * target/waitstatus.h (target_waitkind): Remove spurious
Luis Machado [Thu, 17 Oct 2013 10:21:37 +0000 (10:21 +0000)]
* target/waitstatus.h (target_waitkind): Remove spurious
character from the comments.

11 years ago PR 16056
Alan Modra [Thu, 17 Oct 2013 10:05:38 +0000 (10:05 +0000)]
PR 16056
* elf.c (copy_elf_program_header): Only consider SEC_ALLOC sections
when finding lowest_section.

11 years agoDocument the get_longjmp_target gdbarch method.
Joel Brobecker [Thu, 17 Oct 2013 06:11:22 +0000 (06:11 +0000)]
Document the get_longjmp_target gdbarch method.

gdb/ChangeLog:

        * gdbarch.sh (get_longjmp_target): Add method documentation.
        * gdbarch.h: Regenerate.

11 years agodaily update
Alan Modra [Wed, 16 Oct 2013 23:00:05 +0000 (23:00 +0000)]
daily update

11 years ago2013-10-16 Jan-Benedict Glaw <jbglaw@lug-owl.de>
Jan-Benedict Glaw [Wed, 16 Oct 2013 20:45:20 +0000 (20:45 +0000)]
2013-10-16  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

* ChangeLog: Sync from GCC.
* mh-darwin: Ditto.
* bootstrap-ubsan.mk: Ditto.

11 years ago2013-10-16 Jan-Benedict Glaw <jbglaw@lug-owl.de>
Jan-Benedict Glaw [Wed, 16 Oct 2013 20:36:39 +0000 (20:36 +0000)]
2013-10-16  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

* configure.ac: Update from GCC.
* configure: Regenerate.

11 years ago * dbxread.c (read_dbx_symtab) <bss_ext_symbol>: Remove unused
Tom Tromey [Wed, 16 Oct 2013 16:00:23 +0000 (16:00 +0000)]
* dbxread.c (read_dbx_symtab) <bss_ext_symbol>: Remove unused
label.

11 years ago * gcore.in: Call GDB using the full path to the gcore script.
Luis Machado [Wed, 16 Oct 2013 15:08:11 +0000 (15:08 +0000)]
* gcore.in: Call GDB using the full path to the gcore script.
Error out if the GDB binary is not found.

11 years agoThere were two functions who were calling "sizeof" twice.
Sergio Durigan Junior [Wed, 16 Oct 2013 02:55:27 +0000 (02:55 +0000)]
There were two functions who were calling "sizeof" twice.

The first one, dw2_get_real_path from gdb/dwarf2read.c, was actually
making use of OBSTACK_CALLOC which already calls "sizeof" for its third
argument.

The second, download_tracepoint_1 from gdb/gdbserver/tracepoint.c, was
explicitly calling "sizeof" inside another "sizeof".

This patch fixed both functions.

gdb/ChangeLog
2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>

PR gdb/16014
* dwarf2read.c (dw2_get_real_path): Remove unnecessary call to
sizeof.

gdb/gdbserver/ChangeLog
2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>

PR gdb/16014
* tracepoint.c (download_tracepoint_1): Remove unnecessary double
call to sizeof.

11 years agoThis is a simple bug. target_disable_btrace and target_teardown_btrace,
Sergio Durigan Junior [Wed, 16 Oct 2013 02:41:42 +0000 (02:41 +0000)]
This is a simple bug.  target_disable_btrace and target_teardown_btrace,
both from gdb/target.c, do a "return" calling another function.  But both
are marked as void.  Despite the fact that the functions being called are
void as well, this is wrong.  This patch fixes this by calling the functions
and then returning in the next line.

2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>

PR gdb/16042
* target.c (target_disable_btrace): Fix invalid return value for
void function.
(target_teardown_btrace): Likewise.

11 years agomerge from gcc
DJ Delorie [Wed, 16 Oct 2013 00:29:48 +0000 (00:29 +0000)]
merge from gcc

11 years agodaily update
Alan Modra [Tue, 15 Oct 2013 23:00:05 +0000 (23:00 +0000)]
daily update

11 years ago * src-release (do-proto-toplevel): Support subdir-path-prefixed
Hans-Peter Nilsson [Tue, 15 Oct 2013 20:45:52 +0000 (20:45 +0000)]
* src-release (do-proto-toplevel): Support subdir-path-prefixed
files in SUPPORT_FILES.
(SIM_SUPPORT_DIRS): New variable.
(sim.tar.bz2): New rule.

11 years ago * Makefile.in (srcsim): New variable.
Hans-Peter Nilsson [Tue, 15 Oct 2013 20:42:07 +0000 (20:42 +0000)]
* Makefile.in (srcsim): New variable.
(version.c): Adjust call to $(srccom)/create-version.sh as per change.

11 years ago * create-version.sh: Align parameters to match those of
Hans-Peter Nilsson [Tue, 15 Oct 2013 20:40:22 +0000 (20:40 +0000)]
* create-version.sh: Align parameters to match those of
../../gdb/common/create-version.sh.
* Make-common.in (srcsim): New variable.
(version.c): Adjust call to create-version.sh as per above.

11 years agoFix neon vshll disassembly.
Ramana Radhakrishnan [Tue, 15 Oct 2013 13:30:40 +0000 (13:30 +0000)]
Fix neon vshll disassembly.

opcodes/
2013-10-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

* arm-dis.c (neon_opcodes): Adjust print string for vshll.

gas/testsuite/
2013-10-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

* gas/arm/neon-cov.d: Adjust output.

11 years agorevert previous delta.
Nick Clifton [Tue, 15 Oct 2013 08:32:36 +0000 (08:32 +0000)]
revert previous delta.

11 years ago2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
Chao-ying Fu [Mon, 14 Oct 2013 19:06:20 +0000 (19:06 +0000)]
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

* gas/mips/micromips@msa-relax.d, gas/mips/micromips@msa.d,
gas/mips/micromips@msa64.d, gas/mips/msa-relax.d,
gas/mips/msa-relax.l, gas/mips/msa-relax.s,
gas/mips/msa.d, gas/mips/msa.s, gas/mips/msa64.d,
gas/mips/msa64.s: New.
* gas/mips/mips.exp: Run new tests.

11 years ago2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
Chao-ying Fu [Mon, 14 Oct 2013 19:02:00 +0000 (19:02 +0000)]
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

* ld-mips-elf/attr-gnu-8-0.s, ld-mips-elf/attr-gnu-8-1.s,
ld-mips-elf/attr-gnu-8-2.s,
ld-mips-elf/attr-gnu-8-00.d, ld-mips-elf/attr-gnu-8-01.d,
ld-mips-elf/attr-gnu-8-02.d, ld-mips-elf/attr-gnu-8-10.d,
ld-mips-elf/attr-gnu-8-11.d, ld-mips-elf/attr-gnu-8-12.d,
ld-mips-elf/attr-gnu-8-20.d, ld-mips-elf/attr-gnu-8-21.d,
ld-mips-elf/attr-gnu-8-22.d: New.
* ld-mips-elf/mips-elf.exp: Run new tests.

11 years ago2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
Chao-ying Fu [Mon, 14 Oct 2013 18:58:15 +0000 (18:58 +0000)]
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

* micromips-opc.c (decode_micromips_operand): Add +T, +U, +V, +W,
+d, +e, +h, +k, +l, +n, +o, +u, +v, +w, +x,
+~, +!, +@, +#, +$, +%, +^, +&, +*, +|.
(MSA): New define.
(MSA64): New define.
(micromips_opcodes): Add MSA instructions.
* mips-dis.c (msa_control_names): New array.
(mips_abi_choice): Add ASE_MSA to mips32r2.
Remove ASE_MDMX from mips64r2.
Add ASE_MSA and ASE_MSA64 to mips64r2.
(parse_mips_dis_option): Handle -Mmsa.
(print_reg): Handle cases for OP_REG_MSA and OP_REG_MSA_CTRL.
(print_insn_arg): Handle cases for OP_IMM_INDEX and OP_REG_INDEX.
(print_mips_disassembler_options): Print -Mmsa.
* mips-opc.c (decode_mips_operand): Add +T, +U, +V, +W, +d, +e, +h, +k,
+l, +n, +o, +u, +v, +w, +~, +!, +@, +#, +$, +%, +^, +&, +*, +|.
(MSA): New define.
(MSA64): New define.
(mips_builtin_op): Add MSA instructions.

11 years ago2013-10-14 Richard Sandiford <rdsandiford@googlemail.com>
Chao-ying Fu [Mon, 14 Oct 2013 18:50:54 +0000 (18:50 +0000)]
2013-10-14  Richard Sandiford  <rdsandiford@googlemail.com>
    Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

* config/tc-mips.c (options): Add OPTION_MSA and OPTION_NO_MSA.
(md_longopts): Add mmsa and mno-msa.
(mips_ases): Add msa.
(RTYPE_MASK): Update.
(RTYPE_MSA): New define.
(OT_REG_ELEMENT): Replace with...
(OT_INTEGER_INDEX, OT_REG_INDEX): ...these new operand types.
(mips_operand_token): Replace reg_element with index.
(mips_parse_argument_token): Treat vector indices as separate tokens.
Handle register indices.
(md_begin): Add MSA register names.
(operand_reg_mask): Handle cases for OP_IMM_INDEX and OP_REG_INDEX.
(convert_reg_type): Handle cases for OP_REG_MSA and OP_REG_MSA_CTRL.
(match_mdmx_imm_reg_operand): Update accordingly.
(match_imm_index_operand): New function.
(match_reg_index_operand): New function.
(match_operand): Handle cases for OP_IMM_INDEX and OP_REG_INDEX.
(md_convert_frag): Convert bz.b/h/w/d, bnz.b/h/w/d, bz.v bnz.v.
(md_show_usage): Print -mmsa and -mno-msa.
* doc/as.texinfo: Document -mmsa and -mno-msa.
* doc/c-mips.texi: Document -mmsa and -mno-msa.
Document .set msa and .set nomsa.

11 years ago2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
Chao-ying Fu [Mon, 14 Oct 2013 18:45:46 +0000 (18:45 +0000)]
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

* readelf.c (display_mips_gnu_attribute): Support Tag_GNU_MIPS_ABI_MSA.
* doc/binutils.texi: Document -Mmsa disassembler option.

11 years ago2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
Chao-ying Fu [Mon, 14 Oct 2013 18:43:39 +0000 (18:43 +0000)]
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

* elfxx-mips.c (mips_elf_obj_tdata): Add abi_msa_bfd.
(mips_elf_merge_obj_attributes): Set abi_msa_bfd to the first object
file that has a Tag_GNU_MIPS_ABI_MSA attribute.
Merge Tag_GNU_MIPS_ABI_MSA attributes.

11 years ago2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
Chao-ying Fu [Mon, 14 Oct 2013 18:41:17 +0000 (18:41 +0000)]
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

* mips.h (mips_operand_type): Add OP_IMM_INDEX and OP_REG_INDEX.
(mips_reg_operand_type): Add OP_REG_MSA and OP_REG_MSA_CTRL.
For MIPS, add comments for +d, +e, +h, +k, +l, +n, +o, +u, +v, +w,
+T, +U, +V, +W, +~, +!, +@, +#, +$, +%, +^, +&, +*, +|.
For MIPS, update extension character sequences after +.
(ASE_MSA): New define.
(ASE_MSA64): New define.
For microMIPS, add comments for +d, +e, +h, +k, +l, +n, +o, +u, +v, +w,
+x, +T, +U, +V, +W, +~, +!, +@, +#, +$, +%, +^, +&, +*, +|.
For microMIPS, update extension character sequences after +.

11 years ago2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
Chao-ying Fu [Mon, 14 Oct 2013 18:37:05 +0000 (18:37 +0000)]
2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

* mips.h (enum): Add Tag_GNU_MIPS_ABI_MSA.
(enum): Add Val_GNU_MIPS_ABI_MSA_ANY and Val_GNU_MIPS_ABI_MSA_128.

11 years ago * gdb.dwarf2/dwzbuildid.exp (write_dwarf_file): Pass explicit test
Tom Tromey [Mon, 14 Oct 2013 16:20:13 +0000 (16:20 +0000)]
* gdb.dwarf2/dwzbuildid.exp (write_dwarf_file): Pass explicit test
name to gdb_test_no_output.

11 years ago2013-10-14 Jan-Benedict Glaw <jbglaw@lug-owl.de>
Jan-Benedict Glaw [Mon, 14 Oct 2013 12:53:40 +0000 (12:53 +0000)]
2013-10-14  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

* readelf.c (decode_arm_unwind): Don't initialize `addr'.

11 years ago * gen-aout.c (main): Fix formatting. Close file.
Nick Clifton [Mon, 14 Oct 2013 09:15:09 +0000 (09:15 +0000)]
* gen-aout.c (main): Fix formatting.  Close file.

* emultempl/aix.em (_read_file): Close file at end of function.

* gas/all/itbl-test.c (main): Close fas.

* read.c (add_include_dir): Use xrealloc.
* config/tc-score.c (do_macro_bcmp): Initialise inst_main.
* config/tc-tic6x.c (tic6x_parse_operand): Initialise second_reg.

* readelf.c (decode_arm_unwind): Initialise addr structure.
(process_symbol_table): Free lengths.
* srcconv.c (wr_sc): Free info.

* chew.c (perform): Free next.

11 years agogdb/
Yao Qi [Mon, 14 Oct 2013 08:16:45 +0000 (08:16 +0000)]
gdb/

* varobj.c (struct varobj): Move most of the fields to
varobj.h.
(struct varobj_dynamic): New struct.
(varobj_get_display_hint) [HAVE_PYTHON]: Adjust.
(varobj_has_more): Likewise.
(dynamic_varobj_has_child_method): Likewise.
(update_dynamic_varobj_children): Likewise.
(varobj_get_num_children): Likewise.
(varobj_list_children, varobj_pretty_printed_p): Likewise.
(install_new_value_visualizer): Likewise.
(install_new_value_visualizer, install_new_value): Likewise.
(varobj_update, new_variable, free_variable): Likewise.
(my_value_of_variable, value_get_print_value): Likewise.
(install_visualizer): Change the type of parameter 'var' to
'struct varobjd_dynamic *'.  Callers update.
* varobj.h (struct varobj): Moved from varobj.c.
(struct varobj) <dynamic>: New field.

11 years ago * output.h (Output_data_got::add_constant): Tidy.
Alan Modra [Mon, 14 Oct 2013 02:53:01 +0000 (02:53 +0000)]
* output.h (Output_data_got::add_constant): Tidy.
(Output_data_got::add_constant_pair): New function.
* powerpc.cc (Output_data_got_powerpc): Override all Output_data_got
methods used so as to first call reserve_ent().

11 years ago2013-10-13 Sandra Loosemore <sandra@codesourcery.com>
Sandra Loosemore [Mon, 14 Oct 2013 01:02:39 +0000 (01:02 +0000)]
2013-10-13  Sandra Loosemore  <sandra@codesourcery.com>

gdb/
* nios2-tdep.c (nios2_reg_names): Use "sstatus" rather than "ba"
as the preferred name of r30.
* nios2-linux-tdep.c (reg_offsets): Likewise.
* features/nios2-cpu.xml: Likewise.
* features/nios2-linux.c: Regenerated.
* features/nios2.c: Regenerated.
* regformats/nios2-linux.dat: Regenerated.

11 years ago2013-10-13 Sandra Loosemore <sandra@codesourcery.com>
Sandra Loosemore [Mon, 14 Oct 2013 00:42:28 +0000 (00:42 +0000)]
2013-10-13  Sandra Loosemore  <sandra@codesourcery.com>

opcodes/
* nios2-opc.c (nios2_builtin_reg): Use "sstatus" rather than "ba"
as the primary name of r30.

gas/
* config/tc-nios2.c (nios2_consume_arg): Make the "ba" warning
also test/refer to "sstatus".  Reformat the warning message.

gas/testsuite/
* gas/nios2/warn_nobreak.l: Update text of warning messages.
* gas/nios2/registers.s: Use "sstatus" rather than "ba"
as the primary name of r30.
* gas/nios2/registers.d: Likewise.

11 years agodaily update
Alan Modra [Sun, 13 Oct 2013 23:00:05 +0000 (23:00 +0000)]
daily update

11 years agoImprove Executable displayed path (PR 15415 regression kind #2)
Jan Kratochvil [Sun, 13 Oct 2013 16:11:08 +0000 (16:11 +0000)]
Improve Executable displayed path (PR 15415 regression kind #2)

gdb/
2013-10-13  Jan Kratochvil  <jan.kratochvil@redhat.com>

Canonicalize directories for EXEC_FILENAME.
* exec.c (exec_file_attach): Use gdb_realpath_keepfile for
exec_filename.
* utils.c (gdb_realpath_keepfile): New function.
* utils.h (gdb_realpath_keepfile): New declaration.

gdb/testsuite/
2013-10-13  Jan Kratochvil  <jan.kratochvil@redhat.com>

Canonicalize directories for EXEC_FILENAME.
* gdb.base/argv0-symlink.exp
(kept file symbolic link name for info inferiors): New.
(kept directory symbolic link name): Setup kfail.
(kept directory symbolic link name for info inferiors): New.