binutils-gdb.git
12 years agogdb/
Yao Qi [Fri, 30 Nov 2012 07:24:48 +0000 (07:24 +0000)]
gdb/
2012-11-30  Yao Qi  <yao@codesourcery.com>

* infrun.c: Make the declaration of 'init_infwait_state'
static.
(init_infwait_state): Make it 'static'.

12 years ago * powerpc.c (Target_powerpc::Scan::global): Don't emit relative
Alan Modra [Fri, 30 Nov 2012 05:01:20 +0000 (05:01 +0000)]
* powerpc.c (Target_powerpc::Scan::global): Don't emit relative
relocs against protected symbols when building 32-bit shared libs.

12 years ago * powerpc.cc (Target_powerpc::make_plt_section): Add symtab
Alan Modra [Fri, 30 Nov 2012 04:50:00 +0000 (04:50 +0000)]
* powerpc.cc (Target_powerpc::make_plt_section): Add symtab
param.  Call got_section() to make .got.  Update all callers
and their callers and so on.

12 years ago * powerpc.cc (Powerpc_relobj::do_scan_relocs): Make STB_LOCAL
Alan Modra [Fri, 30 Nov 2012 04:47:08 +0000 (04:47 +0000)]
* powerpc.cc (Powerpc_relobj::do_scan_relocs): Make STB_LOCAL
_GLOBAL_OFFSET_TABLE_ rather than STB_WEAK.
(Output_data_got_powerpc::make_header): Update _GLOBAL_OFFSET_TABLE_
value if it already exists.

