]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 16 Feb 2014 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 15 Feb 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 14 Feb 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 13 Feb 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 12 Feb 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 11 Feb 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years ago PR build/16550
Rainer Orth [Mon, 10 Feb 2014 15:25:56 +0000 (16:25 +0100)] 
PR build/16550
* cache.c (bfd_cache_max_open): Cast RLIM_INFINITY to rlim_t.

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 10 Feb 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoFix Python stack corruption
Jan Kratochvil [Sun, 9 Feb 2014 17:47:40 +0000 (18:47 +0100)] 
Fix Python stack corruption

The fix is obvious.

gdb/
2014-02-09  Jan Kratochvil  <jan.kratochvil@redhat.com>

Fix Python stack corruption.
* python/py-linetable.c (ltpy_get_pcs_for_line, ltpy_has_line): Use
gdb_py_longest.

Message-ID: <20140207171701.GA25187@host2.jankratochvil.net>

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 9 Feb 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 8 Feb 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 7 Feb 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoBump GDB version number to 7.7.0.DATE-cvs.
Joel Brobecker [Thu, 6 Feb 2014 02:52:05 +0000 (06:52 +0400)] 
Bump GDB version number to 7.7.0.DATE-cvs.

gdb/ChangeLog:

* version.in: Set GDB version number to 7.7.0.DATE-cvs.

11 years agoDocument the GDB 7.7 release in gdb/ChangeLog
Joel Brobecker [Thu, 6 Feb 2014 02:48:07 +0000 (06:48 +0400)] 
Document the GDB 7.7 release in gdb/ChangeLog

gdb/ChangeLog:

GDB 7.7 released.

11 years agoSet GDB version number to 7.7. gdb-7.7-release
Joel Brobecker [Thu, 6 Feb 2014 02:21:29 +0000 (06:21 +0400)] 
Set GDB version number to 7.7.

gdb/ChangeLog:

* version.in: Set GDB version number to 7.7.

11 years agoNEWS: Rename "Changes since GDB 7.6" into "Changes in GDB 7.7"
Joel Brobecker [Thu, 6 Feb 2014 02:24:55 +0000 (06:24 +0400)] 
NEWS: Rename "Changes since GDB 7.6" into "Changes in GDB 7.7"

gdb/ChangeLog:

        * NEWS: Change "Changes since GDB 7.6" to "Changes in GDB 7.7".

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 6 Feb 2014 00:00:06 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoCreate inferior for ctf target.
Yao Qi [Thu, 30 Jan 2014 02:09:11 +0000 (10:09 +0800)] 
Create inferior for ctf target.

This patch creates inferior when GDB opens a ctf trace data, to be
consistent with tfile target.  A test case is added to test for
live target, tfile and ctf target.

gdb:

2014-02-05  Yao Qi  <yao@codesourcery.com>

* ctf.c: Include "inferior.h" and "gdbthread.h".
(CTF_PID): A new macro.
(ctf_open): Call inferior_appeared and add_thread_silent.
(ctf_close): Call exit_inferior_silent and set inferior_ptid.
(ctf_thread_alive): New function.
(init_ctf_ops): Install ctf_thread_alive to to_thread_alive.

gdb/testsuite:

2014-02-05  Yao Qi  <yao@codesourcery.com>

* gdb.trace/report.exp (use_collected_data): Test the output
of "info threads" and "info inferiors".

11 years agoCreate inferior for tfile target
Yao Qi [Thu, 30 Jan 2014 00:37:05 +0000 (08:37 +0800)] 
Create inferior for tfile target

When a trace file is loaded in Eclipse, it is expected to see thread
and process (=thread-group-started and =thread-created).  Create an
inferior and add a thread for this purpose.

This patch just reverts my previous patch.

gdb/testsuite:

2014-02-05  Yao Qi  <yao@codesourcery.com>

Revert this patch:

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

* gdb.trace/tfile.exp: Test inferior and thread.

gdb:

2014-02-05  Yao Qi  <yao@codesourcery.com>

Revert this patch:

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

* tracepoint.c (TFILE_PID): Remove.
(tfile_open): Don't add thread and inferior.
(tfile_close): Don't set 'inferior_ptid'.  Don't call
exit_inferior_silent.
(tfile_thread_alive): Remove.
(init_tfile_ops): Don't set field 'to_thread_alive' of
tfile_ops.

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 5 Feb 2014 00:00:06 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 4 Feb 2014 00:00:14 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 3 Feb 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoFix shift for AVX512F gather/scatter instructions
Michael Zolotukhin [Thu, 30 Jan 2014 15:38:09 +0000 (07:38 -0800)] 
Fix shift for AVX512F gather/scatter instructions

opcodes/

2014-01-30  Michael Zolotukhin  <michael.v.zolotukhin@gmail.com>
    Jan Beulich  <jbeulich@suse.com>

PR binutils/16490
* i386-dis.c (OP_E_memory): Fix shift computation for
vex_vsib_q_w_dq_mode.

gas/testsuite/

2014-01-30  Michael Zolotukhin  <michael.v.zolotukhin@gmail.com>
    Jan Beulich  <jbeulich@suse.com>

PR binutils/16490
* gas/i386/avx512f.d: Fix test output.
* gas/i386/avx512f-intel.d: Likewise.
* gas/i386/x86-64-avx512f.d: Likewise.
* gas/i386/x86-64-avx512f-intel.d: Likewise.

Conflicts:
gas/testsuite/ChangeLog

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 2 Feb 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 1 Feb 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 31 Jan 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 30 Jan 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 29 Jan 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoFix info-shared.exp testcase to expect the leading `.' found on ppc64's symbols.
Edjunior Barbosa Machado [Tue, 28 Jan 2014 17:14:40 +0000 (15:14 -0200)] 
Fix info-shared.exp testcase to expect the leading `.' found on ppc64's symbols.

