external/binutils.git
13 years agoDon't compress empty debug sections.
H.J. Lu [Tue, 18 Jan 2011 18:55:59 +0000 (18:55 +0000)]
Don't compress empty debug sections.

gas/

2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>

PR gas/12409
* write.c (compress_debug): Return if section size is 0.

gas/testsuite/

2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>

PR gas/12409
* gas/elf/dwarf2-4.d: New.
* gas/elf/dwarf2-4.s: Likewise.

13 years agoReset dump_sects after processing each archive member.
H.J. Lu [Tue, 18 Jan 2011 17:43:56 +0000 (17:43 +0000)]
Reset dump_sects after processing each archive member.

2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>

PR binutils/12408
* readelf.c (process_archive): Free and reset dump_sects
after processing each archive member.

13 years agoProperly sign-extend byte.
H.J. Lu [Tue, 18 Jan 2011 17:08:13 +0000 (17:08 +0000)]
Properly sign-extend byte.

gas/testsuite/

2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>

* gas/i386/intel.d: Updated.
* gas/i386/opcode-intel.d: Likewise.
* gas/i386/opcode-suffix.d: Likewise.
* gas/i386/opcode.d: Likewise.

opcodes/

2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>

* i386-dis.c (sIbT): New.
(b_T_mode): Likewise.
(dis386): Replace sIb with sIbT on "pushT".
(x86_64_table): Replace sIb with Ib on "aam" and "aad".
(OP_sI): Handle b_T_mode.  Properly sign-extend byte.

13 years agoAdd tbm flag and TBM instruction pattern.
H.J. Lu [Tue, 18 Jan 2011 16:39:50 +0000 (16:39 +0000)]
Add tbm flag and TBM instruction pattern.

2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>

* gas/i386/ilp32/x86-64-arch-2.d: Add tbm flag and TBM instruction
pattern.

13 years agofix printing of Ada wide characters on ppc-aix
Joel Brobecker [Tue, 18 Jan 2011 16:38:59 +0000 (16:38 +0000)]
fix printing of Ada wide characters on ppc-aix

Same problem as before: We were downcasting the character value from
int to unsigned char, which caused an overflow.  The reason why we did
not see this problem before is probably related to the fact that
we're using stabs on AIX and thus characters types are defined as
a TYPE_CODE_INT (or TYPE_CODE_RANGE?).

gdb/ChangeLog:

        * ada-valprint.c (ada_print_scalar): Remove unsigned char downcast.
        (ada_val_print_1): Likewise.

13 years ago[powerpc] breakpoint inserted past function end
Joel Brobecker [Tue, 18 Jan 2011 16:18:26 +0000 (16:18 +0000)]
[powerpc] breakpoint inserted past function end

On powerpc, the prologue scanner reads instruction after instruction,
and just skips instructions that do not affect a frame.  This means
that it does not stop if if finds and unexpected instruction (which
could possibly happen with optimization, I presume). To avoid scanning
too many instructions, it tries to establish an upper limit.

The upper limit is first computed using the debugging (line) info,
but if that fails, it falls back on an arbitrary 100 bytes (or 25
instructions).  The problem is that, if the function is shorter than
those 25 instructions, we run the risk of skipping the entire function
and returning a PC that's outside our function.

In the event where we can find a symbol for a given PC (and therefore
can determine function start and end addresses), but cannot find an
upper limit using skip_prologue_using_sal, then we can at least limit
make sure that the 25 instructions do not put us beyour our function.
If it does, then further reduce the upper-limit to the end of the function.

gdb/ChangeLog:

        * rs6000-tdep.c (rs6000_skip_prologue): Make sure that the prologue
        upper limit address is not greater than the function end address
        when the upper limit could not be computed using the debugging
        info.

13 years agoopcodes/
Jan Kratochvil [Tue, 18 Jan 2011 14:14:46 +0000 (14:14 +0000)]
opcodes/
* i386-init.h: Regenerated.
* i386-tbl.h: Regenerated.

13 years ago Fix compilation for mingw64.
Nick Clifton [Tue, 18 Jan 2011 14:13:43 +0000 (14:13 +0000)]
Fix compilation for mingw64.
* coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
typecast to avoid warning.
* elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
usage.
* elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
of long for pointer to avoid warning.
(elfNN_ia64_relax_brl): Idem.
(elfNN_ia64_install_value): Idem.
* vms-alpha.c (_bfd_vms_slurp_etir): Idem.

13 years ago * config/tc-arm.c (arm_cpus): Add Faraday ARMv5TE compatible
Nick Clifton [Tue, 18 Jan 2011 14:10:44 +0000 (14:10 +0000)]
* config/tc-arm.c (arm_cpus): Add Faraday ARMv5TE compatible
cores: fa606te, fa616te, fmp626.  Modify the VFP of fa626te.
* doc/c-arm.texi (ARM Options): Add -mcpu={fa606te, fa616te,
fmp626} options.

13 years ago PR gas/12390
Nick Clifton [Tue, 18 Jan 2011 13:37:39 +0000 (13:37 +0000)]
PR gas/12390
* doc/all.texi: Add NS32K
* doc/as.texinfo: Remove target specific details of which
characters act as comment initiators and statement separators into
individual target specific files.
* doc/c-alpha.texi (Alpha-Chars): Document special behaviour of
the hash character at the start of a line.
* doc/c-arm.texi (ARM-Chars): Likewise.
* doc/c-avr.texi (AVR-Chars): Likewise.
* doc/c-d10v.texi (D10V-Chars): Likewise.
* doc/c-d30v.texi (D30V-Chars): Likewise.
* doc/c-mmix.texi (MMIX-Chars): Likewise.
* doc/c-s390.texi (s390 characters): Likewise.
* doc/c-sh.texi (SH-Chars): Likewise.
* doc/c-sh64.texi (SH64-Chars): Likewise.
* doc/c-sparc.texi (SPARC-Chars): Likewise.
* doc/c-tic6x.texi (TIC6X Syntax): Likewise.
* doc/c-xtensa.texi (Xtensa Syntax): Likewise.
* doc/c-z80.texi (Z80-Chars): Likewise.
* doc/c-z8k.texi (Z8000-Chars): Likewise.
* doc/c-pdp11.texi (PDP11-Syntax): Document line separator character.
* doc/c-arc.texi (ARC-Chars): Fill in this subsection.
* doc/c-bfin.texi (Blackfin Syntax): Document line comment and
line separator characters.
* doc/c-cr16.texi (CR16 Syntax): Likewise.
* doc/c-i386.texi (i386-Chars): Likewise.
* doc/c-i860.texi (i860-Chars): Likewise.
* doc/c-i960.texi (i960-Chars): Likewise.
* doc/c-ip2k.texi (IP2K-Chars): Likewise.
* doc/c-lm32.texi (LM32-Chars): likewise.
* doc/c-m32c.texi (M32C-Chars): Likewise.
* doc/c-m68hc11.texi (M68HC11-syntax): Likewise.
* doc/c-m68k.texi (M68K-Chars): Likewise.
* doc/c-microblaze.texi (MicroBlaze-Chars): Likewise.
* doc/c-msp430.texi (MSP430-Chars): Likewise.
* doc/c-mt.texi (MT-Chars): Likewise.
* doc/c-ns32k.texi (NS32K-Chars): Likewise.
* doc/c-pj.texi (PJ-Chars): Likewise.
* doc/c-ppc.texi (PowerPC-Chars): Likewise.
* doc/c-rx.texi (RX-Chars): Likewise.
* doc/c-score.texi (SCORE-Chars): Likewise.
* doc/c-tic54x.texi (TIC54X-Chars): Likewise.
* doc/c-v850.texi (V850-Chars): Likewise.
* doc/c-vax.texi (VAX-Chars): Likewise.
* doc/c-xc16x.texi (xc16x-Chars): Likewise.