12 years ago*** empty log message ***
gdbadmin [Fri, 30 Nov 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years agoopcodes/
Roland McGrath [Thu, 29 Nov 2012 23:42:03 +0000 (23:42 +0000)]
opcodes/
* s390-mkopc.c (file_header): Add const.

12 years agodaily update
Alan Modra [Thu, 29 Nov 2012 23:00:03 +0000 (23:00 +0000)]
daily update

12 years agoopcodes/Changelog:
Michael Eager [Thu, 29 Nov 2012 21:09:01 +0000 (21:09 +0000)]
opcodes/Changelog:
* microblaze-opc.h: Rename INST_TYPE_RD_R1_SPECIAL to
INST_TYPE_R1_R2_SPECIAL
* microblaze-dis.c (print_insn_microblaze): Same.
gas/Changelog
* gas/config/tc-microblaze.c: Rename INST_TYPE_RD_R1_SPECIAL to
INST_TYPE_R1_R2_SPECIAL, don't set RD for wic.

12 years ago * gdb.base/gnu-debugdata.exp (run, pipeline): Don't use lassign.
Tom Tromey [Thu, 29 Nov 2012 20:53:24 +0000 (20:53 +0000)]
* gdb.base/gnu-debugdata.exp (run, pipeline): Don't use lassign.

12 years ago * python/python.c (finalize_python): Cast unused PyGILState_Ensure
Ulrich Weigand [Thu, 29 Nov 2012 19:11:48 +0000 (19:11 +0000)]
* python/python.c (finalize_python): Cast unused PyGILState_Ensure
return value to void to avoid compiler warning.

12 years agobfd/
Roland McGrath [Thu, 29 Nov 2012 19:07:53 +0000 (19:07 +0000)]
bfd/
* elf-nacl.c (segment_eligible_for_headers): Disallow writable segments.

12 years agoChangeLog:
Ulrich Weigand [Thu, 29 Nov 2012 18:56:23 +0000 (18:56 +0000)]
ChangeLog:

* opencl-lang.c (opencl_print_type): New function.
(opencl_language_arch_info): Install it.

testsuite/ChangeLog:

* gdb.opencl/convs_casts.exp: Always expect standard vector type names.
* gdb.opencl/datatypes.exp: Likewise.
* gdb.opencl/operators.exp: Likewise.
* gdb.opencl/vec_comps.exp: Likewise.

12 years ago * gdb.texinfo (SVR4 Process Information): Document missing
Tom Tromey [Thu, 29 Nov 2012 17:49:20 +0000 (17:49 +0000)]
* gdb.texinfo (SVR4 Process Information): Document missing
"info proc" subcommands.

12 years ago * contrib/ari/gdb_ari.sh: Remove rules for xasprintf and
Tom Tromey [Thu, 29 Nov 2012 17:23:18 +0000 (17:23 +0000)]
* contrib/ari/gdb_ari.sh: Remove rules for xasprintf and
xvasprintf.
* common/common-utils.c (xasprintf, xvasprintf): Remove.
* common/common-utils.h (xasprintf, xvasprintf): Remove.

12 years agoNew testcase for interface type printing.
Jerome Guitton [Thu, 29 Nov 2012 16:30:45 +0000 (16:30 +0000)]
New testcase for interface type printing.

gdb/testsuite/ChangeLog:

        * gdb.ada/iwide: New testcase.

12 years agoStrip interface tags from visible fields
Jerome Guitton [Thu, 29 Nov 2012 16:29:54 +0000 (16:29 +0000)]
Strip interface tags from visible fields

The following Ada type:

   type Circle is new Shape and Drawable with record
        Center : Point;
        Radius : Natural;
   end record;

...is displayed as follow in GDB:

 (gdb) ptype circle
 type = new classes.shape with record
     V51s: ada.tags.interface_tag;
     center: classes.point;
     radius: natural;
 end record

V51s is an internal field that is of no interest for the user. It should
not be displayed.

gdb/ChangeLog:

* ada-lang.c (ada_is_interface_tag): New function.
(ada_is_ignored_field): Add interface tags to the list
of ignored fields.

12 years agoFull view of interface-wide types
Jerome Guitton [Thu, 29 Nov 2012 16:28:10 +0000 (16:28 +0000)]
Full view of interface-wide types

For displaying the full view of a class-wide object, GDB relies on
the assumption that this view will have the same address as the
address of the object. In the case of simple inheritance, this
assumption is correct; the proper type is deduced by decoding
the tag of the object and converting the result to this full-view
type.

Consider for example an abstract class Shape, a child Circle
which implements an interface Drawable, and the corresponding
following objects:

   My_Circle   : Circle := ((1, 2), 3);
   My_Shape    : Shape'Class := Shape'Class (My_Circle);
   My_Drawable : Drawable'Class := Drawable'Class (My_Circle);

To display My_Shape, the debugger first extracts the tag (an internal
field, usually the first one of the record):

 (gdb) p my_shape'address
 $2 = (system.address) 0x8063e28
 (gdb) x/x my_shape'address
 0x8063e28 <classes__my_shape>: 0x08059ec4

Then the type specific data and the expanded name of the tag is read
from there:

 (gdb) p my_shape'tag
 $3 = (access ada.tags.dispatch_table) 0x8059ec4 (classes.circle)

To get the full view, the debugger converts to the corresponding type:

 (gdb) p {classes.circle}0x8063e28
 $4 = (center => (x => 1, y => 2), radius => 3)

Now, in the case of multiple inheritance, the assumption does not hold
anymore. The address that we have usually points to some
place lower. The offset to the original address is saved in the field
Offset_To_Top of the metadata that are above the tag, at address
obj'tag - 8. In the case of my_shape, this offset is 0:

 (gdb) x/x my_shape'tag - 8
 0x8059ebc <classes__circleT+12>:        0x00000000

...but in the case of an interface-wide object, it is not null:

 (gdb) x/x my_drawable'tag - 8
 0x8063b28 <classes__classes__circle_classes__drawable1T56s+12>: 0x00000004
 (gdb) p {classes.circle}(my_drawable'address - 4)
 $7 = (center => (x => 1, y => 2), radius => 3)

The following change handles this relocation in the most common cases.
Remaining cases that are still to be investigated are signaled by
comments.

gdb/ChangeLog:

* ada-lang.h (ada_tag_value_at_base_address): New function
declaration.
* ada-lang.c (is_ada95_tag, ada_tag_value_at_base_address):
New functions.
(ada_to_fixed_type_1, ada_evaluate_subexp): Let ada_tag_base_address
relocate the class-wide value if need be.
(ada_value_struct_elt, ada_value_ind, ada_coerce_ref):
Let ada_tag_value_at_base_address relocate the class-wide access/ref
before dereferencing it.
* ada-valprint.c (ada_val_print_1): Relocate to base address
before displaying the content of an interface-wide ref.

gdb/testsuite/ChangeLog:

        * gdb.ada/ptype_tagged_param.exp: Adjust expected output in
        ptype test.

12 years agoUpdate gdb.ada/variant_record_packed_array
Jerome Guitton [Thu, 29 Nov 2012 16:27:13 +0000 (16:27 +0000)]
Update gdb.ada/variant_record_packed_array

gdb/testsuite/ChangeLog:

* gdb.ada/variant_record_packed_array.exp: Test expressions of the
form {VARIANT_TYPE}ADDRESS.

12 years agoHandle other cases than EVAL_NORMAL in the default case
Jerome Guitton [Thu, 29 Nov 2012 16:26:12 +0000 (16:26 +0000)]
Handle other cases than EVAL_NORMAL in the default case

In the evaluation of an expression in Ada mode, the default case
unwraps the argument unconditionally. For an object of a variant
record type, this unwrapping builds a fixed type from the
specification of the variant type and the actual values of the
object's discriminants.  It means that unwrapping needs the "proper"
value for the object, not just a zero value with the proper type.

When not in EVAL_NORMAL, we cannot assume that the evaluation returns
such a proper value; it may well return a zero value of the
appropriate type e.g in EVAL_AVOID_SIDE_EFFECTS. It is wrong to try to
unwrap in that case.

In particular, a problem shows up when using expression of the form
{VARIANT_TYPE}OBJ. GDB first evaluates this expression in
EVAL_AVOID_SIDE_EFFECTS to compute the type, the evaluation of OBJ
in most cases returns a zero value of its type, and as UNOP_MEMVAL
is mapped to the default case its evaluation ends up trying to
read memory around address 0.

gdb/ChangeLog:

* ada-lang.c (ada_evaluate_subexp): Unwrap only in EVAL_NORMAL.

12 years agoFix attribution for old patch:
Hans-Peter Nilsson [Thu, 29 Nov 2012 14:39:23 +0000 (14:39 +0000)]
Fix attribution for old patch:

2009-10-19  Edgar E. Iglesias  <edgar@axis.com>
    Hans-Peter Nilsson  <hp@axis.com>

* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_DTPREL>:
Don't subtract the size of the TLS block for non-shared objects
from the relocation.

12 years agoGDB 7.5.1 released.
gdbadmin [Thu, 29 Nov 2012 13:12:22 +0000 (13:12 +0000)]
GDB 7.5.1 released.

12 years ago * Makefile.in: Regenerate.
Maciej W. Rozycki [Thu, 29 Nov 2012 11:03:13 +0000 (11:03 +0000)]
* Makefile.in: Regenerate.

12 years agogdb/
Yao Qi [Thu, 29 Nov 2012 07:55:10 +0000 (07:55 +0000)]
gdb/
2012-11-29  Yao Qi  <yao@codesourcery.com>
    Tom Tromey  <tromey@redhat.com>

* eval.c (evaluate_subexp_standard): Get the correct pointer
type for TYPE_CODE_MEMBERPTR.

12 years agogdb/doc/
Yao Qi [Thu, 29 Nov 2012 06:24:24 +0000 (06:24 +0000)]
gdb/doc/
2012-11-29  Yao Qi  <yao@codesourcery.com>

PR gdb/1477.
* gdb.texinfo (Print Settings): Correct the default 'demangle-style'
to 'auto' instead of 'gnu'.

12 years ago*** empty log message ***
gdbadmin [Thu, 29 Nov 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Wed, 28 Nov 2012 23:00:05 +0000 (23:00 +0000)]
daily update

12 years ago2012-11-28 Edjunior Machado <emachado@linux.vnet.ibm.com>
Edjunior Barbosa Machado [Wed, 28 Nov 2012 20:07:19 +0000 (20:07 +0000)]
2012-11-28  Edjunior Machado  <emachado@linux.vnet.ibm.com>

* rs6000-tdep.c (gdb_print_insn_powerpc): Remove info->mach checking,
since now it is being done by binutils' powerpc_init_dialect().

12 years ago PR gdb/14290:
Tom Tromey [Wed, 28 Nov 2012 18:48:38 +0000 (18:48 +0000)]
PR gdb/14290:
* solib-darwin.c (gdb_bfd_mach_o_fat_extract): New function.
(darwin_solib_get_all_image_info_addr_at_init, darwin_bfd_open):
Use it.
* gdb_bfd.h (gdb_bfd_mark_parent): Declare.
* gdb_bfd.c (gdb_bfd_mark_parent): New function.
(gdb_bfd_openr_next_archived_file): Use it.

12 years ago gas/
Julian Brown [Wed, 28 Nov 2012 16:53:01 +0000 (16:53 +0000)]
gas/
    * config/tc-arm.c (md_apply_fix): Fix conversion of BL to BLX for
    local targets in Thumb mode.

    gas/testsuite/
    * gas/arm/bl-local-2.s: New test.
    * gas/arm/bl-local-2.d: New.

12 years ago2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
Markus Metzger [Wed, 28 Nov 2012 16:21:58 +0000 (16:21 +0000)]
2012-11-28  Markus Metzger <markus.t.metzger@intel.com>

gdb/
* configure.ac: Check for linux/perf_event.h.
* config.in: Regenerated.
* configure: Regenerated.

gdb/gdbserver/
* configure.ac: Check for linux/perf_event.h.
* config.in: Regenerated.
* configure: Regenerated.

12 years ago * resbin.c (bin_to_res_version): Correct offset
Kai Tietz [Wed, 28 Nov 2012 15:53:37 +0000 (15:53 +0000)]
    * resbin.c (bin_to_res_version):  Correct offset
        and length calculation of resource.
        (get_version_header): Apply alignement of 4 to len.

12 years agogdb/
Yao Qi [Wed, 28 Nov 2012 11:56:15 +0000 (11:56 +0000)]
gdb/
2012-11-28  Yao Qi  <yao@codesourcery.com>

* breakpoint.c (_initialize_breakpoint): Call add_alias_cmd to
abbreviate 'delete tracepoints' to 'delete tr'.
* corefile.c (_initialize_core): Call add_alias_cmd to
abbreviate 'set gnutarget' to 'set g'.
* value.c (_initialize_values): Call add_alias_cmd to abbreviate
'show convenience' to 'show conv'.

12 years agoDisable libsanitizer for non-C++ builds.
Jan-Benedict Glaw [Wed, 28 Nov 2012 11:43:47 +0000 (11:43 +0000)]
Disable libsanitizer for non-C++ builds.

* configure.ac (noconfigdirs): Merge from GCC.
* configure: Regenerate.

12 years ago*** empty log message ***
gdbadmin [Wed, 28 Nov 2012 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Tue, 27 Nov 2012 23:00:05 +0000 (23:00 +0000)]
daily update

12 years agobinutils/testsuite/
Roland McGrath [Tue, 27 Nov 2012 17:26:11 +0000 (17:26 +0000)]
binutils/testsuite/
* lib/binutils-common.exp (is_zlib_supported): New function.
* lib/utils-lib.exp (run_dump_test): If as options include
--compress-debug-sections and zlib is not available, report
the test as unsupported.
* binutils-all/compress.exp: Bail out if zlib is not available.
* binutils-all/objdump.exp (objdump compressed debug):
Mark unsupported if zlib is not available.
* binutils-all/readelf.exp (readelf_compressed_wa_test): Likewise.

gas/testsuite/
* lib/gas-defs.exp (run_dump_test): If as options include
--compress-debug-sections and zlib is not available, report
the test as unsupported.

ld/testsuite/
* ld-elf/compress.exp: Bail out if zlib is not supported.
* lib/ld-lib.exp (run_dump_test): If as options include
--compress-debug-sections and zlib is not available, report
the test as unsupported.

12 years agold/testsuite/
Roland McGrath [Tue, 27 Nov 2012 17:20:29 +0000 (17:20 +0000)]
ld/testsuite/
* ld-elf/flags1.d: Add *-*-nacl* to xfail list.
* ld-elf/orphan-region.d: Likewise.

12 years ago PR ld/14776
Nick Clifton [Tue, 27 Nov 2012 17:04:30 +0000 (17:04 +0000)]
PR ld/14776
* ld.texinfo: Fix spelling mistakes.

12 years agoFix sparc-solaris build failure (sparc-sol2-nat.c)
Joel Brobecker [Tue, 27 Nov 2012 14:09:13 +0000 (14:09 +0000)]
Fix sparc-solaris build failure (sparc-sol2-nat.c)

Hello,

The recent patch for %fsr handling had a couple of tiny mistakes
that cause the build to fail on sparc-solaris.  Fixed thusly.

gdb/ChangeLog:

        * sparc-sol2-nat.c (supply_gregset): Fix first parameter in
        call to sparc_supply_fpregset.
        (fill_fpregset): Fix first parameter in call to
        sparc_collect_fpregset.

Tested on sparc-solaris by rebuilding GDB.  Will check it in.

Thanks,
--
Joel

12 years agogdb/
Yao Qi [Tue, 27 Nov 2012 08:11:59 +0000 (08:11 +0000)]
gdb/
2012-11-27  Daniel Jacobowitz  <dan@codesourcery.com>
    Kazu Hirata  <kazu@codesourcery.com>
    Yao Qi  <yao@codesourcery.com>

* objfiles.c (init_entry_point_info): Call
gdbarch_convert_from_func_ptr_addr and
gdbarch_addr_bits_remove here ...
(entry_point_address_query): ... instead of here.
* solib-svr4.c (exec_entry_point): Call
gdbarch_addr_bits_remove.
* symfile.c (generic_load): Call gdbarch_addr_bits_remove on
the entry address.

12 years agogdb/
Yao Qi [Tue, 27 Nov 2012 07:59:12 +0000 (07:59 +0000)]
gdb/
2012-11-27  Daniel Jacobowitz  <dan@codesourcery.com>
    Yao Qi  <yao@codesourcery.com>

* eval.c (evaluate_subexp_standard): Add handling of
TYPE_CODE_MEMBERPTR when calling functions.  Correct the
result of ptype for calling a TYPE_CODE_METHODPTR.

gdb/testsuite/
2012-11-27  Daniel Jacobowitz  <dan@codesourcery.com>

* gdb.cp/member-ptr.cc (class Diamond): Add func_ptr.
(func): New function.
(main): Initialize diamond.func_ptr and add diamond_pfunc_ptr.
* gdb.cp/member-ptr.exp: Add new tests for ptype and for
pointers to members with pointer-to-function type.

12 years agogdb/
Yao Qi [Tue, 27 Nov 2012 07:41:43 +0000 (07:41 +0000)]
gdb/
2012-11-27  Yao Qi  <yao@codesourcery.com>

* symtab.c (symtab_symbol_info): Fix a -Wformat-extra-args
warning.
Add i18n markup.

12 years ago*** empty log message ***
gdbadmin [Tue, 27 Nov 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years agold/
Roland McGrath [Mon, 26 Nov 2012 23:26:35 +0000 (23:26 +0000)]
ld/
* emultempl/aarch64elf.em (gld${EMULATION_NAME}_before_parse):
Copy last elf32.em here too.
* emultempl/armelf.em (gld${EMULATION_NAME}_before_parse): Likewise.
* emultempl/mmixelf.em (gld${EMULATION_NAME}_before_parse): Likewise.
* emultempl/scoreelf.em (gld${EMULATION_NAME}_before_parse): Likewise.

12 years agodaily update
Alan Modra [Mon, 26 Nov 2012 23:00:10 +0000 (23:00 +0000)]
daily update

12 years ago2012-11-26 Alexander Larsson <alexl@redhat.com>
Tom Tromey [Mon, 26 Nov 2012 22:31:29 +0000 (22:31 +0000)]
2012-11-26  Alexander Larsson  <alexl@redhat.com>
    Jan Kratochvil  <jan.kratochvil@redhat.com>
    Tom Tromey  <tromey@redhat.com>

* NEWS: Mention mini debuginfo feature.
* minidebug.c: New file.
* configure.ac: Check for lzma.
* configure, config.in: Rebuild.
* Makefile.in (LIBLZMA): New variable.
(CLIBS): Include LIBLZMA.
(SFILES): Mention minidebug.c.
(COMMON_OBS): Mention minidebug.o.
* symfile.c (read_symbols): New function.
(syms_from_objfile, reread_symbols): Call it.
* symfile.h (find_separate_debug_file_in_section): Declare.
doc
* gdb.texinfo (MiniDebugInfo): New node.
(GDB Files): Update.
testsuite
* gdb.base/gnu-debugdata.exp: New file.
* gdb.base/gnu-debugdata.c: New file.
* lib/gdb.exp (gdb_file_cmd): Handle LZMA warning.
(gdb_unload): Return 0 on success.

12 years ago2012-11-26 Alexander Larsson <alexl@redhat.com>
Tom Tromey [Mon, 26 Nov 2012 19:23:56 +0000 (19:23 +0000)]
2012-11-26  Alexander Larsson  <alexl@redhat.com>
    Jan Kratochvil  <jan.kratochvil@redhat.com>
    Tom Tromey  <tromey@redhat.com>

* NEWS: Mention mini debuginfo feature.
* minidebug.c: New file.
* configure.ac: Check for lzma.
* configure, config.in: Rebuild.
* Makefile.in (LIBLZMA): New variable.
(CLIBS): Include LIBLZMA.
(SFILES): Mention minidebug.c.
(COMMON_OBS): Mention minidebug.o.
* symfile.c (read_symbols): New function.
(syms_from_objfile, reread_symbols): Call it.
* symfile.h (find_separate_debug_file_in_section): Declare.
doc
* gdb.texinfo (MiniDebugInfo): New node.
(GDB Files): Update.
testsuite
* gdb.base/gnu-debugdata.exp: New file.
* gdb.base/gnu-debugdata.c: New file.
* lib/gdb.exp (gdb_file_cmd): Handle LZMA warning.
(gdb_unload): Return 0 on success.

12 years agogdb/testsuite/
Jan Kratochvil [Mon, 26 Nov 2012 18:13:24 +0000 (18:13 +0000)]
gdb/testsuite/
* gdb.base/enumval.exp (print e, print f, print K): XFAIL on GCC <= 4.6.

12 years agobfd/
Roland McGrath [Mon, 26 Nov 2012 17:49:11 +0000 (17:49 +0000)]
bfd/
* elf-nacl.c (nacl_modify_segment_map): Don't crash when INFO is null.

12 years agoDo not crash when calling GDB with empty executable name.
Joel Brobecker [Mon, 26 Nov 2012 17:41:44 +0000 (17:41 +0000)]
Do not crash when calling GDB with empty executable name.

        % gdb -q ''

... or ...

        % gdb -q
        (gdb) file ''

... both cause GDB to crash with an invalid free. This is because
exec_file_attach is attempting to free a string that has not been
allocated. The string is only allocated if openp is successful.
But in the case of this obviously invalid filename, openp fails,
and leaves scratch_pathname uninitialized, thus causing the xfree
to fail.

The fix is to enable the associated cleanup after we have verified
that openp was successful.

gdb/ChangeLog (By Keith Seitz  <keiths@redhat.com>):

        * exec.c (exec_file_attach): Move cleanup after verifying that
        memory has in fact been allocated.

gdb/testsuite/ChangeLog:

        * gdb.base/empty_exe.exp: New testcase.

12 years ago * ada-lang.c (user_select_syms): Use SYMBOL_SYMTAB.
Tom Tromey [Mon, 26 Nov 2012 15:54:29 +0000 (15:54 +0000)]
* ada-lang.c (user_select_syms): Use SYMBOL_SYMTAB.
* dwarf2read.c (dw2_find_symbol_file, fixup_go_packaging): Use
SYMBOL_SYMTAB.
* skip.c (skip_info): Use SYMBOL_SYMTAB.

12 years agogdb/
Pedro Alves [Mon, 26 Nov 2012 14:19:33 +0000 (14:19 +0000)]
gdb/
2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
    Pedro Alves  <palves@redhat.com>

* common/linux-osdata.c (linux_xfer_osdata_fds): Decrease buffer
size parameter passed to readlink by one byte.
* fbsd-nat.c (fbsd_pid_to_exec_file): Ditto.
* linux-nat.c (linux_child_pid_to_exec_file): Ditto.
* nbsd-nat.c (nbsd_pid_to_exec_file): Ditto.
* inf-child.c (inf_child_fileio_readlink): Decrease local buffer's
size by one byte.

gdb/gdbserver/
2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>

* hostio.c (handle_readlink): Decrease buffer size
parameter passed to readlink by one byte.

12 years agogdb/gdbserver/
Yao Qi [Mon, 26 Nov 2012 13:30:07 +0000 (13:30 +0000)]
gdb/gdbserver/
2012-11-26  Yao Qi  <yao@codesourcery.com>

* configure.ac (build_warnings): Append '-Wempty-body'.
* configure: Regenerated.
* linux-low.c (linux_create_inferior): Use braces for empty 'if'
body.

12 years agogdb/
Yao Qi [Mon, 26 Nov 2012 13:26:57 +0000 (13:26 +0000)]
gdb/
2012-11-26  Yao Qi  <yao@codesourcery.com>

* f-valprint.c (f77_create_arrayprint_offset_tbl): Remove
extraneous parentheses.

12 years agogdb/
Yao Qi [Mon, 26 Nov 2012 13:19:18 +0000 (13:19 +0000)]
gdb/
2012-11-26  Yao Qi  <yao@codesourcery.com>

* remote.c (remote_start_remote): Typo fix.

12 years ago*** empty log message ***
gdbadmin [Mon, 26 Nov 2012 00:00:37 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Sun, 25 Nov 2012 23:00:05 +0000 (23:00 +0000)]
daily update

12 years ago*** empty log message ***
gdbadmin [Sun, 25 Nov 2012 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Sat, 24 Nov 2012 23:00:04 +0000 (23:00 +0000)]
daily update

12 years ago*** empty log message ***
gdbadmin [Sat, 24 Nov 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Fri, 23 Nov 2012 23:00:05 +0000 (23:00 +0000)]
daily update

12 years agoFix Sparc %fsr regset offset for BSD and Linux.
David S. Miller [Fri, 23 Nov 2012 20:30:23 +0000 (20:30 +0000)]
Fix Sparc %fsr regset offset for BSD and Linux.

gdb/

* sparc-tdep.h (struct sparc_fpregset): New data structure.
(sparc32_sunos4_fpregset, sparc32_bsd_fpregset,
sparc32_sol2_fpregset): Declare new globals.
(sparc32_supply_fpregset, sparc32_collect_fpregset): Add new
'fpregset' argument.
* sparc64-tdep.h (sparc64_supply_fpregset,
sparc64_collect_fpregset): Likewise.
(sparc64_sol2_fpregset, sparc64_bsd_fpregset): Declare new
globals.
* sparc-nat.h (struct sparc_fpregset): Add forward declaration.
(sparc_fpregset): Declare new global.
(sparc_supply_fpregset, sparc_collect_fpregset): Add new
'fpregset' argument.
* sparc-linux-nat.c (supply_fpregset): Pass sparc_fpregset down
into handler.
(fill_fpregset): Likewise.
(_initialize_sparc_linux_nat): Set sparc_fpregset to
sparc32_bsd_fpregset.
* sparc-linux-tdep.c (sparc32_linux_supply_core_fpregset): Pass
sparc32_bsd_fpregset down into handler.
(sparc32_linux_collect_core_fpregset): Likewise.
* sparc-nat.c (sparc_fpregset): Define.
(sparc_supply_fpregset): Add 'fpregset' argument.
(sparc_collect_fpregset): Likewise.
(sparc_fetch_inferior_registers): Pass sparc_fpregset down
into fpregset handler.
(sparc_store_inferior_registers): Likewise.
(_initialize_sparc_nat): Set sparc_fpregset to
sparc32_sunos4_fpregset if NULL.
* sparc-sol2-nat.c (supply_gregset): Pass sparc_sol2_fpregset
down into handler.
(fill_fpregset): Likewise.
* sparc-sol2-tdep.c (sparc32_sol2_fpregset): Define.
* sparc-tdep.c (sparc32_supply_fpregset): Add fpregset arg and
use it to compute offsets.
(sparc32_collect_fpregset): Likewise.
(sparc32_sunos4_fpregset, sparc32_bsd_fpregset): Define.
* sparc64-linux-nat.c (supply_fpregset): Pass sparc64_bsd_fpregset
down into handler.
(fill_fpregset): Likewise.
* sparc64-linux-tdep.c (sparc64_linux_supply_core_fpregset):
Likewise.
(sparc64_linux_collect_core_fpregset): Likewise.
* sparc64-sol2-tdep.c (sparc64_sol2_fpregset): Define.
* sparc64-tdep.c (sparc64_supply_fpregset): Add fpregset arg and
use it to compute offsets.
(sparc64_collect_fpregset): Likewise.
(sparc64_bsd_fpregset): Define.
* sparc64fbsd-tdep.c (sparc64fbsd_supply_fpregset): Padd
sparc64_bsd_fpregset down into handler.
(sparc64fbsd_collect_fpregset): Likewise.
* sparc64nbsd-nat.c (sparc64nbsd_supply_fpregset): Add fpregset arg
and pass sparc{32,64}_bsd_fpregset down into handler.
(sparc64nbsd_collect_fpregset): Likewise.
* sparc64nbsd-tdep.c (sparc64nbsd_supply_fpregset): Pass
sparc64_bsd_fpregset down into handler.
* sparc64obsd-tdep.c (sparc64obsd_supply_gregset): Likewise.
* sparcnbsd-nat.c (_initialize_sparcnbsd_nat): Set sparc_fpregset
to sparc32_bsd_fpregset.
* sparcnbsd-tdep.c (sparc32nbsd_supply_gregset): Pass
sparc32_bsd_fpregset down into sparc32_supply_fpregset.
(sparc32nbsd_supply_fpregset): Likewise.

12 years agoinclude/opcode/
Alan Modra [Fri, 23 Nov 2012 03:28:13 +0000 (03:28 +0000)]
include/opcode/
* ppc.h (ppc_parse_cpu): Update prototype.
opcodes/
* ppc-dis.c (ppc_parse_cpu): Add "sticky" param.  Track bits
set from ppc_opts.sticky in it.  Delete "retain_mask".
(powerpc_init_dialect): Choose default dialect from info->mach
before parsing -M options.  Handle more bfd_mach_ppc variants.
Update common default to power7.
gas/
* config/tc-ppc.c (sticky): New var.
(md_parse_option, ppc_machine): Update ppc_parse_cpu calls.
gas/testsuite/
* gas/ppc/astest2.d: Pass -Mppc to objdump.
ld/testsuite/
* ld-powerpc/plt1.d: Update for default "at" branch hints.
* ld-powerpc/tlsexe.d: Likewise.
* ld-powerpc/tlsexetoc.d: Likewise.
* ld-powerpc/tlsopt1.d: Likewise.
* ld-powerpc/tlsopt1_32.d: Likewise.
* ld-powerpc/tlsopt2.d: Likewise.
* ld-powerpc/tlsopt2_32.d: Likewise.
* ld-powerpc/tlsopt4.d: Likewise.
* ld-powerpc/tlsopt4_32.d: Likewise.
* ld-powerpc/tlsso.d: Likewise.
* ld-powerpc/tlstocso.d: Likewise.

12 years ago*** empty log message ***
gdbadmin [Fri, 23 Nov 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Thu, 22 Nov 2012 23:00:04 +0000 (23:00 +0000)]
daily update

12 years ago*** empty log message ***
gdbadmin [Thu, 22 Nov 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Wed, 21 Nov 2012 23:00:04 +0000 (23:00 +0000)]
daily update

12 years agoSet output maxpagesize when rewriting program header
H.J. Lu [Wed, 21 Nov 2012 21:31:18 +0000 (21:31 +0000)]
Set output maxpagesize when rewriting program header

bfd/

PR binutils/14493
* elf.c (copy_elf_program_header): When rewriting program
header, set the output maxpagesize to the maximum alignment
of input PT_LOAD segments.

2012-11-21  H.J. Lu  <hongjiu.lu@intel.com>

PR binutils/14493
* ld-elf/maxpage5.d: New file.
* ld-elf/maxpage5.s: Likewise.
* ld-elf/maxpage5.t: Likewise.

12 years agobfd/
Roland McGrath [Wed, 21 Nov 2012 20:13:04 +0000 (20:13 +0000)]
bfd/
* elf-nacl.c (segment_nonexecutable_and_has_contents): Renamed to ...
(segment_eligible_for_headers): ... this.  Take new arguments
MAXPAGESIZE and SIZEOF_HEADERS.  Return false if the first section's
start address doesn't leave space for the headers.
(nacl_modify_segment_map): Update caller.

12 years agold/
Roland McGrath [Wed, 21 Nov 2012 19:56:38 +0000 (19:56 +0000)]
ld/
* ld.h (ld_config_type): New flag member separate_code.
* emultempl/elf32.em
(gld${EMULATION_NAME}_before_parse): Set it based on $SEPARATE_CODE.
* ldlang.c (ldlang_override_segment_assignment): If it's set, then
always return TRUE when SEC_CODE differs between the sections.

12 years ago* ld-elf/comm-data.exp: Add XFAIL for arm*-*-* targets, referring
Roland McGrath [Wed, 21 Nov 2012 19:31:24 +0000 (19:31 +0000)]
* ld-elf/comm-data.exp: Add XFAIL for arm*-*-* targets, referring
to PR ld/13802.

12 years ago * gdbtypes.h (struct cplus_struct_type) <localtype_ptr>: Remove
Tom Tromey [Wed, 21 Nov 2012 18:07:17 +0000 (18:07 +0000)]
* gdbtypes.h (struct cplus_struct_type) <localtype_ptr>: Remove
field.
(TYPE_LOCALTYPE_PTR, TYPE_LOCALTYPE_FILE, TYPE_LOCALTYPE_LINE):
Remove.
* c-typeprint.c (c_type_print_base): Update.

12 years agoAdd swap byte (swapb) and swap halfword (swaph) opcodes.
Michael Eager [Wed, 21 Nov 2012 17:54:11 +0000 (17:54 +0000)]
Add swap byte (swapb) and swap halfword (swaph) opcodes.

binutils/opcodes
          * microblaze-opc.h (op_code_struct): Add swapb, swaph Increase MAX_OPCODES.
          * microblaze-opcm.h (microblaze_instr): Likewise
binutils/gas/testsuite
          * gas/microblaze/allinsn.s: Add swapb, swaph
          * gas/microblaze/allinsn.d: Likewise

12 years agoAdd stack high register and stack low register for MicroBlaze
Michael Eager [Wed, 21 Nov 2012 17:34:14 +0000 (17:34 +0000)]
Add stack high register and stack low register for MicroBlaze
hardware assisted stack protection, stores stack low / stack high limits
for detecting stack overflow / underflow

binutils/opcodes
          * microblaze-opcm.h: Add REG_SLR_MASK, REG_SHR_MASK, REG_SHR and REG_SLR
          * microblaze-dis.c (get_field_special): Handle REG_SLR_MASK and REG_SHR_MASK
binutils/gas
          * config/tc-microblaze.c (parse_reg): Parse REG_SLR, REG_SHR
binutils/gas
          * gas/microblaze/allinsn.s: Test use of SHR, SLR
          * gas/microblaze/allinsn.d: Likewise

12 years agoRevert previous change to i386-tdep.c.
Pedro Alves [Wed, 21 Nov 2012 14:09:10 +0000 (14:09 +0000)]
Revert previous change to i386-tdep.c.

12 years agoRun more tests on x86_64-*-linux-gnu*/i?86-*-linux-gnu
H.J. Lu [Wed, 21 Nov 2012 13:53:23 +0000 (13:53 +0000)]
Run more tests on x86_64-*-linux-gnu*/i?86-*-linux-gnu

* ld-elf/discard1.d: Run on x86_64-*-linux-gnu*.
* ld-elf/discard2.d: Likewise.
* ld-elf/discard3.d: Likewise.
* ld-elf/eh6.d: Likewise.
* ld-elf/maxpage3c.d: Run on i?86-*-linux-gnu.
* ld-elf/maxpage4.d: Likewise.

12 years agoAdded forgotton ChangeLog for previous fix i.e. breakpoint not set properly in case...
Karthik Bhat [Wed, 21 Nov 2012 08:02:13 +0000 (08:02 +0000)]
Added forgotton ChangeLog for previous fix i.e. breakpoint not set properly  in case of clang compiled binary commit

12 years agoFix for incorrect breakpoint set in case of clang compiled binary
Karthik Bhat [Wed, 21 Nov 2012 07:39:02 +0000 (07:39 +0000)]
Fix for incorrect breakpoint set in case of clang compiled binary

12 years agogdb/
Yao Qi [Wed, 21 Nov 2012 00:29:55 +0000 (00:29 +0000)]
gdb/
2012-11-21  Yao Qi  <yao@codesourcery.com>

PR tdep/7438
* gdbarch.sh (smash_text_address): Remove.
* gdbarch.c, gdbarch.h: Regenerate.
* arm-tdep.c (arm_smash_text_address): Remove.
(arm_gdbarch_init): Don't call set_gdbarch_smash_text_address.
* hppa-tdep.c (hppa_smash_text_address): Remove.
(hppa_addr_bits_remove): Rename from hppa_smash_text_address.
(hppa_gdbarch_init): Don't call set_gdbarch_smash_text_address.
Caller update.
* coffread.c (coff_symtab_read): Caller update.
* dbxread.c (process_one_symbol): Likewise.
* elfread.c (record_minimal_symbol): Likewise.
* somread.c (som_symtab_read): Likewise.

12 years ago*** empty log message ***
gdbadmin [Wed, 21 Nov 2012 00:00:36 +0000 (00:00 +0000)]
*** empty log message ***

12 years ago Add forgotten ChangeLog for previous ARI fixes commit
Pierre Muller [Tue, 20 Nov 2012 23:02:29 +0000 (23:02 +0000)]
 Add forgotten ChangeLog for previous ARI fixes commit

12 years agodaily update
Alan Modra [Tue, 20 Nov 2012 23:00:03 +0000 (23:00 +0000)]
daily update

12 years ago ARI fixes: sprintf rule.
Pierre Muller [Tue, 20 Nov 2012 22:51:05 +0000 (22:51 +0000)]
ARI fixes: sprintf rule.
Replace sprintf function calls for char arrays by
calls to xsnprintf calls.
* arm-tdep.c (arm_push_dummy_call): Replace sprintf by xsnprintf.
(arm_dwarf_reg_to_regnum, arm_return_value): Ditto.
(arm_neon_quad_read, arm_pseudo_read): Ditto.
(arm_neon_quad_write, arm_pseudo_write): Ditto.
* breakpoint.c (condition_completer): Ditto.
(create_tracepoint_from_upload): Ditto.
* dwarf2read.c (file_full_name): Ditto.
* gcore.c (gcore_command): Ditto.
* gnu-nat.c (proc_string, gnu_pid_to_str): Ditto.
* go32-nat.c (go32_sysinfo): Ditto.
* interps.c (interp_set): Ditto.
* m32c-tdep.c (make_types): Ditto.
* ppc-linux-nat.c (fetch_register, store_register): Ditto.
* remote-m32r-sdi.c (m32r_open): Ditto.
* sol-thread.c (td_err_string): Ditto.
(td_state_string, solaris_pid_to_str): Ditto.
* symtab.c (gdb_mangle_name): Ditto.
* cli/cli-script.c (execute_control_command): Ditto.
(define_command, document_command): Ditto.
* tui/tui-io.c (tui_rl_display_match_list): Ditto.
* tui/tui-stack.c (tui_make_status_line): Ditto.
* tui/tui-win.c (tui_update_gdb_sizes): Ditto.

12 years agoRemove ref_dynamic_nonweak added by accident
H.J. Lu [Tue, 20 Nov 2012 22:17:27 +0000 (22:17 +0000)]
Remove ref_dynamic_nonweak added by accident

bfd/

2012-11-20  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/14862
* elf-bfd.h (elf_link_hash_entry): Remove ref_dynamic_nonweak
added by accident.
(elf_link_add_object_symbols): Don't set nor check
ref_dynamic_nonweak.

ld/testsuite/

2012-11-20  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/14862
* ld-elf/shared.exp (build_tests): Build libpr14862-1.o and
libpr14862.so.
(run_tests): Test pr14862.

* ld-elf/pr14862-1.c: New file.
* ld-elf/pr14862-2.c: Likewise.
* ld-elf/pr14862.map: Likewise.
* ld-elf/pr14862.out: Likewise.

12 years agoImplement ELF linker -z global option
H.J. Lu [Tue, 20 Nov 2012 22:16:05 +0000 (22:16 +0000)]
Implement ELF linker -z global option

ld/

* ld.texinfo: Document "-z global".

* emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Support
"-z global".
(gld${EMULATION_NAME}_list_options): Likewise.

ld/testsuite/

* ld-elf/global1.d: New file.

12 years agogdb: include help aliases in help command completion
Mike Frysinger [Tue, 20 Nov 2012 21:02:36 +0000 (21:02 +0000)]
gdb: include help aliases in help command completion

There are a bunch of aliases that get used with help, but the current
command completion logic does not include those when doing completions.

Since the framework is already mostly in place, extend complete_on_cmdlist
slightly to pass down the ignore_help_classes flag like is done with the
existing lookup command logic.

Now you can do:
(gdb) help use<tab>
and get back:
(gdb) help user-defined

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years ago * completer.c (count_struct_fields): Remove.
Tom Tromey [Tue, 20 Nov 2012 18:18:39 +0000 (18:18 +0000)]
* completer.c (count_struct_fields): Remove.
(expression_completer): Don't call count_struct_fields.

12 years agogas/
Roland McGrath [Tue, 20 Nov 2012 17:53:46 +0000 (17:53 +0000)]
gas/
* config/tc-arm.c (arm_symbol_chars): New variable.
* config/tc-arm.h (tc_symbol_chars): New macro, defined to that.

gas/testsuite/
* gas/arm/macro-pld.s: New file.
* gas/arm/macro-pld.d: New file.

12 years ago2012-11-20 Pedro Alves <palves@redhat.com>
Pedro Alves [Tue, 20 Nov 2012 17:49:02 +0000 (17:49 +0000)]
2012-11-20  Pedro Alves  <palves@redhat.com>

* annotate.c (breakpoints_changed): Rename to ...
(annotate_breakpoints_changed): ... this.
(annotate_stopped, breakpoint_changed): Adjust caller.
* annotate.h (breakpoints_changed): Rename to ...
(annotate_breakpoints_changed): ... this.
* breakpoint.c (set_breakpoint_condition, breakpoint_set_commands)
(do_map_commands_command, init_raw_breakpoint, clear_command)
(set_ignore_count, enable_breakpoint_disp): Adjust callers.

12 years agoFix 'info os' crashes on sparc.
David S. Miller [Tue, 20 Nov 2012 17:40:28 +0000 (17:40 +0000)]
Fix 'info os' crashes on sparc.

* common/linux-osdata.c (get_number_of_cpu_cores): Delete.
(linux_xfer_osdata_processes): Fetch _SC_NPROCESSORS_ONLN via
sysconf.
(get_cores_used_by_process): Update comment.

12 years agoFix sim build when configured with --enable-plugins
H.J. Lu [Tue, 20 Nov 2012 14:41:26 +0000 (14:41 +0000)]
Fix sim build when configured with --enable-plugins

* common/Make-common.in: Use lt_cv_dlopen_libs under PLUGINS
condition.
* common/acinclude.m4: Define lt_cv_dlopen_libs.
* arm/configure: Regenerate.
* avr/configure: Regenerate.
* bfin/configure: Regenerate.
* common/configure: Regenerate.
* cr16/configure: Regenerate.
* cris/configure: Regenerate.
* d10v/configure: Regenerate.
* erc32/configure: Regenerate.
* frv/configure: Regenerate.
* h8300/configure: Regenerate.
* igen/configure: Regenerate.
* iq2000/configure: Regenerate.
* lm32/configure: Regenerate.
* m32c/configure: Regenerate.
* m32r/configure: Regenerate.
* m68hc11/configure: Regenerate.
* mcore/configure: Regenerate.
* microblaze/configure: Regenerate.
* mips/configure: Regenerate.
* mn10300/configure: Regenerate.
* moxie/configure: Regenerate.
* ppc/configure: Regenerate.
* rl78/configure: Regenerate.
* rx/configure: Regenerate.
* sh/configure: Regenerate.
* sh64/configure: Regenerate.
* testsuite/configure: Regenerate.
* v850/configure: Regenerate.

12 years agoFix opcode for 64-bit jecxz
H.J. Lu [Tue, 20 Nov 2012 14:21:33 +0000 (14:21 +0000)]
Fix opcode for 64-bit jecxz

gas/testsuite/

PR gas/14859
* gas/i386/x86-64-opcode.s: Add jecxz.
* gas/i386/x86-64-opcode.d: Updated.

opcodes/

PR gas/14859
* i386-opc.tbl: Fix opcode for 64-bit jecxz.
* i386-tbl.h: Regenerated.

12 years ago2012-11-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
Andreas Krebbel [Tue, 20 Nov 2012 11:58:30 +0000 (11:58 +0000)]
2012-11-20  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* s390-opc.txt: Fix srstu and strag opcodes.

2012-11-20  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* gas/s390/zarch-z9-109.d: Fix srstu opcode.
* gas/s390/zarch-z900.d: Replace lasp with strag.

12 years agogas/ChangeLog
Yufeng Zhang [Tue, 20 Nov 2012 10:29:00 +0000 (10:29 +0000)]
gas/ChangeLog

2012-11-20  Yufeng Zhang  <yufeng.zhang@arm.com>

* config/tc-aarch64.c (first_error_fmt): Add ATTRIBUTE_UNUSED to the
local variable "ret".

12 years agoFix sparc bitness overrides in GAS. Noticed by Eric Botcazou.
David S. Miller [Tue, 20 Nov 2012 08:37:52 +0000 (08:37 +0000)]
Fix sparc bitness overrides in GAS.  Noticed by Eric Botcazou.

gas/

* config/tc-sparc.c (md_parse_option): Only certain arch
specifications should override the object to be 32-bit
or 64-bit.

12 years agogdb/
Yao Qi [Tue, 20 Nov 2012 06:47:25 +0000 (06:47 +0000)]
gdb/
2012-11-20  Yao Qi  <yao@codesourcery.com>

* objfiles.c (init_entry_point_info): Remove trailing spaces.

12 years agoFix TLS to LE optimization for x32
H.J. Lu [Tue, 20 Nov 2012 05:56:06 +0000 (05:56 +0000)]
Fix TLS to LE optimization for x32

PR gold/14858
* x86_64.cc (Relocate::tls_ld_to_le): Support x32.

12 years agogdb/
Yao Qi [Tue, 20 Nov 2012 03:10:24 +0000 (03:10 +0000)]
gdb/
2012-11-20  Yao Qi  <yao@codesourcery.com>

* infrun.c (handle_inferior_event): Pass 'saved_singlestep_ptid'
to deprecated_context_hook.

12 years agogdb/testsuite/
Yao Qi [Tue, 20 Nov 2012 02:55:10 +0000 (02:55 +0000)]
gdb/testsuite/
2012-11-20  Yao Qi  <yao@codesourcery.com>

* gdb.mi/mi-cmd-param-changed.exp (test_command_param_changed):
Don't test 'maint set show-debug-regs'.
Use command 'set remotecache' instead of
'set circular-trace-buffer'.

12 years ago * elf32-rx.c (rx_elf_print_private_bfd_data): Warning fix.
Alan Modra [Tue, 20 Nov 2012 01:40:00 +0000 (01:40 +0000)]
* elf32-rx.c (rx_elf_print_private_bfd_data): Warning fix.