gdb/testsuite/
2014-01-28  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>

* gdb.base/info-shared.exp: Expect leading `.' on ppc64's symbols.

11 years agoFix typo in ppc64_standard_linkage7
Ulrich Weigand [Tue, 28 Jan 2014 16:49:13 +0000 (17:49 +0100)] 
Fix typo in ppc64_standard_linkage7

The ppc64_standard_linkage7 pattern added by Alan's recent patch:
https://sourceware.org/ml/gdb-patches/2013-11/msg00274.html
contains a typo: the ELFv2 TOC slot offset is 24, not 40.
This was correct in the comment, but not the actual code.

ChangeLog:

* ppc64-tdep.c (ppc64_standard_linkage7): Fix typo.

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 28 Jan 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 27 Jan 2014 00:00:11 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 26 Jan 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 25 Jan 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 24 Jan 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoavoid python exception in FrameDecorator.py
Tom Tromey [Wed, 22 Jan 2014 15:52:15 +0000 (08:52 -0700)] 
avoid python exception in FrameDecorator.py

This fixes a bug in FrameDecorator.py.

FrameVars seems to assume that Frame.block can return None if there is
no block.  However, it actually throws an exception.

I saw this bug while developing a frame filter, but unfortunately I
don't know how to reproduce it.  It seems to me that the SAL tests in
_is_limited_frame should exclude the bad cases; and in my attempts to
write a test they do.

Nevertheless I think the fix is reasonably obvious and ought to go in.

2014-01-23  Tom Tromey  <tromey@redhat.com>

PR python/16485:
* python/lib/gdb/FrameDecorator.py: (FrameVars.fetch_frame_args):
Handle exception from frame.block.
(FrameVars.fetch_frame_locals): Likewise.

11 years agofix erroneous error-handling in frame filter code
Tom Tromey [Wed, 22 Jan 2014 15:44:41 +0000 (08:44 -0700)] 
fix erroneous error-handling in frame filter code

This fixes PR python/16487.

The bug here is that the function-name-handling code in py_print_frame
had a small logic error (really a misplaced closing brace).  This
error could lead to a Py_DECREF(NULL), which crashes.

This patch fixes the bug in the obvious way.

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

2014-01-23  Tom Tromey  <tromey@redhat.com>

PR python/16487:
* python/py-framefilter.c (py_print_frame): Don't call Py_DECREF
on a NULL pointer.  Move "goto error" to correct place.

2014-01-23  Tom Tromey  <tromey@redhat.com>

PR python/16487:
* gdb.python/py-framefilter.exp: Add test using "Error" filter.
* gdb.python/py-framefilter.py (ErrorInName, ErrorFilter): New
classes.

11 years agofix crash in frame filters
Tom Tromey [Wed, 22 Jan 2014 15:10:01 +0000 (08:10 -0700)] 
fix crash in frame filters

apply_frame_filter calls ensure_python_env before computing the
gdbarch to use.  This means that python_gdbarch can be NULL while in
Python code, and if a frame filter depends on this somehow (easy to
do), gdb will crash.

The fix is to compute the gdbarch first.

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

2014-01-23  Tom Tromey  <tromey@redhat.com>

PR python/16491:
* python/py-framefilter.c (apply_frame_filter): Call
ensure_python_env after computing gdbarch.

2014-01-23  Tom Tromey  <tromey@redhat.com>

PR python/16491:
* gdb.python/py-framefilter.py (Reverse_Function.function): Read a
string from an inferior frame.
* gdb.python/py-framefilter-mi.exp: Update.

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 23 Jan 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agogdb: xtensa: fix on 64-bit hosts
Baruch Siach [Wed, 22 Jan 2014 13:02:29 +0000 (15:02 +0200)] 
gdb: xtensa: fix on 64-bit hosts

On 64-bit hosts unsigned long is 64 bit.  Use uint32_t instead.

gdb/
2014-01-22  Baruch Siach  <baruch@tkos.co.il>

* xtensa-tdep.h (xtensa_elf_greg_t): Change type to uint32_t.

11 years agoxtensa-config.c: missing defs.h include.
Pedro Alves [Wed, 22 Jan 2014 12:17:26 +0000 (12:17 +0000)] 
xtensa-config.c: missing defs.h include.

All .c files must start by including defs.h.

2014-01-22  Pedro Alves  <palves@redhat.com>

* xtensa-config.c: Include defs.h.

11 years agogdb: xtensa: fix linux ptrace includes
Baruch Siach [Wed, 22 Jan 2014 12:18:29 +0000 (12:18 +0000)] 
gdb: xtensa: fix linux ptrace includes

Currently, xtensa code using the Linux ptrace interface only include
sys/ptrace.h.  This file comes from the C library (glibc and uClibc,
at least), and includes a declaration of the ptrace() functions, along
with some cross architecture constants that are mostly copied from the
file located at include/uapi/linux/ptrace.h in recent Linux kernels.

For xtensa specific constants like PTRACE_GETXTREGS and
PTRACE_SETXTREGS the asm/ptrace.h include from the Linux kernel UAPI
is needed.  The code in gdbserver xtensa specific part doesn't call
ptrace() directly, so we can remove the unneeded sys/ptrace.h include.
The gdb xtensa specific code needs both headers, since it calls
ptrace().

gdb/
* xtensa-linux-nat.c: Include asm/ptrace.h.

gdb/gdbserver/
* linux-xtensa-low.c: Include asm/ptrace.h instead of
sys/ptrace.h.

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 22 Jan 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agogdb: Support install-strip target
Roland McGrath [Tue, 21 Jan 2014 19:01:04 +0000 (11:01 -0800)] 
gdb: Support install-strip target

gdb/
* configure.ac: Call AM_PROG_INSTALL_STRIP.
* configure: Regenerate.
* aclocal.m4: Regenerate.
* Makefile.in (install_sh, INSTALL_STRIP_PROGRAM, STRIP):
New substituted variables.
(install-strip): New target.
(INSTALL_SCRIPT): New substituted variable.
(FLAGS_TO_PASS): Add it.
(install-only): Use $(INSTALL_SCRIPT) rather than
$(INSTALL_PROGRAM) for gcore.

(cherry picked from commit 4869db5e97b2062a3adf81158577171990248ef3)

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 21 Jan 2014 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 20 Jan 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 19 Jan 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 18 Jan 2014 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 17 Jan 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agodwarf2read.c (open_and_init_dwp_file): Fix typo in comment.
Doug Evans [Thu, 16 Jan 2014 17:33:00 +0000 (09:33 -0800)] 
dwarf2read.c (open_and_init_dwp_file): Fix typo in comment.

11 years agoFix go32-nat.c build fallout from to_detach constification.
Pedro Alves [Wed, 15 Jan 2014 12:53:04 +0000 (12:53 +0000)] 
Fix go32-nat.c build fallout from to_detach constification.

The recent constification of to_detach missed updating the forward
declaration of go32_detach, breaking the build:

 ../../src/gdb/go32-nat.c:387:1: error: conflicting types for 'go32_detach'
 ../../src/gdb/go32-nat.c:240:13: note: previous declaration of 'go32_detach' was here

go32_detach is actually defined before it's ever used, making the
forward declaration is unnecessary.  So we can just remove it instead
of updating it.  While at it, remove all others in the same situation.
Tested by building a djgpp gdb.

gdb/
2014-01-16  Pedro Alves  <palves@redhat.com>

* go32-nat.c (go32_open, go32_close, go32_attach, go32_detach)
(go32_resume, go32_fetch_registers, store_register)
(go32_store_registers, go32_prepare_to_store)
(go32_xfer_memory, go32_files_info, go32_kill_inferior)
(go32_create_inferior, go32_can_run, go32_terminal_init)
(go32_terminal_inferior, go32_terminal_ours): Delete forward
declarations.

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 16 Jan 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years ago* dwarf2read.c (open_and_init_dwp_file): Use pulongest to print uint32_t.
Doug Evans [Wed, 15 Jan 2014 21:19:08 +0000 (13:19 -0800)] 
* dwarf2read.c (open_and_init_dwp_file): Use pulongest to print uint32_t.

11 years agoFix small style violation in py-value.c:get_field_type
Joel Brobecker [Wed, 15 Jan 2014 12:40:22 +0000 (16:40 +0400)] 
Fix small style violation in py-value.c:get_field_type

gdb/ChangeLog:

        * python/py-value.c (get_field_type): Remove unnecessary curly
        braces for single-statement if block.

Tested on x86_64-linux.

11 years agoAdd missing empty line after declarations in "if" block (py-type.c).
Joel Brobecker [Wed, 15 Jan 2014 12:28:08 +0000 (16:28 +0400)] 
Add missing empty line after declarations in "if" block (py-type.c).

This patch fixes a small coding-style violation...

gdb/ChangeLog:

        * python/py-type.c (convert_field): Add missing empty line
        after declarations.

11 years agoUse bitpos and type to lookup a gdb.Field object when its name is 'None'.
Siva Chandra [Fri, 27 Dec 2013 20:20:59 +0000 (12:20 -0800)] 
Use bitpos and type to lookup a gdb.Field object when its name is 'None'.

PR python/15464
PR python/16113
* valops.c (value_struct_elt_bitpos): New function
* py-type.c (convert_field): Set 'name' attribute of a gdb.Field
object to 'None' if the field name is an empty string ("").
* python/py-value.c (valpy_getitem): Use 'bitpos' and 'type'
attribute to look for a field when 'name' is 'None'.
(get_field_type): New function

testsuite/
* gdb.python/py-type.c: Enhance test case.
* gdb.python/py-value-cc.cc: Likewise
* gdb.python/py-type.exp: Add new tests.
* gdb.python/py-value-cc.exp: Likewise

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 15 Jan 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoPR symtab/16426
Doug Evans [Tue, 14 Jan 2014 22:49:25 +0000 (14:49 -0800)] 
PR symtab/16426

* dwarf2read.c (dwarf2_get_dwz_file): Call gdb_bfd_record_inclusion.
(try_open_dwop_file): Ditto.
* gdb_bfd.c: #include "vec.h".
(bfdp): New typedef.
(struct gdb_bfd_data): New member included_bfds.
(gdb_bfd_unref): Unref all included bfds.
(gdb_bfd_record_inclusion): New function.
* gdb_bfd.h (gdb_bfd_record_inclusion): Declare.

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 14 Jan 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoFix set auto-load safe-path false warning regression (PR 16216)
Jan Kratochvil [Mon, 13 Jan 2014 20:20:21 +0000 (21:20 +0100)] 
Fix set auto-load safe-path false warning regression (PR 16216)

gdb/
2014-01-07  Jan Kratochvil  <jan.kratochvil@redhat.com>

PR threads/16216
* linux-thread-db.c (try_thread_db_load): Add parameter
check_auto_load_safe.  Move here the file_is_auto_load_safe call.
(try_thread_db_load_from_pdir_1): Move it there from here.
(try_thread_db_load_from_sdir): Update caller.
(try_thread_db_load_from_dir): Move it there from here.

11 years agoFix the ChangeLog's EOL format screwed up by cherry-pick.
Eli Zaretskii [Mon, 13 Jan 2014 19:08:37 +0000 (21:08 +0200)] 
Fix the ChangeLog's EOL format screwed up by cherry-pick.

11 years agoFix MinGW compilation errors in gdbserver/.
Eli Zaretskii [Mon, 13 Jan 2014 18:54:47 +0000 (20:54 +0200)] 
Fix MinGW compilation errors in gdbserver/.

gdb/gdbserver/Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
"-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC versions.

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 13 Jan 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 12 Jan 2014 00:00:11 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 11 Jan 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 10 Jan 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoFix buffer underrun in i386-dis.c.
Roland McGrath [Thu, 9 Jan 2014 18:13:10 +0000 (10:13 -0800)] 
Fix buffer underrun in i386-dis.c.

opcodes/
* i386-dis.c (print_insn): Do not touch all_prefixes[-1] when
last_rex_prefix is -1.

(cherry picked from commit e2e6193d65a20e6b7fccba288e5d1bc45b78d194)

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 9 Jan 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoBump GDB version number to 7.6.90.DATE-cvs.
Joel Brobecker [Wed, 8 Jan 2014 10:01:48 +0000 (14:01 +0400)] 
Bump GDB version number to 7.6.90.DATE-cvs.

gdb/ChangeLog:

* version.in: Set GDB version number to 7.6.90.DATE-cvs.

11 years agoDocument the GDB 7.6.90 release in gdb/ChangeLog
Joel Brobecker [Wed, 8 Jan 2014 10:01:33 +0000 (14:01 +0400)] 
Document the GDB 7.6.90 release in gdb/ChangeLog

gdb/ChangeLog:

GDB 7.6.90 released.

11 years agoSet GDB version number to 7.6.90.
Joel Brobecker [Wed, 8 Jan 2014 09:46:59 +0000 (13:46 +0400)] 
Set GDB version number to 7.6.90.

gdb/ChangeLog:

* version.in: Set GDB version number to 7.6.90.

11 years agoSet development mode to "off" by default.
Joel Brobecker [Wed, 8 Jan 2014 09:25:55 +0000 (13:25 +0400)] 
Set development mode to "off" by default.

gdb/ChangeLog:

* development.sh (development): Set to false.

11 years agoBump version to 7.6.90.DATE-cvs.
Joel Brobecker [Wed, 8 Jan 2014 09:24:26 +0000 (13:24 +0400)] 
Bump version to 7.6.90.DATE-cvs.

Now that the GDB 7.7 branch has been created, we can
bump the version number.

gdb/ChangeLog:

GDB 7.7 branch created (79301218fa0f074c5656db0ec8972a5ddcf91fb5):
* version.in: Bump version to 7.6.90.DATE-cvs.

11 years agoAdd missing ChangeLog entries. gdb-7.7-branchpoint
Joel Brobecker [Wed, 8 Jan 2014 09:16:32 +0000 (13:16 +0400)] 
Add missing ChangeLog entries.

11 years agoFix pointer assignment with different signedness
Yao Qi [Tue, 7 Jan 2014 10:12:21 +0000 (18:12 +0800)] 
Fix pointer assignment with different signedness

This patch fixes these errors below:

../../binutils-gdb/gdb/spu-linux-nat.c: In function ‘spu_symbol_file_add_from_memory’:
../../binutils-gdb/gdb/spu-linux-nat.c:368:3: error: pointer targets in passing argument 2 of ‘spu_proc_xfer_spu’ differ in signedness [-Werror=pointer-sign]
../../binutils-gdb/gdb/spu-linux-nat.c:232:1: note: expected ‘gdb_byte *’ but argument is of type ‘char *’
../../binutils-gdb/gdb/spu-linux-nat.c: In function ‘spu_xfer_partial’:
../../binutils-gdb/gdb/spu-linux-nat.c:598:7: error: pointer targets in passing argument 1 of ‘strtoulst’ differ in signedness [-Werror=pointer-sign]
In file included from ../../binutils-gdb/gdb/defs.h:769:0,
                 from ../../binutils-gdb/gdb/spu-linux-nat.c:21:
../../binutils-gdb/gdb/utils.h:43:15: note: expected ‘const char *’ but argument is of type ‘gdb_byte *’

gdb:

2014-01-08  Yao Qi  <yao@codesourcery.com>

* spu-linux-nat.c (spu_symbol_file_add_from_memory): Change
type of 'id' to gdb_byte.  Cast 'id' to 'const char *'.
(spu_xfer_partial): Cast 'buf' to 'const char *'.

11 years agoPass name to symbol_file_add_from_bfd
Yao Qi [Tue, 7 Jan 2014 09:48:07 +0000 (17:48 +0800)] 
Pass name to symbol_file_add_from_bfd

This patch fixes the following build error:

../../binutils-gdb/gdb/spu-linux-nat.c:383:5: error: passing argument 2 of ‘symbol_file_add_from_bfd’ makes pointer from integer without a cast [-Werror]
In file included from ../../binutils-gdb/gdb/spu-linux-nat.c:29:0:
../../binutils-gdb/gdb/symfile.h:444:24: note: expected ‘const char *’ but argument is of type ‘int’
../../binutils-gdb/gdb/spu-linux-nat.c:383:5: error: passing argument 3 of ‘symbol_file_add_from_bfd’ makes integer from pointer without a cast [-Werror]
In file included from ../../binutils-gdb/gdb/spu-linux-nat.c:29:0:
../../binutils-gdb/gdb/symfile.h:444:24: note: expected ‘int’ but argument is of type ‘void *’
../../binutils-gdb/gdb/spu-linux-nat.c:383:5: error: passing argument 5 of ‘symbol_file_add_from_bfd’ makes integer from pointer without a cast [-Werror]
In file included from ../../binutils-gdb/gdb/spu-linux-nat.c:29:0:
../../binutils-gdb/gdb/symfile.h:444:24: note: expected ‘int’ but argument is of type ‘void *’
../../binutils-gdb/gdb/spu-linux-nat.c:383:5: error: too few arguments to function ‘symbol_file_add_from_bfd’

Argument 'name' was added to function symbol_file_add_from_bfd by this patch

  [patchv4 4/5] Keep objfile original filename
  https://sourceware.org/ml/gdb-patches/2013-09/msg00683.html

but caller of symbol_file_add_from_bfd in spu-linux-nat.c wasn't updated.

This patch fixes the build error.

gdb:

2014-01-08  Yao Qi  <yao@codesourcery.com>

* spu-linux-nat.c (spu_symbol_file_add_from_memory): Pass
return value of bfd_get_filename to symbol_file_add_from_bfd.

11 years ago Fix PR16201.
Pierre Muller [Tue, 7 Jan 2014 23:31:50 +0000 (00:31 +0100)] 
Fix PR16201.
* coff-pe-read.c (struct read_pe_section_data): Add index field.
(add_pe_exported_sym): Use SECTION_DATA->INDEX for call
to prim_record_mininal_symbol_and_info.
(add_pe_forwarded_sym): Use known section number of forwarded symbol
in call to prim_record_minimal_symbol_and_info.
(read_pe_exported_syms): Set index field of section_data.

11 years agodaily update
Alan Modra [Tue, 7 Jan 2014 23:00:55 +0000 (09:30 +1030)] 
daily update

11 years agoAARCH64: Change cpsr type to be 64bit.
Andrew Pinski [Wed, 18 Dec 2013 19:03:07 +0000 (11:03 -0800)] 
AARCH64: Change cpsr type to be 64bit.

2013-12-18  Andrew Pinski  <apinski@cavium.com>

* features/aarch64-core.xml (cpsr): Change to be 64bit.
* features/aarch64.c: Regenerate.

11 years agoUse correct default for target functions that return pointer
Andreas Schwab [Tue, 7 Jan 2014 20:28:53 +0000 (21:28 +0100)] 
Use correct default for target functions that return pointer

* target.c (return_null): Define.
(update_current_target): Use it instead of return_zero for
functions that return a pointer.

11 years agoFix dir command for duplicated paths and add a new testcase.
Edjunior Barbosa Machado [Tue, 7 Jan 2014 19:03:06 +0000 (17:03 -0200)] 
Fix dir command for duplicated paths and add a new testcase.

gdb/ChangeLog:
2014-01-07  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>

* source.c (add_path): Fix check for duplicated paths in the previously
included paths.

gdb/testsuite/ChangeLog:
2014-01-07  Jan Kratochvil  <jan.kratochvil@redhat.com>

* gdb.base/source-dir.exp: New file.

11 years agoremove VA_* macros from sim
Tom Tromey [Sun, 5 Jan 2014 04:46:15 +0000 (21:46 -0700)] 
remove VA_* macros from sim

Remove the obsolete VA_* macros from sim.

2014-01-06  Tom Tromey  <tromey@redhat.com>

* common/cgen-trace.c: Don't use old VA_* macros.
* common/sim-load.c (xprintf): Likewise.
* common/sim-trace.c (trace_printf, debug_printf): Likewise.

11 years agoremove PARAMS from sim
Tom Tromey [Sun, 5 Jan 2014 04:43:21 +0000 (21:43 -0700)] 
remove PARAMS from sim

This removes the last uses of PARAMS from sim.

2014-01-06  Tom Tromey  <tromey@redhat.com>

* README-HACKING: Don't use PARAMS.
* arm/wrapper.c: Don't use PARAMS.
* bfin/sim-main.h: Don't use PARAMS.
* common/callback.c: Don't use PARAMS.
* common/cgen-trace.c: Don't use PARAMS.
* common/run-sim.h: Don't use PARAMS.
* common/run.c: Don't use PARAMS.
* common/sim-base.h: Don't use PARAMS.
* common/sim-load.c: Don't use PARAMS.
* common/sim-options.h: Don't use PARAMS.
* common/sim-trace.c: Don't use PARAMS.
* common/sim-trace.h: Don't use PARAMS.
* common/sim-utils.h: Don't use PARAMS.
* cr16/cr16_sim.h: Don't use PARAMS.
* cr16/gencode.c: Don't use PARAMS.
* cr16/interp.c: Don't use PARAMS.
* cr16/simops.c: Don't use PARAMS.
* d10v/d10v_sim.h: Don't use PARAMS.
* d10v/gencode.c: Don't use PARAMS.
* d10v/interp.c: Don't use PARAMS.
* d10v/simops.c: Don't use PARAMS.
* erc32/erc32.c: Don't use PARAMS.
* erc32/exec.c: Don't use PARAMS.
* erc32/float.c: Don't use PARAMS.
* erc32/func.c: Don't use PARAMS.
* erc32/sis.c: Don't use PARAMS.
* erc32/sis.h: Don't use PARAMS.
* mips/interp.c: Don't use PARAMS.
* mips/sim-main.h: Don't use PARAMS.
* sh/interp.c: Don't use PARAMS.
* v850/sim-main.h: Don't use PARAMS.
* v850/v850_sim.h: Don't use PARAMS.

11 years agoremove PARAMS from include/cgen
Tom Tromey [Mon, 6 Jan 2014 02:41:32 +0000 (19:41 -0700)] 
remove PARAMS from include/cgen

This removes the remaining uses of PARAMS from include/cgen.
Tested by rebuilding; a file in opcodes includes this header.

2014-01-06  Tom Tromey  <tromey@redhat.com>

* bitset.h: Remove uses of PARAMS.

11 years agoremove VA_* from binutils
Tom Tromey [Sun, 5 Jan 2014 04:47:10 +0000 (21:47 -0700)] 
remove VA_* from binutils

This removes the last uses of the obsolete VA_* macros from binutils.

All the binutils and bfd changes were tested by rebuilding.
I didn't rebuild the gas change but I think it is obviously correct.

2014-01-07  Tom Tromey  <tromey@redhat.com>

* elf32-xtensa.c (vsprint_msg): Don't use old VA_* compatibility
wrappers.

2014-01-07  Tom Tromey  <tromey@redhat.com>

* bucomm.c (fatal, non_fatal): Replace obsolete VA_* macros with
stdarg macros.
* dlltool.c (inform): Replace obsolete VA_* macros with stdarg
macros.
* dllwrap.c (inform, warn): Replace obsolete VA_* macros with
stdarg macros.

2014-01-07  Tom Tromey  <tromey@redhat.com>

* config/tc-tic30.c (debug): Avoid old VA_* compatibility
wrappers.

11 years agoremove uses of PARAMS from binutils
Tom Tromey [Mon, 6 Jan 2014 02:49:29 +0000 (19:49 -0700)] 
remove uses of PARAMS from binutils

This removes the last uses of PARAMS from binutils.

The two changes in binutils were tested by rebuilding.
I didn't rebuild the gas change but I think it is obviously correct.

2014-01-07  Tom Tromey  <tromey@redhat.com>

* coffgrok.h (coff_ofile): Don't use PARAMS.
* nlmheader.y (strerror): Don't use PARAMS.

2014-01-07  Tom Tromey  <tromey@redhat.com>

* config/tc-microblaze.h (parse_cons_expression_microblaze): Don't
use PARAMS.

11 years agoremove ANSI_PROTOTYPES
Tom Tromey [Mon, 23 Dec 2013 17:11:10 +0000 (10:11 -0700)] 
remove ANSI_PROTOTYPES

This removes the last use of ANSI_PROTOTYPES in the tree.
It appears in gas.

I didn't even rebuild this but I think it is obviously correct.

2014-01-07  Tom Tromey  <tromey@redhat.com>

* config/tc-xc16x.h: Don't use ANSI_PROTOTYPES.

11 years agoRemove duplicated #include's from GDB
Honggyu Kim [Tue, 7 Jan 2014 03:25:10 +0000 (01:25 -0200)] 
Remove duplicated #include's from GDB

This patch simply removes duplicated #include statements in the gdb/
directory.  If there are two duplicated #include statements, this patch
keeps the first #include and removes the second.

Those duplicates have been found by using the checkincludes.pl tool from
the Linux kernel and double checked manually once again if the #include
statements are affected by #ifdef macros.

2014-01-06  Honggyu Kim  <hong.gyu.kim@lge.com>

* ada-lang.c: Remove duplicated include statements.
* alphabsd-nat.c: Ditto.
* amd64-darwin-tdep.c: Ditto.
* amd64fbsd-nat.c: Ditto.
* auto-load.c: Ditto.
* ax-gdb.c: Ditto.
* breakpoint.c: Ditto.
* dbxread.c: Ditto.
* fork-child.c: Ditto.
* gdb_usleep.c: Ditto.
* i386-darwin-tdep.c: Ditto.
* i386fbsd-nat.c: Ditto.
* infcmd.c: Ditto.
* inferior.c: Ditto.
* jv-lang.c: Ditto.
* linux-nat.c: Ditto.
* linux-tdep.c: Ditto.
* m68kbsd-nat.c: Ditto.
* m68klinux-nat.c: Ditto.
* microblaze-tdep.c: Ditto.
* mips-linux-tdep.c: Ditto.
* mn10300-tdep.c: Ditto.
* nto-tdep.c: Ditto.
* opencl-lang.c: Ditto.
* osdata.c: Ditto.
* printcmd.c: Ditto.
* regcache.c: Ditto.
* remote-m32r-sdi.c: Ditto.
* remote.c: Ditto.
* symfile.c: Ditto.
* symtab.c: Ditto.
* tilegx-linux-nat.c: Ditto.
* tilegx-tdep.c: Ditto.
* tracepoint.c: Ditto.
* valops.c: Ditto.
* vaxbsd-nat.c: Ditto.
* windows-nat.c: Ditto.
* xtensa-tdep.c: Ditto.

11 years agoFix missing-prototypes error for '_initialize_spu_nat'
Yao Qi [Tue, 7 Jan 2014 09:28:48 +0000 (17:28 +0800)] 
Fix missing-prototypes error for '_initialize_spu_nat'

This patch fixes this build error below:

../../binutils-gdb/gdb/spu-linux-nat.c:616:1: error: no previous prototype for ‘_initialize_spu_nat’ [-Werror=missing-prototypes]

gdb:

2014-01-07  Yao Qi  <yao@codesourcery.com>

* spu-linux-nat.c (_initialize_spu_nat): Declare.

11 years ago[AArch64] Add GAS recognition for "xgene-1"
Philipp Tomsich [Wed, 4 Dec 2013 18:29:25 +0000 (19:29 +0100)] 
[AArch64] Add GAS recognition for "xgene-1"

* config/tc-aarch64.c (aarch64_cpus): Add entry for "xgene-1"

This adds support for the AppliedMicro X-Gene 1 processor to the
assembler.

11 years agoCast to uintptr_t when calling ptrace32 on aix
Yao Qi [Sat, 4 Jan 2014 07:48:21 +0000 (15:48 +0800)] 
Cast to uintptr_t when calling ptrace32 on aix

When I verify my changes to target.h doesn't break build on aix, I get
the following build error on a clean GDB checkout.

../../binutils-gdb/gdb/aix-thread.c: In function 'pdc_read_regs':
../../binutils-gdb/gdb/aix-thread.c:366:4: error: passing argument 3 of 'ptrace32' makes integer from pointer without a cast [-Werror]
    if (!ptrace32 (PTT_READ_GPRS, tid, gprs32, 0, NULL))
    ^
../../binutils-gdb/gdb/aix-thread.c:263:1: note: expected 'long long int' but argument is of type 'uint32_t *'
 ptrace32 (int req, int id, addr_ptr addr, int data, int *buf)
 ^

../../binutils-gdb/gdb/aix-thread.c:375:42: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       if (!ptrace32 (PTT_READ_FPRS, tid, (addr_ptr) fprs, 0, NULL))
                                          ^

../../binutils-gdb/gdb/aix-thread.c:392:39: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
    if (!ptrace32 (PTT_READ_SPRS, tid, (addr_ptr) &sprs32, 0, NULL))

GCC uses -maix32 in default, so the 'long long' is 64 bit and address
is 32 bit.  Such warnings should go away if -maix64 is used.

In this patch, I cast the parameter to uintptr_t first, and then cast
to addr_ptr.

gdb:

2014-01-07  Yao Qi  <yao@codesourcery.com>
    Joel Brobecker  <brobecker@adacore.com>

* aix-thread.c (pdc_read_regs): Cast parameter to uintptr_t.
(pdc_write_regs): Likewise.
(fetch_regs_kernel_thread): Likewise.
(store_regs_kernel_thread): Likewise.

11 years agovarobj/Ada: Missing children for interface-wide tagged types
Joel Brobecker [Sat, 4 Jan 2014 02:31:11 +0000 (06:31 +0400)] 
varobj/Ada: Missing children for interface-wide tagged types

Consider the following code:

   type Element is abstract tagged null record;
   type GADataType is interface;
   type Data_Type is new Element and GADataType with record
      I : Integer := 42;
   end record;
   Result1 : Data_Type;
   GGG1    : GADataType'Class := GADataType'Class (Result1);

When trying to create a varobj for variable ggg1, GDB currently
returns an object which has no child:

    -var-create ggg1 * ggg1
    ^done,name="ggg1",numchild="0",[...]

This is incorrect, it should return an object which has one child
(field "i"). This is because tagged-type objects are dynamic, and
we need to apply a small transformation in order to get their actual
type. This is already done on the GDB/CLI side in ada-valprint,
and it needs to be done on the ada-varobj side as well.

gdb/ChangeLog:

        * ada-varobj.c (ada_varobj_adjust_for_child_access): Convert
        tagged type objects to their actual type.

gdb/testsuite/ChangeLog:

        * gdb.ada/mi_interface: New testcase.

11 years agoAda: Fix missing call to pretty-printer for fields of records.
Joel Brobecker [Thu, 19 Dec 2013 17:26:55 +0000 (21:26 +0400)] 
Ada: Fix missing call to pretty-printer for fields of records.

Consider the following types:

   type Time_T is record
      Secs : Integer;
   end record;
   Before : Time_T := (Secs => 1384395743);

In this example, we assume that type Time_T is the number of seconds
since Epoch, and so added a Python pretty-printer, to print this
type in a more human-friendly way. For instance:

    (gdb) print before
    $1 = Thu Nov 14 02:22:23 2013 (1384395743)

However, we've noticed that things stop working when this type is
embedded inside another record, and we try to print that record.
For instance, with the following declarations:

   type Composite is record
      Id : Integer;
      T : Time_T;
   end record;
   Afternoon : Composite := (Id => 1, T => (Secs => 1384395865));

    (gdb) print afternoon
    $2 = (id => 1, t => (secs => 1384395865))

We expected instead:

    (gdb) print afternoon
    $2 = (id => 1, t => Thu Nov 14 02:24:25 2013 (1384395865))

This patch fixes the problem by making sure that we try to print
each field via a call to val_print, rather than calling ada_val_print
directly. We need to go through val_print, as the val_print
handles all language-independent features such as calling the
pretty-printer, knowing that ada_val_print will get called eventually
if actual Ada-specific printing is required (which should be the
most common scenario).

And because val_print takes the language as parameter, we enhanced
the print_field_values and print_variant_part to also take a language.
As a bonus, this allows us to remove a couple of references to
current_language.

gdb/ChangeLog:

        * ada-valprint.c (print_field_values): Add "language" parameter.
        Update calls to print_field_values and print_variant_part.
        Pass new parameter "language" in call to val_print instead
        of "current_language".  Replace call to ada_val_print by call
        to val_print.
        (print_variant_part): Add "language" parameter.
        (ada_val_print_struct_union): Update call to print_field_values.

gdb/testsuite/ChangeLog:

        * gdb.ada/pp-rec-component.exp, gdb.ada/pp-rec-component.py,
        gdb.ada/pp-rec-component/foo.adb, gdb.ada/pp-rec-component/pck.adb,
        gdb.ada/pp-rec-component/pck.ads: New files.

11 years agoada_print_floating: Remove use of statically sized buffer.
Joel Brobecker [Thu, 19 Dec 2013 16:19:45 +0000 (20:19 +0400)] 
ada_print_floating: Remove use of statically sized buffer.

ada_print_floating declares a char buffer with a size that we're hoping
to always be large enough to hold any string representation of a float
value.  But that's not really necessary, and also forces us to create
a small wrapper (ui_memcpy) to perform the extraction from a temporary
stream into this buffer.  This patches fixes both issues by relying on
ui_file_xstrdup.  This forces us to make a few adjustments that are
minor in nature, as we now need to defer the cleanup to the end of
the function.

gdb/ChangeLog:

        * ada-valprint.c (ui_memcpy): Delete.
        (ada_print_floating): Update documentation.  Add empty line
        between between function documentation and implementation.
        Delete variable "buffer".  Use ui_file_xstrdup in place of
        ui_file_put.  Minor adjustments following this change.

11 years agoExtract string-printing out of ada_val_print_array
Joel Brobecker [Thu, 19 Dec 2013 16:06:46 +0000 (20:06 +0400)] 
Extract string-printing out of ada_val_print_array

This patch creates a new function called "ada_val_print_string"
whose code is directly extracted out of ada_val_print_array.
The extracted code is then replaced by a call to this new function,
followed by a "return". The return avoids the need for an "else"
branch, with the associated block nesting. The latter is not really
terrible in this case, but it seems more readable this way.

gdb/ChangeLog:

        * ada-valprint.c (ada_val_print_string): New function,
        extracted from ada_val_print_array.
        (ada_val_print_array): Replace extracted code by call
        to ada_val_print_string followed by a return.  Move
        "else" branch to the function's top block.

11 years agomove ada_val_print_array down within other ada_val_print* functions
Joel Brobecker [Thu, 19 Dec 2013 15:43:57 +0000 (19:43 +0400)] 
move ada_val_print_array down within other ada_val_print* functions

This patch moves ada_val_print_array to group it with the other
ada_val_print_* function which are being called by ada_val_print_1.
Since this function is in the same situation, it is more logical
to move it within that group.

It also rationalizes the function's prototype to match the prototype
of the other ada_val_print_* routines.

gdb/ChangeLog:

        * ada-valprint.c (ada_val_print_array): Move implementation
        down.  Rename parameter "offset" and "val" into "offset_aligned"
        and "original_value" respectively.  Add parameter "offset".

11 years agorewrite ada_val_print_ref to reduce if/else block nesting depth
Joel Brobecker [Thu, 19 Dec 2013 15:26:27 +0000 (19:26 +0400)] 
rewrite ada_val_print_ref to reduce if/else block nesting depth

The logic as currently implemented in this function was a little
difficult to follow, due to the nested of if/else conditions,
but most of the time, the "else" block was very simple. So this
patch re-organizes the code to use fewer levels of nesting by
using return statements, and writing the code as a sequence of
"if something simple, then handle it and return" blocks.

While touching this code, this patch changes the cryptic "???"
printed when trying to print a reference pointing to an undefined
type. This should only ever happen if the debugging information
was corrupted or improperly read. But in case that happens, we now
print "<ref to undefined type>" instead. This is more in line
with how we print other conditions such as optimized out pieces,
or synthetic pointers.

gdb/ChangeLog:

        * ada-valprint.c (ada_val_print_ref): Rewrite by mostly
        re-organizing the code. Change the "???" message printed
        when target type is a TYPE_CODE_UNDEF into
        "<ref to undefined type>".

11 years agoada-valprint.c: Inline print_record inside ada_val_print_struct_union
Joel Brobecker [Thu, 19 Dec 2013 15:11:49 +0000 (19:11 +0400)] 
ada-valprint.c: Inline print_record inside ada_val_print_struct_union

The function print_record is a fairly small and straightforward
function which is only called from one location. So this patch
inlines the code at the point of call.

One small advantage is that the context of use of this patch has
now become such that we can assume that TYPE is not a typedef,
nor an enum. So thhe call to ada_check_typedef is unnecessary,
and this patch removes it.

gdb/ChangeLog:

        * ada-valprint.c (print_record): Delete, implementation inlined...
        (ada_val_print_struct_union): ... here.  Remove call to
        ada_check_typedef in inlined implementation.

11 years agoSplit ada_val_print_1 into smaller functions
Joel Brobecker [Thu, 19 Dec 2013 12:30:43 +0000 (16:30 +0400)] 
Split ada_val_print_1 into smaller functions

The idea of this patch is that it's hard to have a global view of
ada_val_print_1 because its body spans over too many lines. Also,
each individual "case" block within the giant "switch" can be hard
to isolate if spanning over multiple pages as well.

gdb/ChangeLog:

        * ada-valprint.c (ada_val_print_gnat_array): New function,
        extracted from ada_val_print_1;
        (ada_val_print_ptr, ada_val_print_num, ada_val_print_enum)
        (ada_val_print_flt, ada_val_print_struct_union)
        (ada_val_print_ref): Likewise.
        (ada_val_print_1): Delete variables i and elttype.
        Replace extracted-out code by call to corresponding
        new functions.

11 years agoRemove call to gdb_flush at end of ada_val_print_1
Joel Brobecker [Thu, 19 Dec 2013 11:48:39 +0000 (15:48 +0400)] 
Remove call to gdb_flush at end of ada_val_print_1

I am not sure why this function was called in the first place, but
it disrupts the printing flow when in GDB/MI mode, ending the current
console stream output, and starting a new one. It's not clear whether,
with the code as currently written, the problem is actually visible
or only latent. But, it becomes visible when we replace one of the
"return" statements in the "switch" block just above by a "break"
statement (this is something I'd like to do, and what made me realize
the problem). With the gdb_flush call (after having replaced the
"return" statement as explained above), we get:

        % gdb -q -i=mi ada_prg
        (gdb)
        print 1
        &"print 1\n"
  !! -> ~"$1 = 1"
  !! -> ~"\n"
        ^done

With the gdb_flush call removed, we now get the entire output into
a single stream.

        (gdb)
        print 1
        &"print 1\n"
        ~"$1 = 1"
        ~"\n"
        ^done

gdb/ChangeLog:

        * ada-valprint.c (ada_val_print_1): Remove call to gdb_flush.