13 years ago*** empty log message ***
gdbadmin [Tue, 18 Jan 2011 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

13 years agodaily update
Alan Modra [Mon, 17 Jan 2011 23:00:05 +0000 (23:00 +0000)]
daily update

13 years agoAdd TBM testsuite files missing from last commit.
Quentin Neill [Mon, 17 Jan 2011 22:17:16 +0000 (22:17 +0000)]
Add TBM testsuite files missing from last commit.

13 years agoAdd support for TBM instructions.
Quentin Neill [Mon, 17 Jan 2011 18:40:36 +0000 (18:40 +0000)]
Add support for TBM instructions.

gas/

2011-01-17  Quentin Neill  <quentin.neill@amd.com>

* config/tc-i386.c (cpu_arch): Add CPU_TBM_FLAGS.

* doc/c-i386.texi (i386-TBM): New section.

opcodes/

2011-01-17  Quentin Neill  <quentin.neill@amd.com>

* i386-dis.c (REG_XOP_TBM_01): New.
(REG_XOP_TBM_02): New.
(reg_table): Add REG_XOP_TBM_01 and REG_XOP_TBM_02 tables.
(xop_table): Redirect to REG_XOP_TBM_01 and REG_XOP_TBM_02
entries, and add bextr instruction.

* i386-gen.c (cpu_flag_init): Add CPU_TBM_FLAGS, CpuTBM.
(cpu_flags): Add CpuTBM.

* i386-opc.h (CpuTBM) New.
(i386_cpu_flags): Add bit cputbm.

* i386-opc.tbl: Add bextr, blcfill, blci, blcic, blcmsk,
blcs, blsfill, blsic, t1mskc, and tzmsk.

* i386-init.h: Regenerated.
* i386-tbl.h: Regenerated

gas/testsuite

2011-01-17  Quentin Neill  <quentin.neill@amd.com>

* gas/i386/tbm.s: New.
* gas/i386/tbm.d: New.
* gas/i386/tbm-intel.d: New.
* gas/i386/x86-64-tbm.s: New.
* gas/i386/x86-64-tbm.d: New.
* gas/i386/x86-64-tbm-intel.d: New.
* gas/i386/arch-10.d: Add tbm flag and TBM instruction pattern.
* gas/i386/arch-10.s: Add a TBM instruction.
* gas/i386/arch-10-1.l: Add TBM instruction pattern.
* gas/i386/arch-10-2.l: Likewise.
* gas/i386/arch-10-3.l: Likewise.
* gas/i386/arch-10-4.l: Likewise.
* gas/i386/x86-64-arch-2.s: Likewise.
* gas/i386/x86-64-arch-2.d: Likewise.

13 years ago * cli/cli-cmds.c (apropos_command): Free the compiled regex. Use
Tom Tromey [Mon, 17 Jan 2011 16:50:42 +0000 (16:50 +0000)]
* cli/cli-cmds.c (apropos_command): Free the compiled regex.  Use
get_regcomp_error.
* utils.c: Include gdb_regex.h.
(do_regfree_cleanup): New function.
(make_regfree_cleanup): Likewise.
(get_regcomp_error): Likewise.
* gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Declare.

13 years agobfd/
Richard Sandiford [Mon, 17 Jan 2011 16:36:43 +0000 (16:36 +0000)]
bfd/
* elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
h->needs_plt when deciding whether to record a possible dynamic reloc.

ld/testsuite/
* ld-arm/arm-rel32.s, ld-arm/arm-rel32.d: New testcase.
* ld-arm/arm-elf.exp: Run it.

13 years agobfd/
Richard Sandiford [Mon, 17 Jan 2011 16:36:15 +0000 (16:36 +0000)]
bfd/
* elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
dynamic relocs for the removed section.

ld/testsuite/
* ld-arm/gc-thumb-lib.s, ld-arm/gc-thumb.s,
ld-arm/gc-thumb.d: New test.
* ld-arm/arm-elf.exp: Run it.

13 years ago * cli/cli-cmds.c (apropos_command): Fix formatting. Don't call
Tom Tromey [Mon, 17 Jan 2011 16:20:56 +0000 (16:20 +0000)]
* cli/cli-cmds.c (apropos_command): Fix formatting.  Don't call
re_compile_fastmap.

13 years ago * p-exp.y (intvar): New static variable, used to set CURRENT_TYPE
Pierre Muller [Mon, 17 Jan 2011 10:34:51 +0000 (10:34 +0000)]
* p-exp.y (intvar): New static variable, used to set CURRENT_TYPE
for internal variables.
(last_was_structop): New static variable.
(COMPLETE): New token.
(field_exp): New rule to group all '.' suffix handling.
Add mark_struct_expression calls when approriate to be able
to correctly find fields for completion.
(yylex): Adapt to handle field completion and set INTVAR when
required.

13 years ago*** empty log message ***
gdbadmin [Mon, 17 Jan 2011 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

13 years agodaily update
Alan Modra [Sun, 16 Jan 2011 23:00:06 +0000 (23:00 +0000)]
daily update

13 years agoDisallow 64bit relocations in x32 mode.
H.J. Lu [Sun, 16 Jan 2011 17:06:12 +0000 (17:06 +0000)]
Disallow 64bit relocations in x32 mode.

gas/

2011-01-16  H.J. Lu  <hongjiu.lu@intel.com>

* config/tc-i386.c (disallow_64bit_disp): Renamed to ...
(disallow_64bit_reloc): This.
(md_assemble): Don't check movabs for x32 mode here.
(i386_target_format): Updated.
(tc_gen_reloc): Check if 64bit relocations are allowed.

gas/testsuite/

2011-01-16  H.J. Lu  <hongjiu.lu@intel.com>

* gas/i386/ilp32/immed64.s: New.
* gas/i386/ilp32/reloc64.s: Likewise.
* gas/i386/ilp32/x86-64-pcrel.s: Likewise.

* gas/i386/ilp32/inval.s: Add more tests.

* gas/i386/ilp32/immed64.d: Updated.
* gas/i386/ilp32/inval.l: Likewise.
* gas/i386/ilp32/reloc64.d: Likewise.
* gas/i386/ilp32/x86-64-pcrel.d: Likewise.

13 years ago*** empty log message ***
gdbadmin [Sun, 16 Jan 2011 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

13 years agodaily update
Alan Modra [Sat, 15 Jan 2011 23:00:05 +0000 (23:00 +0000)]
daily update

13 years agoUpdate ChangeLog.
H.J. Lu [Sat, 15 Jan 2011 17:25:30 +0000 (17:25 +0000)]
Update ChangeLog.

13 years agoCheck invalid x32 relocations.
H.J. Lu [Sat, 15 Jan 2011 15:49:48 +0000 (15:49 +0000)]
Check invalid x32 relocations.

2011-01-15  H.J. Lu  <hongjiu.lu@intel.com>

* elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
relocations.

13 years agoDon't allow movabs with relocation in x32 mode.
H.J. Lu [Sat, 15 Jan 2011 15:48:02 +0000 (15:48 +0000)]
Don't allow movabs with relocation in x32 mode.

gas/

2011-01-15  H.J. Lu  <hongjiu.lu@intel.com>

* config/tc-i386.c (disallow_64bit_disp): New.
(x86_elf_abi): Replace X86_64_LP64_ABI/X86_64_ILP32_ABI with
X86_64_ABI/X86_64_X32_ABI.
(md_assemble): Don't allow movabs with relocation in x32 mode.
(i386_target_format): Updated.

gas/testsuite/

2011-01-15  H.J. Lu  <hongjiu.lu@intel.com>

* gas/i386/ilp32/ilp32.exp: Run inval.

* gas/i386/ilp32/inval.l: New.
* gas/i386/ilp32/inval.s: Likewise.
* gas/i386/ilp32/x86-64.s: Likewise.

* gas/i386/ilp32/x86-64.d: Don't use ../x86_64.s.  Updated.

13 years agoReplace n32 with x32.
H.J. Lu [Sat, 15 Jan 2011 00:38:35 +0000 (00:38 +0000)]
Replace n32 with x32.

13 years ago*** empty log message ***
gdbadmin [Sat, 15 Jan 2011 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

13 years agoRename --n32 to --x32.
H.J. Lu [Fri, 14 Jan 2011 23:07:11 +0000 (23:07 +0000)]
Rename --n32 to --x32.

gas/

2011-01-14  H.J. Lu  <hongjiu.lu@intel.com>

* config/tc-i386.c (OPTION_N32): Renamed to ...
(OPTION_X32): This.
(md_longopts): Replace n32 with x32.
(md_parse_option): Updated.
(md_show_usage): Likewise.

* doc/c-i386.texi: Replace n32 with x32.

gas/testsuite/

2011-01-14  H.J. Lu  <hongjiu.lu@intel.com>

* gas/i386/ilp32/cfi/ilp32.exp: Replace --n32 with --x32.
* gas/i386/ilp32/elf/ilp32.exp: Likewise.
* gas/i386/ilp32/ilp32.exp: Likewise.
* gas/i386/ilp32/lns/ilp32.exp: Likewise.

ld/testsuite/

2011-01-14  H.J. Lu  <hongjiu.lu@intel.com>

* ld-x86-64/ilp32-1.d: Replace --n32 with --x32.
* ld-x86-64/ilp32-2.d: Likewise.
* ld-x86-64/ilp32-3.d: Likewise.
* ld-x86-64/ilp32-4.d: Likewise.
* ld-x86-64/ilp32-5.d: Likewise.
* ld-x86-64/x86-64.exp: Likewise.

13 years agodaily update
Alan Modra [Fri, 14 Jan 2011 23:00:09 +0000 (23:00 +0000)]
daily update

13 years agoHandle R_X86_64_32 like R_X86_64_64 for ILP32.
H.J. Lu [Fri, 14 Jan 2011 22:48:12 +0000 (22:48 +0000)]
Handle R_X86_64_32 like R_X86_64_64 for ILP32.

bfd/

2011-01-14  H.J. Lu  <hongjiu.lu@intel.com>

* elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
(elf_x86_64_link_hash_table_create): Set pointer_r_type.
(elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
for ILP32.  Remove ABI_64_P PIC check for R_X86_64_8,
R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
(elf_x86_64_relocate_section):  Handle R_X86_64_32 like R_X86_64_64
for ILP32.

ld/testsuite/

2011-01-14  H.J. Lu  <hongjiu.lu@intel.com>

* ld-x86-64/ilp32-5.d: New.
* ld-x86-64/ilp32-5.s: Likewise.

* ld-x86-64/x86-64.exp: Run ilp32-5.

13 years ago2011-01-14 Yao Qi <yao@codesourcery.com>
Yao Qi [Fri, 14 Jan 2011 20:37:13 +0000 (20:37 +0000)]
2011-01-14  Yao Qi  <yao@codesourcery.com>

* arm-tdep.c (arm_register_reggroup_p): FPS register is in
save_reggroup, restore_reggroup and all_reggroup.

13 years agonew testcase printing wchar_t characters and strings
Joel Brobecker [Fri, 14 Jan 2011 19:33:37 +0000 (19:33 +0000)]
new testcase printing wchar_t characters and strings

gdb/testsuite/ChangeLog:

        * gdb.base/wchar.c, gdb.base/wchar.exp: New testcases.

13 years agonew testcase for Ada Wide Wide Characters and Strings
Joel Brobecker [Fri, 14 Jan 2011 19:33:19 +0000 (19:33 +0000)]
new testcase for Ada Wide Wide Characters and Strings

gdb/testsuite/ChangeLog:

        * gdb.ada/widewide: New testcase.

13 years agoFix printing of Wide_Character & Wide_Wide_Character entities.
Joel Brobecker [Fri, 14 Jan 2011 19:32:56 +0000 (19:32 +0000)]
Fix printing of Wide_Character & Wide_Wide_Character entities.

Wide_Characters and Wide_Wide_Characters are incorrectly printed.
Consider for instance:

    Medium : Wide_Character := Wide_Character'Val(16#dead#);

Trying to print the value of this variable yields:

    (gdb) p medium
    $1 = 57005 '["ad"]'

The integer value is correct (57005 = 0xdead), but the character
representation is not, it should be:

    $1 = 57005 '["dead"]'

Same for Wide_Wide_Characters.

There were two issues:
   (a) The first issue was in ada-valprint, where we were assuming
       that character types were 1 byte long;
   (b) The second problem was in c-valprint, where we were down-casting
       the integer value of the character to type `unsigned char',
       causing use to lose all but the lowest byte.

gdb/ChangeLog:

        * ada-valprint. (ada_printchar): Use the correct type length
        in call to ada_emit_char.
        * c-valprint.c (c_val_print): Remove cast in call to LA_PRINT_CHAR.

13 years ago * solib-som.h (hpux_major_release): Declare variable here.
Pierre Muller [Fri, 14 Jan 2011 18:39:31 +0000 (18:39 +0000)]
* solib-som.h (hpux_major_release): Declare variable here.
* solib-som.c:  Remove <sys/utsname.h> header.
(DEFAULT_HPUX_MAJOR_RELEASE): New macro.
(hpux_major_release): Make global, change default value to
DEFAULT_HPUX_MAJOR_RELEASE.
(get_hpux_major_release): Simply return HPUX_MAJOR_RELEASE.
* hppa-hpux-nat.c: Add <sys/utsname.h> include.
Add "solib-som.h" header.
(set_hpux_major_release): New function.
(_initialize_hppa_hpux_nat): Call set_hpux_major_release.

13 years agogdb: extend Linux osabi match
Mike Frysinger [Fri, 14 Jan 2011 18:16:34 +0000 (18:16 +0000)]
gdb: extend Linux osabi match

The current osabi default matching misses all *-uclinux tuples.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agofix ARI warnings introduced by ia64-hpux patches
Joel Brobecker [Fri, 14 Jan 2011 13:53:02 +0000 (13:53 +0000)]
fix ARI warnings introduced by ia64-hpux patches

gdb/ChangeLog:

        * ia64-hpux-nat.c (ia64_hpux_fetch_register): Remove trailing
        new-line at end of warning message.
        (ia64_hpux_store_register): Remove trailing new-line at end of
        error message.
        * ia64-hpux-tdep.c: Rephrase comment.
        * solib-ia64-hpux.c (struct dld_info): Change type of field
        dld_flags from "long long" to ULONGEST.

13 years ago * target.h (deprecated_child_ops): Delete declaration.
Pedro Alves [Fri, 14 Jan 2011 13:47:15 +0000 (13:47 +0000)]
* target.h (deprecated_child_ops): Delete declaration.
* target.c (deprecated_child_ops): Delete definition.

13 years ago gdb/
Pedro Alves [Fri, 14 Jan 2011 13:43:16 +0000 (13:43 +0000)]
gdb/
* Makefile.in (hpux-thread.o): Delete rule.
* configure.ac: Don't check for HPUX DCE threads support.
* configure, config.in: Regenerate.
* hppa-hpux-nat.c (child_suppress_run): Delete.
(hppa_hpux_child_can_run): Delete.
(_initialize_hppa_hpux_nat): Don't override to_can_run.
* hpux-thread.c: Delete.

13 years ago * Makefile.in (hpux-thread.o): Delete rule.
Pedro Alves [Fri, 14 Jan 2011 13:38:24 +0000 (13:38 +0000)]
* Makefile.in (hpux-thread.o): Delete rule.
* configure.ac: Don't check for HPUX DCE threads support.
* configure, config.in: Regenerate.
* hppa-hpux-nat.c (child_suppress_run): Delete.
(hppa_hpux_child_can_run): Delete.
(_initialize_hppa_hpux_nat): Don't override to_can_run.
* hpux-thread.c: Delete.

13 years ago * ldmain.c (main): Flush stdout before and stderr after printing
Alan Modra [Fri, 14 Jan 2011 12:37:17 +0000 (12:37 +0000)]
* ldmain.c (main): Flush stdout before and stderr after printing
message.
* ldmisc.c (einfo): Similarly.
* plugin.c (message): Likewise.
* emultempl/ppc64elf.em: Likewise.
* emultempl/xtensaelf.em: Likewise.
* emulparams/elf32mcore.sh: Use einfo rather than printf.
* emultempl/beos.em: Likewise.
* emultempl/pe.em: Likewise.
* emultempl/pep.em: Likewise.

13 years ago * bfd.c (bfd_perror): Flush stdout before and stderr after printing
Alan Modra [Fri, 14 Jan 2011 12:35:56 +0000 (12:35 +0000)]
* bfd.c (bfd_perror): Flush stdout before and stderr after printing
error.
(_bfd_default_error_handler): Likewise.
* elf.c (print_segment_map): Likewise.
* libbfd.c (warn_deprecated): Likewise.
* som.c (som_sizeof_headers): No need to do so here.
* coff-i860.c: Replace use of printf for error messages with
_bfd_error_handler.
* coff-ppc.c: Likewise.
* coff-sh.c: Likewise.
* elf32-bfin.c: Likewise.
* elf32-dlx.c: Likewise.
* elf32-mep.c: Likewise.
* elf32-v850.c: Likewise.
* mach-o.c: Likewise.
* pef.c: Likewise.

13 years agoFix x86-64 ILP32 shared library.
H.J. Lu [Fri, 14 Jan 2011 04:24:00 +0000 (04:24 +0000)]
Fix x86-64 ILP32 shared library.

bfd/

2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>

* elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
swap_reloca_out.
(elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
(elf_x86_64_check_relocs): Align relocation section to 4 byte
for 32bit.
(elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
ELF_ST_TYPE.
(elf_x86_64_finish_dynamic_symbol): Updated.
(elf_x86_64_finish_dynamic_sections): Don't use
Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
bfd_elf64_swap_dyn_out.

ld/testsuite/

2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>

* ld-x86-64/ilp32-4.d: New.

* ld-x86-64/x86-64.exp: Run ilp32-4.

13 years ago * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
Alan Modra [Fri, 14 Jan 2011 02:27:41 +0000 (02:27 +0000)]
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
attempt to put non-alloc orphans before debug sections, just place
them after .comment.

13 years ago PR ld/12339
Alan Modra [Fri, 14 Jan 2011 02:18:22 +0000 (02:18 +0000)]
PR ld/12339
* ldlang.c (sort_def_symbol): Handle bfd_link_hash_warning symbols.

13 years ago PR ld/12339
Alan Modra [Fri, 14 Jan 2011 02:17:58 +0000 (02:17 +0000)]
PR ld/12339
* elf32-arm.c (allocate_dynrelocs): Don't set up eh before
following bfd_link_hash_warning symbol link.

13 years ago * Makefile.am: Sort emulation rules.
Alan Modra [Fri, 14 Jan 2011 02:03:42 +0000 (02:03 +0000)]
* Makefile.am: Sort emulation rules.
(eelf32am33lin.c): Delete.
(ALL_EMULATION_SOURCES): Sort, add missing entries.
(ALL_64_EMULATION_SOURCES): Likewise.
* Makefile.in: Regenerate.

13 years ago*** empty log message ***
gdbadmin [Fri, 14 Jan 2011 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

13 years agodelete hpux_pid_to_str (unused)
Joel Brobecker [Thu, 13 Jan 2011 23:55:34 +0000 (23:55 +0000)]
delete hpux_pid_to_str (unused)

This function is unused, and the default formatting routine does
just fine, I think.   On pa-hpux:

        [New process 12565, lwp 2513]
        [New process 12565, lwp 2514]

So this patch deletes it.

gdb/ChangeLog:

        * hpux-thread.c (hpux_pid_to_str): Delete.

13 years ago[Ada] Fix printing of Wide_Wide_Strings
Joel Brobecker [Thu, 13 Jan 2011 23:01:22 +0000 (23:01 +0000)]
[Ada] Fix printing of Wide_Wide_Strings

This fixes the printing of Wide_Wide_String objects.  For instance,
consider:

    My_WWS : Wide_Wide_String := " helo";

Before this patch is applied, GDB prints:

    (gdb) print my_wws
    $1 = " ["00"]h["00"]e"

gdb/ChangeLog:

        * ada-valprint.c (ada_emit_char): Remove strange code.
        Check that c is <= UCHAR_MAX before passing it to isascii.
        (char_at): Do not assume that TYPE_LEN is either 1 or 2.

13 years agoproblem sourcing GDB script in interactive-mode on
Joel Brobecker [Thu, 13 Jan 2011 23:01:10 +0000 (23:01 +0000)]
problem sourcing GDB script in interactive-mode on

When interactive-mode is not auto, GDB always uses that setting to
determine whether to act as if the input stream is a terminal or not.
However, this setting should only be honored if the input stream is
the standard input stream.  Otherwise, we run into trouble while
source-ing a GDB script, as shown below (on x86_64-linux):

        % cat script
        print 1
        print 2
        % gdb  -q
        (gdb) set interactive-mode on
        (gdb) source script
        (gdb) print 3
        $1 = 3

The lack of output and the fact that the "print 3" command returned
a value saved in $1 (as opposed to $3) indicates that the script was
not even evaluated at all.

gdb/ChangeLog:

        * top.c (input_from_terminal_p): Restrict the use of interactive_mode
        to the case where instream is stdin.

gdb/testsuite/ChangeLog:

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

13 years agodaily update
Alan Modra [Thu, 13 Jan 2011 23:00:10 +0000 (23:00 +0000)]
daily update

13 years agoBackport from Libtool: Fix relink mode to use absolute path if hardcode_minus_L.
Ralf Wildenhues [Thu, 13 Jan 2011 18:52:53 +0000 (18:52 +0000)]
Backport from Libtool: Fix relink mode to use absolute path if hardcode_minus_L.

/:
* ltmain.sh (relink): Use absolute path when hardcoding with -L.

13 years agoAdd a testcase for PR ld/12356.
H.J. Lu [Thu, 13 Jan 2011 17:07:52 +0000 (17:07 +0000)]
Add a testcase for PR ld/12356.

2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/12356
* ld-scripts/defined.exp: Run defined5.

* ld-scripts/defined5.d: New.
* ld-scripts/defined5.s: Likewise.
* ld-scripts/defined5.t: Likewise.

13 years ago[ia64-hpux] inferior function call support
Joel Brobecker [Thu, 13 Jan 2011 16:24:42 +0000 (16:24 +0000)]
[ia64-hpux] inferior function call support

We have two stacks to deal with on ia64, when making a function call.
The first is the usual stack frame, and the second is the register
stack frame.  On ia64-linux, the register frame is setup by adjusting
the BSP register.  Unfortunately for us, the HP-UX kernel does not allow
the debugger to change the value of the BSP.

To work around that limitation, the method I am using here is to push
some assembly code on the stack. This assembly code contains, among
other things, a call to the alloc insn, which sets up our frame for us.
An extensive comment in ia64-hpux-tdep.c explains the entire procedure.

Despite this approach, most of the code in ia64-tdep.c which sets up
the function call is still applicable - and only a few things need
to be done differently:  For instance, instead of changing the BSP,
we do nothing.  We store the parameters at a different location, etc.
So this patch also adjusts the inf-call code in ia64-tdep.c to make it
a little more extensible: I create a new ia64_infcall_ops structure
which allows an ABI to define how the few things that need to be
differentiated.

Another element that turned out to be necessary but is more of a detail
is that the computation of the linkage pointer needs to be handled
specially for symbols inside shared libraries.  This is especially
visible when calling malloc, which happens everytime memory needs to
be allocated in inferior memory...  The special treatment included
again the necessity to use some routines only available on the host.
So another target object TARGET_OBJECT_HPUX_SOLIB_GOT was created for
that purpose.

gdb/ChangeLog:

        * ia64-tdep.h (struct regcache): Forward declare.
        (struct ia64_infcall_ops): New struct type.
        (struct gdbarch_tdep): New fields "find_global_pointer_from_solib"
        and "infcall_ops".
        * ia64-tdep.c (ia64_find_global_pointer_from_dynamic_section):
        Renames ia64_find_global_pointer.
        (ia64_find_global_pointer, ia64_allocate_new_rse_frame)
        (ia64_store_argument_in_slot, ia64_set_function_addr: New function.
        (ia64_push_dummy_call): Adjust to use the new tdep ia64_infocall_ops
        methods.
        (ia64_infcall_ops): New static global constant.
        (ia64_gdbarch_init): Set tdep->infcall_ops.
        * ia64-hpux-nat.c (ia64_hpux_xfer_solib_got): New function.
        (ia64_hpux_xfer_partial): Add TARGET_OBJECT_HPUX_SOLIB_GOT handing.
        * ia64-hpux-tdep.c: Include "regcache.h", "gdbcore.h" and "inferior.h".
        (ia64_hpux_dummy_code): New static global constant.
        (ia64_hpux_push_dummy_code, ia64_hpux_allocate_new_rse_frame)
        (ia64_hpux_store_argument_in_slot, ia64_hpux_set_function_addr)
        (ia64_hpux_dummy_id, ia64_hpux_find_global_pointer_from_solib):
        New function.
        (ia64_hpux_infcall_ops): New static global constant.
        (ia64_hpux_init_abi): Install gdbarch and tdep methods needed
        for inferior function calls to work properly on ia64-hpux.

13 years ago[ia64-hpux] unwinding bsp value from system call
Joel Brobecker [Thu, 13 Jan 2011 16:24:27 +0000 (16:24 +0000)]
[ia64-hpux] unwinding bsp value from system call

This fixes unwinding from a thread that is stopped inside a system call.
This can be seen when switching to a thread that is stopped doing a
pthread_cond_wait, for instance...

The comments inside the code should explain what is happening in our
case (the HP-UX exception in the case of system calls): Under certain
circumstances (program stopped inside syscall), the offset to apply to
the current BSP in order to compute the previous BSP is not the usual
CFM & 0x7f.

We parts in this patch:

  1. Figuring out that we are stopped inside a syscal: This requires
     a TT_LWP_RUREGS ttrace call, which is not directly possible from
     ia64-tdep.c.  So use defined a new TARGET_OBJECT_HPUX_UREGS object
     to request it from the -nat side.

  2. Add a gdbarch_tdep method that allows us to change the default
     behavior on ia64-hpux, permitting us to have a different "size of
     register frame" in that one particular case.

gdb/ChangeLog:

        * target.h (enum target_object): Add TARGET_OBJECT_HPUX_UREGS.
        * ia64-tdep.h (struct frame_info): forward declaration.
        (struct gdbarch_tdep): Add field size_of_register_frame.
        * ia64-tdep.c (ia64_access_reg): Use tdep->size_of_register_frame
        to determine the size of the register frame.
        (ia64_size_of_register_frame): New function.
        (ia64_gdbarch_init): Set tdep->size_of_register_frame.
        * ia64-hpux-tdep.c: Include "target.h" and "frame.h".
        (IA64_HPUX_UREG_REASON): New macro.
        (ia64_hpux_stopped_in_syscall, ia64_hpux_size_of_register_frame):
        New functions.
        (ia64_hpux_init_abi): Set tdep->size_of_register_frame.
        * ia64-hpux-nat.c (ia64_hpux_xfer_uregs): New function.
        (ia64_hpux_xfer_partial): Add handling of TARGET_OBJECT_HPUX_UREGS
        objects.

13 years agoport GDB to ia64-hpux (native).
Joel Brobecker [Thu, 13 Jan 2011 16:24:13 +0000 (16:24 +0000)]
port GDB to ia64-hpux (native).

ChangeLog:

        * configure.ac: Remove readline, mmalloc, and gdb from noconfigdirs
        for ia64-hpux.
        * configure: Regenerate.

gdb/ChangeLog:

        * config/ia64/hpux.mh, ia64-hpux-nat.c, ia64-hpux-tdep.c,
        ia64-hpux-tdep.h, solib-ia64-hpux.c, solib-ia64-hpux.h: New files.

        * configure.host: Add handling for ia64-hpux hosts.  Add associated
        floatformats.
        * configure.tgt: Add handling for ia64-hpux targets.
        * Makefile.in (ALL_64_TARGET_OBS): Add ia64-hpux-tdep.o.
        (HFILES_NO_SRCDIR): Add ia64-hpux-tdep.h.
        (ALLDEPFILES): Add ia64-hpux-nat.c ia64-hpux-tdep.c.

13 years ago[hpux/ttrace] Determine attached process LWP immediately after attaching.
Joel Brobecker [Thu, 13 Jan 2011 16:23:33 +0000 (16:23 +0000)]
[hpux/ttrace] Determine attached process LWP immediately after attaching.

When attaching to a process, the ttrace interface was creating a ptid
with a null LWP, because it did not have it yet.  This LWP was then
set as soon as we received our first event from our inferior, during
our first wait.  Similarly, the allocation of the thread private info
was also defered.

This works on PA/HP-UX, because we immediately perform a wait to pop
the event triggered by the attach.  We can use that event to extract
the thread's LWP.  But this does not work for IA64/HP-UX, because
the attach no longer triggers an event, and thus a wait should NOT
be performed (such a wait would simply block indefinitely).

It is actually possible, however, to determine the thread's LWP.
This change therefore adjusts the attach code to create a thread with
the correct LWP set, as well as with its private info allocated.
Same thing for all the other threads.

gdb/ChangeLog:

        [ttrace] Compute thread list immediately after attach.
        * inf_ttrace_attach (inf_ttrace_create_threads_after_attach):
        New subprogram.
        (inf_ttrace_attach): Use it.

13 years ago[libunwind-frame] handle functions with no minimal symbol/debug info.
Joel Brobecker [Thu, 13 Jan 2011 16:23:22 +0000 (16:23 +0000)]
[libunwind-frame] handle functions with no minimal symbol/debug info.

This is something that I am seeing on ia64-hpux while trying to
backtrace from a thread that's doing a wait:

    (gdb) task 2
    [Switching to task 2]
    0x9fffffffef52f590 in __ksleep () from /[...]/libc.so.1
    (gdb) bt
    #0  0x9fffffffef52f590 in __ksleep () from /[...]/libc.so.1
    #1  0x9fffffffef73c870 in __sleep_1x1 () from /[...]/libpthread.so.1
    #2  0x9fffffffef738fe0 in __mxn_sleep () from /[...]/libpthread.so.1
    #3  0x9fffffffef675e90 in ?? () from /[...]/libpthread.so.1

The backtrace is incomplete and stops at frame #3, but there are in fact
a few more frames.

The reason why we stopped the backtrace is related to the fact that
we were not able to determine the start address of the function
corresponding to the frame PC.  This is visible at the user level
thanks to the "??" that GDB displayed for frame 3.

We have the following code in libunwind-frame.c:libunwind_frame_cache
which explicitly returns a NULL cache when we couldn't determine the
frame's function address, immediately triggering an end-of-stack
frame_id, thus terminating the backtrace:

   /* We can assume we are unwinding a normal frame.  Even if this is
      for a signal trampoline, ia64 signal "trampolines" use a normal
      subroutine call to start the signal handler.  */
   cache->func_addr = get_frame_func (this_frame);
   if (cache->func_addr == 0
       && get_next_frame (this_frame)
       && get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME)
     return NULL;

As explained in the comment, I think we can still go on, and use
the unwind record to do the debugging.  This change imlements this
change, and allows us to get the full backtrace.

gdb/ChangeLog:

        * libunwind-frame.c (libunwind_frame_cache): Do not return NULL
        if we could not determine the frame's function address.  Instead,
        use the frame's PC, and then continue.

13 years agoMake sure __LITTLE_ENDIAN/__BIG_ENDIAN are defined in libunwind-frame.c
Joel Brobecker [Thu, 13 Jan 2011 16:23:11 +0000 (16:23 +0000)]
Make sure __LITTLE_ENDIAN/__BIG_ENDIAN are defined in libunwind-frame.c

These macros do not seem to exist on ia64-hpux.

gdb/ChangeLog:

        * libunwind-frame.c (__LITTLE_ENDIAN, __BIG_ENDIAN): Define if
        not already defined.

13 years ago[ia64] small integral parameters and return values
Joel Brobecker [Thu, 13 Jan 2011 16:23:00 +0000 (16:23 +0000)]
[ia64] small integral parameters and return values

This patch fixes a small problem on ia64-hpux when calling functions
whose parameter are small integral values (less than 8 bytes).  In
that case, the parameter value was stored on the wrong side of the
register.  Same problem for return values.

With this patch, the results for gdb.base/callfuncs.exp improve from

        # of expected passes            41
        # of unexpected failures        78

To:

        # of expected passes            95
        # of unexpected failures        24

gdb/ChangeLog:

        * ia64-tdep.c (ia64_struct_type_p): New function.
        (ia64_extract_return_value): Handle integral values that are
        less than 8 bytes long.
        (ia64_push_dummy_call): Likewise.

13 years ago[ia64] Add a big-endian version of the ia64-ext floatformat
Joel Brobecker [Thu, 13 Jan 2011 16:22:48 +0000 (16:22 +0000)]
[ia64] Add a big-endian version of the ia64-ext floatformat

ia64-tdep.c defines a floatformats_ia64_ext that should contain
both the little-endian and the big-endian version of the float
format used in the ia64 registers (an 82bit float format).
Right now, both entries point to the same little-endian definition.

A big-endian definition is now necessary for the ia64-hpux port.

gdb/ChangeLog:

        * ia64-tdep.c (floatformat_ia64_ext_little): Renames
        floatformat_ia64_ext.
        (floatformat_ia64_ext_big): New static const.
        (floatformats_ia64_ext): Set first entry to &floatformat_ia64_ext_big.

13 years agoAdd xfail and notarget.
H.J. Lu [Thu, 13 Jan 2011 15:23:59 +0000 (15:23 +0000)]
Add xfail and notarget.

2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>

* ld-scripts/defined4.d: Xfail rs6000-*-aix*.  Skip mips*-*-*
and mmix-*-*.

* ld-scripts/expr2.d: Xfail rs6000-*-aix* and arm-*-*aout.

13 years agoUpdate copyright dates.
Alan Modra [Thu, 13 Jan 2011 13:34:54 +0000 (13:34 +0000)]
Update copyright dates.

13 years ago PR ld/12356
Alan Modra [Thu, 13 Jan 2011 13:29:55 +0000 (13:29 +0000)]
PR ld/12356
* ld.texinfo (Miscellaneous Commands): Describe LD_FEATURE.
(Expression Section): Update.
* ld.h (ld_config_type): Add sane_expr.
* ldgram.y (ifile_p1): Add LD_FEATURE.
* ldlex.l (LD_FEATYRE): New.
* ldemul.c (after_parse_default): Delete code handling ld_compatibility.
* ldexp.h (struct ldexp_control): Delete uses_defined.
* ldexp.c: Remove all uses of uses_defined.
(fold_name): Test config.sane_expr rather than ld_compatibility.
(exp_fold_tree_1): Likewise.  Adjust handling of assignments
during first phase.
* ldlang.h (ld_compatibility): Delete.
(lang_ld_feature): Declare.
* ldlang.c (ld_compatibility): Delete.
(open_input_bfds): Only handle assignments for --defsym.
(lang_ld_feature): New function.

13 years ago PR ld/12356
Alan Modra [Thu, 13 Jan 2011 13:06:22 +0000 (13:06 +0000)]
PR ld/12356
* ldexp.h (exp_assop): Delete.
(exp_assign, exp_defsym): Declare.
* ldexp.c (exp_assop): Make static, handle all assignment variations.
(exp_assign, exp_defsym): New functions.
(exp_provide): Use exp_assop.
* ldgram.y (defsym_expr): Use exp_defsym.
* ldctor.c, * ldgram.y, * ldlang.c, * mri.c, * emultempl/beos.em,
* emultempl/pe.em, * emultempl/pep.em, * emultempl/spuelf.em,
* emultempl/xtensaelf.em: Update exp_assop -> exp_assign.

13 years ago*** empty log message ***
gdbadmin [Thu, 13 Jan 2011 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

13 years agodaily update
Alan Modra [Wed, 12 Jan 2011 23:00:05 +0000 (23:00 +0000)]
daily update

13 years agosim: enable hw_tree_delete in sim_hw_uninstall
Mike Frysinger [Wed, 12 Jan 2011 22:10:46 +0000 (22:10 +0000)]
sim: enable hw_tree_delete in sim_hw_uninstall

I can't find any history for why the call to hw_tree_delete is commented
out, and the VCS history shows that this goes back to the original import
in 2009.  I did find some vague reference to it from 2000 (pretty close
to the original import of code), but no actual details.

Without this call, every new instance of the sim results in all old
previously allocated resources being leaked.  With some devices, this
isn't just memory, it's things like open file descriptors or mmaps.

So if there are pending issues with this, I'd rather we get the sims
sorted out rather than continuing to leak this stuff.  Especially since
the "let's wait for the sims to fix themselves" hasn't actually happened
in the last 10+ years.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosim: check asprintf return values
Mike Frysinger [Wed, 12 Jan 2011 21:58:08 +0000 (21:58 +0000)]
sim: check asprintf return values

These are the last sources of build warnings (asprintf usage) that I see.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agogdb
Tom Tromey [Wed, 12 Jan 2011 21:09:39 +0000 (21:09 +0000)]
gdb
* mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Fix error
messages.
* mi/mi-main.c (mi_cmd_thread_select): Fix error messages.
(mi_cmd_thread_list_ids): Likewise.
(mi_cmd_data_list_changed_registers): Likewise.
(mi_cmd_data_list_register_values): Likewise.
(mi_cmd_data_write_register_values): Likewise.
(mi_cmd_data_evaluate_expression): Likewise.
(mi_cmd_data_read_memory): Likewise.
(mi_cmd_data_read_memory_bytes): Likewise.
(mi_cmd_data_write_memory): Likewise.
(mi_cmd_enable_timings): Likewise.
* mi/mi-interp.c (mi_cmd_interpreter_exec): Fix error messages.
* mi/mi-cmd-var.c (mi_cmd_var_create): Fix error messages.
(mi_cmd_var_delete): Likewise.
(mi_cmd_var_set_format): Likewise.
(mi_cmd_var_show_format): Likewise.
(mi_cmd_var_info_num_children): Likewise.
(mi_cmd_var_list_children): Likewise.
(mi_cmd_var_info_type): Likewise.
(mi_cmd_var_info_expression): Likewise.
(mi_cmd_var_show_attributes): Likewise.
(mi_cmd_var_assign): Likewise.
(mi_cmd_var_update): Likewise.
(mi_cmd_enable_pretty_printing): Likewise.
(mi_cmd_var_set_update_range): Likewise.
* mi/mi-cmd-target.c (mi_cmd_target_file_get): Fix error
messages.
(mi_cmd_target_file_put): Likewise.
(mi_cmd_target_file_delete): Likewise.
* mi/mi-cmd-stack.c (mi_cmd_stack_list_frames): Fix error
messages.
(mi_cmd_stack_info_depth): Likewise.
(mi_cmd_stack_list_locals): Likewise.
(mi_cmd_stack_list_args): Likewise.
(mi_cmd_stack_select_frame): Likewise.
(mi_cmd_stack_select_frame): Likewise.
(mi_cmd_stack_info_frame): Likewise.
* mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file): Fix error
messages.
(mi_cmd_file_list_exec_source_files): Likewise.
* mi/mi-cmd-env.c (mi_cmd_env_pwd): Fix error messages.
(mi_cmd_env_cd): Likewise.
(mi_cmd_env_path): Likewise.
(mi_cmd_env_dir): Likewise.
(mi_cmd_inferior_tty_show): Likewise.
* mi/mi-cmd-disas.c (mi_cmd_disassemble): Fix error messages.
* mi/mi-cmd-break.c (mi_cmd_break_insert): Fix error messages.
(mi_cmd_break_watch): Likewise.
gdb/testsuite
* gdb.mi/gdb2549.exp: Update for error message changes.
* gdb.mi/mi-cli.exp: Likewise.
* gdb.mi/mi-disassemble.exp: Likewise.
* gdb.mi/mi-pthreads.exp: Likewise.
* gdb.mi/mi-regs.exp: Likewise.
* gdb.mi/mi-stack.exp: Likewise.
* gdb.mi/mi-var-block.exp: Likewise.
* gdb.mi/mi-var-cmd.exp: Likewise.
* gdb.mi/mi2-cli.exp: Likewise.
* gdb.mi/mi2-disassemble.exp: Likewise.
* gdb.mi/mi2-pthreads.exp: Likewise.
* gdb.mi/mi2-regs.exp: Likewise.
* gdb.mi/mi2-stack.exp: Likewise.
* gdb.mi/mi2-var-block.exp: Likewise.
* gdb.mi/mi2-var-cmd.exp: Likewise.

13 years ago2011-01-12 Thiago Jung Bauermann <bauerman@br.ibm.com>
Thiago Jung Bauermann [Wed, 12 Jan 2011 20:09:53 +0000 (20:09 +0000)]
2011-01-12  Thiago Jung Bauermann  <bauerman@br.ibm.com>

* ppc-linux-nat.c (booke_cmp_hw_point): Fix whitespace.
(ppc_linux_insert_hw_breakpoint): Likewise.
(ppc_linux_remove_hw_breakpoint): Likewise.
(ppc_linux_insert_watchpoint): Likewise.

13 years agomerge from gcc
DJ Delorie [Wed, 12 Jan 2011 19:04:47 +0000 (19:04 +0000)]
merge from gcc

13 years agogdb/
Jan Kratochvil [Wed, 12 Jan 2011 16:16:24 +0000 (16:16 +0000)]
gdb/
PR fortran/11104 and DWARF unbound arrays detection.
* dwarf2read.c (read_subrange_type): Set zero length on unspecified
upper bound.  Set TYPE_HIGH_BOUND_UNDEFINED if not language_ada on
unspecified upper bound.
* eval.c (evaluate_subexp_standard) <multi_f77_subscript>: Remove
variables array_size_array, tmp_type and offset_item.  New variable
array.  Remove call to f77_get_upperbound.  New variables array_type
and index.  Call value_subscripted_rvalue for each dimenasion.  Remove
the final call to deprecated_set_value_type.

gdb/testsuite/
PR fortran/11104 and DWARF unbound arrays detection.
* gdb.fortran/multi-dim.exp: New file.
* gdb.fortran/multi-dim.f90: New file.

13 years agogdb/
Jan Kratochvil [Wed, 12 Jan 2011 16:10:05 +0000 (16:10 +0000)]
gdb/
Make value allocations more lazy.
* ada-lang.c (coerce_unspec_val_to_type): Use allocate_value_lazy
instead of allocate_value and set_value_lazy when possible.
* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use allocate_value_lazy
instead of allocate_value and set_value_lazy.
* findvar.c (value_of_register_lazy): Likewise.
(read_var_value): Remove V preallocation, call just check_typedef in
advance.  Move allocate_value to LOC_CONST, LOC_LABEL,
LOC_CONST_BYTES.  Use allocate_value_lazy in LOC_STATIC, LOC_ARG,
LOC_REF_ARG, LOC_LOCAL, LOC_BLOCK.  Set ADDR instead of
set_value_address and break in LOC_BLOCK.  Use allocate_value_lazy and
remove lval_memory set in LOC_REGPARM_ADDR.  Use allocate_value_lazy
in LOC_UNRESOLVED and LOC_OPTIMIZED_OUT.  Add setting lval_memory at
the end, remove set_value_lazy there.
* valarith.c (value_subscripted_rvalue): Use allocate_value_lazy
instead of allocate_value and set_value_lazy when possible.
* valops.c (value_fetch_lazy): Do nop for value_optimized_out VAL.
* value.c (allocate_computed_value): Use allocate_value_lazy instead
of allocate_value and set_value_lazy.
(value_from_contents_and_address): Use allocate_value_lazy instead of
allocate_value and set_value_lazy when possible.

13 years agohttp://sourceware.org/ml/gdb-patches/2010-12/msg00299.html
Andrew Burgess [Wed, 12 Jan 2011 15:02:12 +0000 (15:02 +0000)]
sourceware.org/ml/gdb-patches/2010-12/msg00299.html
gdb/
        * disasm.c (dump_insns): Support dumping opcodes for MI.
        * mi/mi-cmd-disas.c (mi_cmd_disassemble): Allow mode to control
        dumping of instruction opcodes.

gdb/doc/
        * gdb.texinfo (GDB/MI Data Manipulation): Update to reflect
        changes in mi/mi-cmd-disas.c

gdb/testsuite/
        * gdb.mi/mi-disassemble.exp, gdb.mi/mi2-disassemble.exp: Update
        expected output to reflect changes in gdb/mi/mi-cmd-disas.c and
        add new tests for opcode dumping.

13 years ago * gdb.texinfo (Threads): Remove duplicate text. Update examples.
Tom Tromey [Wed, 12 Jan 2011 14:30:45 +0000 (14:30 +0000)]
* gdb.texinfo (Threads): Remove duplicate text.  Update examples.
Fix "thread apply" text.

13 years ago PR ld/12380
Alan Modra [Wed, 12 Jan 2011 12:07:19 +0000 (12:07 +0000)]
PR ld/12380
* ldexp.h (enum phase_enum): Comment.  Add exp_dataseg_done.
* ldexp.c (fold_unary <DATA_SEGMENT_END>): Rearrange code.  Test
for exp_dataseg_done rather than expld.phase == lang_final_phase_enum
to detect when we've finished sizing sections.
(fold_binary <DATA_SEGMENT_ALIGN>): Likewise.
(fold_binary <DATA_SEGMENT_RELRO_END>): Likewise.  Also test
that we are not inside an output section statement.
* ldlang.c (lang_size_sections): Set exp_dataseg_done on exit if
not exp_dataseg_relro_adjust or exp_dataseg_adjust.  Don't set
lang_final_phase_enum here.
(lang_process): Set lang_final_phase_enum here.

13 years agoDetect GNU/kFreeBSD and set `gdb_osabi' appropiately
Joel Brobecker [Wed, 12 Jan 2011 10:48:14 +0000 (10:48 +0000)]
Detect GNU/kFreeBSD and set `gdb_osabi' appropiately

2011-01-09  Robert Millan  <rmh@gnu.org>

        * configure.tgt: Detect GNU/kFreeBSD and set `gdb_osabi'
        appropiately.

13 years ago* rx-dis.c (print_insn_rx): Support RX_Operand_TwoReg.
DJ Delorie [Wed, 12 Jan 2011 07:06:29 +0000 (07:06 +0000)]
* rx-dis.c (print_insn_rx): Support RX_Operand_TwoReg.

13 years agoRevert erroneous commit
Tom Tromey [Wed, 12 Jan 2011 02:51:38 +0000 (02:51 +0000)]
Revert erroneous commit

13 years ago * thread.c (do_captured_thread_select): Emit newline before
Tom Tromey [Wed, 12 Jan 2011 02:44:48 +0000 (02:44 +0000)]
* thread.c (do_captured_thread_select): Emit newline before
printing frame.

13 years ago2011-01-11 Michael Snyder <msnyder@vmware.com>
Michael Snyder [Wed, 12 Jan 2011 01:23:29 +0000 (01:23 +0000)]
2011-01-11  Michael Snyder  <msnyder@vmware.com>

* ui-file.c: Comment cleanup, mostly periods and spaces.
* ui-file.h: Ditto.
* ui-out.c: Ditto.
* ui-out.h: Ditto.
* utils.c: Ditto.
* v850-tdep.c: Ditto.
* valarith.c: Ditto.
* valops.c: Ditto.
* valprint.c: Ditto.
* valprint.h: Ditto.
* value.c: Ditto.
* value.h: Ditto.
* varobj.c: Ditto.
* varobj.h: Ditto.
* vax-tdep.c: Ditto.
* vec.c: Ditto.
* vec.h: Ditto.
* version.h: Ditto.
* windows-nat.c: Ditto.
* windows-tdep.c: Ditto.
* xcoffread.c: Ditto.
* xcoffsolib.c: Ditto.
* xml-support.c: Ditto.
* xstormy16-tdep.c: Ditto.
* xtensa-tdep.c: Ditto.
* xtensa-tdep.h: Ditto.

13 years ago*** empty log message ***
gdbadmin [Wed, 12 Jan 2011 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***

13 years agodaily update
Alan Modra [Tue, 11 Jan 2011 23:00:05 +0000 (23:00 +0000)]
daily update

13 years ago2011-01-11 Michael Snyder <msnyder@vmware.com>
Michael Snyder [Tue, 11 Jan 2011 21:53:25 +0000 (21:53 +0000)]
2011-01-11  Michael Snyder  <msnyder@vmware.com>

* s390-tdep.c: Comment cleanup, mostly periods and spaces.
* score-tdep.c: Ditto.
* score-tdep.h: Ditto.
* ser-base.c: Ditto.
* ser-go32.c: Ditto.
* serial.c: Ditto.
* serial.h: Ditto.
* ser-mingw.c: Ditto.
* ser-pipe.c: Ditto.
* ser-tcp.c: Ditto.
* ser-unix.c: Ditto.
* sh64-tdep.c: Ditto.
* shnbsd-nat.c: Ditto.
* sh-tdep.c: Ditto.
* sh-tdep.h: Ditto.
* solib.c: Ditto.
* solib-darwin.c: Ditto.
* solib-frv.c: Ditto.
* solib.h: Ditto.
* solib-irix.c: Ditto.
* solib-osf.c: Ditto.
* solib-pa64.c: Ditto.
* solib-som.c: Ditto.
* solib-spu.c: Ditto.
* solib-sunos.c: Ditto.
* solib-svr4.c: Ditto.
* solist.h: Ditto.
* sol-thread.c: Ditto.
* somread.c: Ditto.
* source.c: Ditto.
* source.h: Ditto.
* sparc64-linux-tdep.c: Ditto.
* sparc64-tdep.c: Ditto.
* sparc-linux-nat.c: Ditto.
* sparc-linux-tdep.c: Ditto.
* sparc-sol2-nat.c: Ditto.
* sparc-sol2-tdep.c: Ditto.
* sparc-tdep.c: Ditto.
* sparc-tdep.h: Ditto.
* spu-tdep.c: Ditto.
* stabsread.c: Ditto.
* stabsread.h: Ditto.
* stack.c: Ditto.
* symfile.c: Ditto.
* symfile.h: Ditto.
* symmisc.c: Ditto.
* symtab.c: Ditto.
* symtab.h: Ditto.
* target.c: Ditto.
* target-descriptions.c: Ditto.
* target-descriptions.h: Ditto.
* target.h: Ditto.
* target-memory.c: Ditto.
* terminal.h: Ditto.
* thread.c: Ditto.
* top.c: Ditto.
* tracepoint.c: Ditto.
* tracepoint.h: Ditto.
* trad-frame.h: Ditto.
* typeprint.c: Ditto.

13 years ago * gdb.python/py-infthread.exp: Load gdb-python.exp.
Tom Tromey [Tue, 11 Jan 2011 21:22:35 +0000 (21:22 +0000)]
* gdb.python/py-infthread.exp: Load gdb-python.exp.

13 years ago2011-01-11 Thiago Jung Bauermann <bauerman@br.ibm.com>
Thiago Jung Bauermann [Tue, 11 Jan 2011 19:39:35 +0000 (19:39 +0000)]
2011-01-11  Thiago Jung Bauermann  <bauerman@br.ibm.com>

* breakpoint.c (resources_needed_watchpoint): Fix indentation.
* gdbtypes.c (is_scalar_type_recursive): Fix formatting.

13 years ago2011-01-11 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
Thiago Jung Bauermann [Tue, 11 Jan 2011 19:23:03 +0000 (19:23 +0000)]
2011-01-11  Sergio Durigan Junior  <sergiodj@linux.vnet.ibm.com>
    Thiago Jung Bauermann  <bauerman@br.ibm.com>

Implement support for PowerPC BookE ranged watchpoints.

gdb/
* breakpoint.h
(struct breakpoint_ops) <resources_needed>: New method.
Initialize to NULL in all existing breakpoint_ops instances.
(struct breakpoint) <exact>: New field.
(target_exact_watchpoints): Declare external global.
* breakpoint.c (target_exact_watchpoints): New global flag.
(update_watchpoint): Set b->type to bp_hardware_watchpoint and
b->enable_state to bp_enabled before calling
hw_watchpoint_used_count.
(hw_watchpoint_used_count): Iterate over all bp_locations in a
watchpoint.  Call breakpoint's breakpoint_ops.resources_needed
if available.
(insert_watchpoint, remove_watchpoint): Use fixed length of 1 byte
if the watchpoint is exact.
(resources_needed_watchpoint): New function.
(watchpoint_breakpoint_ops): Add resources_needed_watchpoint.
(watch_command_1): Set b->exact if the user asked for an exact
watchpoint and one can be set.
(can_use_hardware_watchpoint): Add exact_watchpoints argument.
Pass fixed length of 1 to target_region_ok_for_hw_watchpoint if
the user asks for an exact watchpoint and one can be set.  Return
number of needed debug registers to watch the expression.
* gdbtypes.c (is_scalar_type): New function, based on
valprint.c:scalar_type_p.
(is_scalar_type_recursive): New function.
* gdbtypes.h (is_scalar_type_recursive): Declare.
* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Always
handle regions when ranged watchpoints are available.
(create_watchpoint_request): New function.
(ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint): Use
create_watchpoint_request.
* rs6000-tdep.c (show_powerpc_exact_watchpoints): New function.
(_initialize_rs6000_tdep): Add `exact-watchpoints' boolean to the
`set powerpc' and `show powerpc' commands.
* target.h (struct target_ops) <to_region_ok_for_hw_watchpoint>:
Mention documentation comment in the target macro.
(target_region_ok_for_hw_watchpoint): Document return value.

gdb/doc/
* gdb.texinfo (PowerPC Embedded): Document ranged watchpoints and
the "set powerpc exact-watchpoints" flag.

13 years ago2011-01-11 Thiago Jung Bauermann <bauerman@br.ibm.com>
Thiago Jung Bauermann [Tue, 11 Jan 2011 19:18:31 +0000 (19:18 +0000)]
2011-01-11  Thiago Jung Bauermann  <bauerman@br.ibm.com>

* breakpoint.c (update_watchpoint): Decide on using a software or
hardware watchpoint after the bp_locations are created.

13 years ago2010-01-11 Thiago Jung Bauermann <bauerman@br.ibm.com>
Thiago Jung Bauermann [Tue, 11 Jan 2011 19:16:23 +0000 (19:16 +0000)]
2010-01-11  Thiago Jung Bauermann  <bauerman@br.ibm.com>

Convert hardware watchpoints to use breakpoint_ops.

gdb/
* breakpoint.h (breakpoint_ops) <insert>: Rename to...
<insert_location>: ... this.  Return int instead of void.
Accept pointer to struct bp_location instead of pointer to
struct breakpoint.  Adapt all implementations.
(breakpoint_ops) <remove>: Rename to...
<remove_location>: ... this.  Accept pointer to struct bp_location
instead of pointer to struct breakpoint.  Adapt all implementations.
* breakpoint.c (insert_catchpoint): Delete function.
(insert_bp_location): Call the watchpoint or catchpoint's
breakpoint_ops.insert method.
(remove_breakpoint_1): Call the watchpoint or catchpoint's
breakpoint_ops.remove method.
(insert_watchpoint, remove_watchpoint): New functions.
(watchpoint_breakpoint_ops): New structure.
(watch_command_1): Initialize the OPS field.
* inf-child.c (inf_child_insert_fork_catchpoint)
(inf_child_remove_fork_catchpoint, inf_child_insert_vfork_catchpoint)
(inf_child_remove_vfork_catchpoint, inf_child_insert_exec_catchpoint)
(inf_child_remove_exec_catchpoint, inf_child_set_syscall_catchpoint):
Delete functions.
(inf_child_target): Remove initialization of to_insert_fork_catchpoint,
to_remove_fork_catchpoint, to_insert_vfork_catchpoint,
to_remove_vfork_catchpoint, to_insert_exec_catchpoint,
to_remove_exec_catchpoint and to_set_syscall_catchpoint.
* target.c (update_current_target): Change default implementation of
to_insert_fork_catchpoint, to_remove_fork_catchpoint,
to_insert_vfork_catchpoint, to_remove_vfork_catchpoint,
to_insert_exec_catchpoint, to_remove_exec_catchpoint and
to_set_syscall_catchpoint to return_one.
(debug_to_insert_fork_catchpoint, debug_to_insert_vfork_catchpoint)
(debug_to_insert_exec_catchpoint): Report return value.
* target.h (to_insert_fork_catchpoint, to_insert_vfork_catchpoint)
(to_insert_exec_catchpoint): Change declaration to return int instead
of void.

gdb/testsuite/
* gdb.base/foll-exec.exp: Adapt to new error string when the catchpoint
type is not supported.
* gdb.base/foll-fork.exp: Likewise.
* gdb.base/foll-vfork.exp: Likewise.

13 years agosim: allow memory maps to default to mapped files
Mike Frysinger [Tue, 11 Jan 2011 17:58:56 +0000 (17:58 +0000)]
sim: allow memory maps to default to mapped files

I find it annoying when using --memory-mapfile that I also need to look
up and manually specify the file size to the following --memory-region
option.  So make a length of 0 in the following --memory-region trigger
an auto-sizing of the map to the length of the file being mapped.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years ago2011-01-11 Michael Snyder <msnyder@vmware.com>
Michael Snyder [Tue, 11 Jan 2011 15:10:03 +0000 (15:10 +0000)]
2011-01-11  Michael Snyder  <msnyder@vmware.com>

* arm-tdep.c: Internationalization.
* c-lang.c: Ditto.
* charset.c: Ditto.
* fork-child.c: Ditto.
* nto-procfs.c: Ditto.
* ppc-sysv-tdep.c: Ditto.
* procfs.c: Ditto.
* remote-mips.c: Ditto.
* remote.c: Ditto.
* rs6000-nat.c: Ditto.
* rs6000-tdep.c: Ditto.
* target.c: Ditto.
* valops.c: Ditto.
* value.c: Ditto.
* xml-support.c: Ditto.
* mi/mi-cmd-break.c: Ditto.
* mi/mi-cmd-var.c: Ditto.
* mi/mi-interp.c: Ditto.
* mi/mi-main.c: Ditto.

13 years agohttp://sourceware.org/ml/gdb-patches/2010-11/msg00112.html
Andrew Burgess [Tue, 11 Jan 2011 14:19:34 +0000 (14:19 +0000)]
sourceware.org/ml/gdb-patches/2010-11/msg00112.html
gdb/ChangeLog
* remote-sim.c (gdbsim_store_register): Update API to
sim_store_register to check more error conditions.
include/gdb/ChangeLog
* remote-sim.h (sim_store_register): Update the API
documentation for this function.
sim/erc32/ChangeLog
sim/h8300/ChangeLog
sim/m32c/ChangeLog
sim/mn10300/ChangeLog
sim/ppc/ChangeLog
sim/rx/ChangeLog
sim/v850/ChangeLog
* ???.c (sim_store_register): Update return value to
match new API.

13 years ago* readelf.c (print_symbol): Handle symbol characters as unsigned.
Andreas Schwab [Tue, 11 Jan 2011 10:46:55 +0000 (10:46 +0000)]
* readelf.c (print_symbol): Handle symbol characters as unsigned.
Whitespace fixes.

13 years agoelf32-arm.c (elf32_arm_tls_relax): Note fixme pointed out by AlanM
Nathan Sidwell [Tue, 11 Jan 2011 09:06:04 +0000 (09:06 +0000)]
elf32-arm.c (elf32_arm_tls_relax): Note fixme pointed out by AlanM

13 years agoTake unadjusted offset for loongson3a specific instructions.
Mingjie Xing [Tue, 11 Jan 2011 07:22:09 +0000 (07:22 +0000)]
Take unadjusted offset for loongson3a specific instructions.

13 years agoFix change log omission.
Michael Snyder [Tue, 11 Jan 2011 03:01:33 +0000 (03:01 +0000)]
Fix change log omission.