external/binutils.git
11 years agominidebuginfo: ppc64 sync testcase->doc
Jan Kratochvil [Wed, 11 Sep 2013 08:29:46 +0000 (08:29 +0000)]
minidebuginfo: ppc64 sync testcase->doc

gdb/doc/
2013-09-11  Jan Kratochvil  <jan.kratochvil@redhat.com>

Sync documentation with gdb.base/gnu-debugdata.exp.
* gdb.texinfo (MiniDebugInfo): Add comment and "D" in the example.

11 years agominidebuginfo: Obvious changes
Jan Kratochvil [Wed, 11 Sep 2013 08:28:04 +0000 (08:28 +0000)]
minidebuginfo: Obvious changes

gdb/doc/
2013-09-11  Jan Kratochvil  <jan.kratochvil@redhat.com>

* gdb.texinfo (MiniDebugInfo): Fix two trailing dots.

gdb/testsuite/
2013-09-11  Jan Kratochvil  <jan.kratochvil@redhat.com>

* gdb.base/gnu-debugdata.exp (strip): Add -R .comment.
(addlink): Add comment.

11 years agodaily update
Alan Modra [Wed, 11 Sep 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agomerge from gcc
DJ Delorie [Tue, 10 Sep 2013 19:01:22 +0000 (19:01 +0000)]
merge from gcc

11 years ago * dwarf.c (display_debug_frames): Check for DW64_CIE_ID when
Nick Clifton [Tue, 10 Sep 2013 16:19:08 +0000 (16:19 +0000)]
* dwarf.c (display_debug_frames): Check for DW64_CIE_ID when
parsing 64-bit frames.

11 years agomerge from gcc
DJ Delorie [Tue, 10 Sep 2013 16:05:02 +0000 (16:05 +0000)]
merge from gcc

11 years ago2013-09-10 Andreas Arnez <arnez@linux.vnet.ibm.com>
Ulrich Weigand [Tue, 10 Sep 2013 15:05:23 +0000 (15:05 +0000)]
2013-09-10  Andreas Arnez  <arnez@linux.vnet.ibm.com>

* config/s390/s390.mh (NATDEPFILES): Add linux-waitpid.o.

11 years agotest: adjust 'cd' regexpr to match an optional canonically pathname
Sanimir Agovic [Tue, 10 Sep 2013 07:32:25 +0000 (07:32 +0000)]
test: adjust 'cd' regexpr to match an optional canonically pathname

New regexpr now correctly deals with trailing canonical pathname.

Before only the following output was matched:
(gdb) cd
Working directory /users/foo

In addition it now matches an optional trailing canonical pathname:
(gdb) cd
Working directory /users/foo
 (canonically /nfs/users/foo).

Triggered by `realpath .` != `pwd`

2013-09-10  Sanimir Agovic  <sanimir.agovic@intel.com>

testsuite/
* gdb.base/default.exp: Adjust regexpr for 'cd' to match optional
canonical pathname.

11 years agodaily update
Alan Modra [Tue, 10 Sep 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agoRemove use of deprecated_init_ui_hook from quit_confirm.
Andrew Burgess [Mon, 9 Sep 2013 12:13:58 +0000 (12:13 +0000)]
Remove use of deprecated_init_ui_hook from quit_confirm.

  https://sourceware.org/ml/gdb-patches/2013-09/msg00224.html

gdb/ChangeLog

        * top.c (quit_confirm): Remove use of deprecated_init_ui_hook.

11 years agodaily update
Alan Modra [Mon, 9 Sep 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agodaily update
Alan Modra [Sun, 8 Sep 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agodaily update
Alan Modra [Sat, 7 Sep 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agoremote-sim.c: Send debug output to gdb_stdlog.
Pedro Alves [Fri, 6 Sep 2013 18:29:42 +0000 (18:29 +0000)]
remote-sim.c: Send debug output to gdb_stdlog.

Tested by building for --target=arm-eabi, and playing with the debug
output a bit.

gdb/
2013-09-06  Pedro Alves <palves@redhat.com>

* remote-sim.c (dump_mem, gdbsim_fetch_register)
(gdbsim_store_register, gdbsim_kill, gdbsim_load)
(gdbsim_create_inferior, gdbsim_open, gdbsim_close)
(gdbsim_detach, gdbsim_resume_inferior, gdbsim_wait)
(gdbsim_files_info, gdbsim_mourn_inferior): Send debug output to
gdb_stdlog.

11 years agoremote-sim.c: Don't install a deprecated_xfer_memory method.
Pedro Alves [Fri, 6 Sep 2013 18:10:39 +0000 (18:10 +0000)]
remote-sim.c: Don't install a deprecated_xfer_memory method.

Manually tested with a --target=arm-eabi build, and doing things like:

$ arm-eabi-gcc ~/gdb/tests/main.c -o a.out -c -g
$ ./gdb a.out
...
(gdb) tar sim
(gdb) load
(gdb) disassemble 0
Dump of assembler code for function main:
   0x00000000 <+0>:     mov     r12, sp
   0x00000004 <+4>:     push    {r11, r12, lr, pc}
   0x00000008 <+8>:     sub     r11, r12, #4
   0x0000000c <+12>:    sub     sp, sp, #8
   0x00000010 <+16>:    str     r0, [r11, #-16]
   0x00000014 <+20>:    str     r1, [r11, #-20]
   0x00000018 <+24>:    mov     r3, #0
   0x0000001c <+28>:    mov     r0, r3
   0x00000020 <+32>:    sub     sp, r11, #12
   0x00000024 <+36>:    ldm     sp, {r11, sp, pc}
End of assembler dump.
(gdb) p *0 = 1
        0x00000001

gdb/
2013-09-06  Pedro Alves  <palves@redhat.com>

* remote-sim.c (dump_mem): Constify buf parameter.
gdbsim_xfer_inferior_memory): Rename to ...
(gdbsim_xfer_memory): ... this.  Adjust interface as
target_xfer_partial helper.
(gdbsim_xfer_partial): New function.
(init_gdbsim_ops): Don't install a deprecated_xfer_memory hook.
Install a to_xfer_partial hook.  Send output to gdb_stdlog.

11 years agoremote-sim.c: cleanup debug output code.
Pedro Alves [Fri, 6 Sep 2013 17:41:50 +0000 (17:41 +0000)]
remote-sim.c: cleanup debug output code.

Manually tested with a --target=arm-eabi build, and doing

$ arm-eabi-gcc ~/gdb/tests/main.c -o a.out -c -g
$ ./gdb a.out
...
(gdb) tar sim
(gdb) load
(gdb) set debug remote 1
(gdb) disassemble 0
Dump of assembler code for function main:
gdbsim_xfer_inferior_memory: myaddr 0x7fffffffd400, memaddr 0x0, len 4, write 0
   0x00000000 <+0>:             0xe1a0c00d
mov     r12, sp
gdbsim_xfer_inferior_memory: myaddr 0x7fffffffd400, memaddr 0x4, len 4, write 0
   0x00000004 <+4>:             0xe92dd800
push    {r11, r12, lr, pc}
gdbsim_xfer_inferior_memory: myaddr 0x7fffffffd400, memaddr 0x8, len 4, write 0
   0x00000008 <+8>:             0xe24cb004
sub     r11, r12, #4
gdbsim_xfer_inferior_memory: myaddr 0x7fffffffd400, memaddr 0xc, len 4, write 0
   0x0000000c <+12>:            0xe24dd008
sub     sp, sp, #8
gdbsim_xfer_inferior_memory: myaddr 0x7fffffffd400, memaddr 0x10, len 4, write 0
   0x00000010 <+16>:            0xe50b0010
str     r0, [r11, #-16]
gdbsim_xfer_inferior_memory: myaddr 0x7fffffffd400, memaddr 0x14, len 4, write 0
   0x00000014 <+20>:            0xe50b1014
str     r1, [r11, #-20]
gdbsim_xfer_inferior_memory: myaddr 0x7fffffffd400, memaddr 0x18, len 4, write 0
   0x00000018 <+24>:            0xe3a03000
mov     r3, #0
gdbsim_xfer_inferior_memory: myaddr 0x7fffffffd400, memaddr 0x1c, len 4, write 0
   0x0000001c <+28>:            0xe1a00003
mov     r0, r3
gdbsim_xfer_inferior_memory: myaddr 0x7fffffffd400, memaddr 0x20, len 4, write 0
   0x00000020 <+32>:            0xe24bd00c
sub     sp, r11, #12
gdbsim_xfer_inferior_memory: myaddr 0x7fffffffd400, memaddr 0x24, len 4, write 0
   0x00000024 <+36>:            0xe89da800
ldm     sp, {r11, sp, pc}
End of assembler dump.
(gdb) p *0 = 1
gdbsim_xfer_inferior_memory: myaddr 0xc69bc0, memaddr 0x0, len 4, write 1
        0x00000001
$1 = 1

Which happens to differ from before, I think due to stdout line buffering:

(gdb) disassemble 0
Dump of assembler code for function main:
   0x00000000 <+0>:     gdbsim_xfer_inferior_memory: myaddr 0x0x7fffffffd400, memaddr 0x0, len 4, write 0
        0xe1a0c00d

But the new output looks reasonable to me, better even.

gdb/
2013-09-06  Pedro Alves  <palves@redhat.com>

* remote-sim.c (gdbsim_xfer_inferior_memory): Use
host_address_to_string, and send debug output to gdb_stdlog.

11 years ago[gdbserver] Garbage collect unused dependency-tracking Makefile variables.
Pedro Alves [Fri, 6 Sep 2013 12:04:56 +0000 (12:04 +0000)]
[gdbserver] Garbage collect unused dependency-tracking Makefile variables.

These used to be necessary for manual rule dependency tracking.
Nothing uses them anymore.  (regdat_sh is still needed.)

gdb/gdbserver/
2013-09-06  Pedro Alves  <palves@redhat.com>

* Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
(signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
(linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
(server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
(gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
(mips_linux_watch_h, i386_low_h, win32_low_h): Delete.

11 years ago[gdbserver] Update a couple Makefile rules.
Pedro Alves [Fri, 6 Sep 2013 11:54:07 +0000 (11:54 +0000)]
[gdbserver] Update a couple Makefile rules.

These two are still written in the pre-auto-dependency-tracking style.
They probably were written before that, and committed afterwards
without adjustment.  An easy oversight to make.

gdb/gdbserver/
2013-09-06  Pedro Alves  <palves@redhat.com>

* Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
explicit header dependencies and use $COMPILE/$POSTCOMPILE.

11 years ago[gdbserver] Fix IPA build.
Pedro Alves [Fri, 6 Sep 2013 10:58:11 +0000 (10:58 +0000)]
[gdbserver] Fix IPA build.

Somehow, my builds yesterdays didn't trip on this...

../src/gdb/gdbserver/linux-amd64-ipa.c: In function ‘initialize_low_tracepoint’:
../src/gdb/gdbserver/linux-amd64-ipa.c:172:3: error: ‘ipa_tdesc’ undeclared (first use in this function)
../src/gdb/gdbserver/linux-amd64-ipa.c:172:3: note: each undeclared identifier is reported only once for each function it appears in

gdb/gdbserver/
2013-09-06  Pedro Alves  <palves@redhat.com>

* linux-amd64-ipa.c: Include tracepoint.h.
* linux-i386-ipa.c: Include tracepoint.h.

11 years agoExtract Linux-specific portitions of cris-tdep.c to a new file.
Ricard Wanderlof [Fri, 6 Sep 2013 10:50:10 +0000 (10:50 +0000)]
Extract Linux-specific portitions of cris-tdep.c to a new file.
This brings in some standard functionality hitherdo missing from
the CRIS/CRISv32 port thanks to the new call to gdbarch_init_osabi,
as well as clearly showing that there is Linux support for this
platform by virtue of the existence of a cris-linux-tdep.c file.

2013-09-06  Ricard Wanderlof  <ricardw@axis.com>

* Makefile.in (ALL_TARGET_OBS): Add cris-linux-tdep.o.
* configure.tgt: Add cris-linux-tdep.o and linux-tdep.o to
gdb_target_obs for cris target.
* cris-tdep.c (struct gdbarch_tdep): Move to cris-tdep.h.
(cris_gdbarch_init): Move calls to
set_gdbarch_fetch_tls_load_module_address and
set_solib_svr4_fetch_link_map_offsets to cris-linux-tdep.c.
Add call to gdbarch_init_osabi.
* cris-linux-tdep.c: New file.
* cris-tdep.h: New file.

11 years agoOBVIOUS: Remove legacy comment referring to deprecated_init_ui_hook.
Andrew Burgess [Fri, 6 Sep 2013 10:12:20 +0000 (10:12 +0000)]
OBVIOUS: Remove legacy comment referring to deprecated_init_ui_hook.

gdb/ChangeLog

* tui/tui-io.c (tui_initialize_io): Remove legacy comment referring
to deprecated_init_ui_hook.

11 years agoGive every interpreter a command_loop_proc.
Andrew Burgess [Fri, 6 Sep 2013 08:53:09 +0000 (08:53 +0000)]
Give every interpreter a command_loop_proc.

  https://sourceware.org/ml/gdb-patches/2013-09/msg00179.html

gdb/ChangeLog

        * cli/cli-interp.c (_initialize_cli_interp): Add a
        command_loop_proc to interp_procs.
        * event-top.c (cli_command_loop): Change signature to match
        interp_command_loop_ftype.
        * event-top.h (cli_command_loop): Same.
        * interps.c (interp_new): Require every interpreter to have a
        command_loop_proc.
        (current_interp_command_loop): Just call the command_loop_proc on
        the current interpreter.
        * tui/tui-interp.c (_initialize_tui_interp): Add a
        command_loop_proc to interp_procs.

11 years agoAdd support for threaded debugging for CRISv32.
Ricard Wanderlof [Fri, 6 Sep 2013 08:37:17 +0000 (08:37 +0000)]
Add support for threaded debugging for CRISv32.

2013-09-06  Ricard Wanderlof  <ricardw@axis.com>

* cris-tdep.c (cris_gdbarch_init): Add call to
get_gdbarch_fetch_tls_load_module_address.

gdbserver

* linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
(ps_get_thread_area): New function.

11 years agoFix filename format in previous ChangeLog entry.
Andrew Burgess [Fri, 6 Sep 2013 08:25:25 +0000 (08:25 +0000)]
Fix filename format in previous ChangeLog entry.

I used the wrong format for the filenames in a previous changelog entry, I
incorrectly included the "gdb/" prefix.

11 years agoCosmetic clean up of names of *elf_greg_t types for CRIS/CRISv32.
Ricard Wanderlof [Fri, 6 Sep 2013 08:23:46 +0000 (08:23 +0000)]
Cosmetic clean up of names of *elf_greg_t types for CRIS/CRISv32.

2013-09-06  Ricard Wanderlof  <ricardw@axis.com>

* cris-tdep.c (cris_elf_greg_t): Rename from elf_greg_t.
(cris_elf_gregset_t): Rename from elf_gregset_t.
(crisv32_elf_gregset_t): Adjust.
(cris_supply_gregset, fetch_core_registers): Adjust.

11 years agoTrivial patch to remove dependency on host unsigned long type
Ricard Wanderlof [Fri, 6 Sep 2013 08:14:33 +0000 (08:14 +0000)]
Trivial patch to remove dependency on host unsigned long type
from cris-tdep.c.

2013-09-06  Ricard Wanderlof  <ricardw@axis.com>

* cris-tdep.c (elf_greg_t): Change typedef to unsigned char[4]

11 years agoFix compilation for target gdbserver on CRISv32 platform.
Ricard Wanderlof [Fri, 6 Sep 2013 08:04:19 +0000 (08:04 +0000)]
Fix compilation for target gdbserver on CRISv32 platform.

One misspelled function call, and one superfluous typedef. The latter
causes an error of the following type when building:

linux-crisv32-low.c:372: error: conflicting types for 'elf_gregset_t'
/.../target/include/asm/elf.h:36:
error: previous declaration of 'elf_gregset_t' was here

2013-09-06  Ricard Wanderlof  <ricardw@axis.com>

* linux-crisv32-low.c (elf_gregset_t): Delete typedef.
(initialize_low_arch): Call init_registers_crisv32 rather than
init_register_crisv32.

11 years agodaily update
Alan Modra [Fri, 6 Sep 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agoAdd missing new files from these previous commits:
Pedro Alves [Thu, 5 Sep 2013 22:18:48 +0000 (22:18 +0000)]
Add missing new files from these previous commits:

2013-09-05  Pedro Alves  <palves@redhat.com>

* server.h (handle_vFile, hostio_last_error_from_errno): Move
to ...
* hostio.h: ... this new file.
* hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
win32-low.c: Include hostio.h.

2013-09-05  Pedro Alves  <palves@redhat.com>

* server.h (gdb_client_data, handler_func, callback_handler_func)
(delete_file_handler, add_file_handler, append_callback_event)
(delete_callback_event, start_event_loop, initialize_event_loop):
Move to event-loop.h and include it.
* event-loop.h: New file.

2013-09-05  Pedro Alves  <palves@redhat.com>

* dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
* server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
(loaded_dll, unloaded_dll): Move to ...
* dll.h: ... this new file.
* inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".

2013-09-05  Pedro Alves  <palves@redhat.com>

* server.h (current_process, get_thread_process, all_processes)
(add_inferior_to_list, for_each_inferior, current_inferior)
(remove_inferior, add_process, remove_process, find_process_pid)
(have_started_inferiors_p, have_attached_inferiors_p)
(thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
(clear_inferiors, find_inferior, find_inferior_id)
(inferior_target_data, set_inferior_target_data)
(inferior_regcache_data, set_inferior_regcache_data): Move to
inferiors.h, and include it.
* inferiors.h: New file.

2013-09-05  Pedro Alves  <palves@redhat.com>

* ax.c, linux-low.c, linux-x86-low.c, server.c: Include
tracepoint.h.
* server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
(disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
(handle_tracepoint_general_set, handle_tracepoint_query)
(tracepoint_finished_step, tracepoint_was_hit)
(release_while_stepping_state_list, current_traceframe)
(in_readonly_region, traceframe_read_mem)
(fetch_traceframe_registers, traceframe_read_sdata)
(traceframe_read_info, struct fast_tpoint_collect_status)
(fast_tracepoint_collecting, force_unlock_trace_buffer)
(handle_tracepoit_bkpts, initialize_low_tracepoint)
(supply_fast_tracepoint_registers)
(supply_static_tracepoint_registers, set_trampoline_buffer_space)
(ipa_tdesc, claim_trampoline_space)
(have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
(agent_mem_read, agent_get_trace_state_variable_value)
(agent_set_trace_state_variable_value, agent_tsv_read)
(agent_mem_read_string, get_raw_reg_func_addr)
(get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
* tracepoint.h: ... this new file.

2013-09-05  Pedro Alves  <palves@redhat.com>

* server.h (perror_with_name, error, fatal, warning, paddress)
(pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
include it.
* utils.h: New file.

2013-09-05  Pedro Alves  <palves@redhat.com>

* server.h (remote_debug, noack_mode, transport_is_reliable)
(gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
(read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
(getpkt, remote_prepare, remote_open, remote_close, write_ok)
(write_enn, initialize_async_io, enable_async_io)
(disable_async_io, check_remote_input_interrupt_request)
(convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
(dead_thread_notify, prepare_resume_reply)
(decode_address_to_semicolon, decode_address, decode_m_packet)
(decode_M_packet, decode_X_packet, decode_xfer_write)
(decode_search_memory_packet, unhexify, hexify)
(remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
(look_up_one_symbol, relocate_instruction)
(monitor_output): Move to remote-utils.h, and include it.
* remote-utils.h: New file.

11 years ago[gdbserver] Split a new hostio.h file out of server.h.
Pedro Alves [Thu, 5 Sep 2013 20:45:39 +0000 (20:45 +0000)]
[gdbserver] Split a new hostio.h file out of server.h.

gdb/gdbserver/
2013-09-05  Pedro Alves  <palves@redhat.com>

* server.h (handle_vFile, hostio_last_error_from_errno): Move
to ...
* hostio.h: ... this new file.
* hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
win32-low.c: Include hostio.h.

11 years ago[gdbserver] Split a new event-loop.h file out of server.h.
Pedro Alves [Thu, 5 Sep 2013 20:42:52 +0000 (20:42 +0000)]
[gdbserver] Split a new event-loop.h file out of server.h.

gdb/gdbserver/
2013-09-05  Pedro Alves  <palves@redhat.com>

* server.h (gdb_client_data, handler_func, callback_handler_func)
(delete_file_handler, add_file_handler, append_callback_event)
(delete_callback_event, start_event_loop, initialize_event_loop):
Move to event-loop.h and include it.
* event-loop.h: New file.

11 years ago[gdbserver] Split a new dll.h file out of server.h.
Pedro Alves [Thu, 5 Sep 2013 20:41:55 +0000 (20:41 +0000)]
[gdbserver] Split a new dll.h file out of server.h.

gdb/gdbserver/
2013-09-05  Pedro Alves  <palves@redhat.com>

* dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
* server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
(loaded_dll, unloaded_dll): Move to ...
* dll.h: ... this new file.
* inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".

11 years ago[gdbserver] Split a new inferiors.h file out of server.h.
Pedro Alves [Thu, 5 Sep 2013 20:41:22 +0000 (20:41 +0000)]
[gdbserver] Split a new inferiors.h file out of server.h.

gdb/gdbserver/
2013-09-05  Pedro Alves  <palves@redhat.com>

* server.h (current_process, get_thread_process, all_processes)
(add_inferior_to_list, for_each_inferior, current_inferior)
(remove_inferior, add_process, remove_process, find_process_pid)
(have_started_inferiors_p, have_attached_inferiors_p)
(thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
(clear_inferiors, find_inferior, find_inferior_id)
(inferior_target_data, set_inferior_target_data)
(inferior_regcache_data, set_inferior_regcache_data): Move to
inferiors.h, and include it.
* inferiors.h: New file.

11 years ago[gdbserver] Move bytecode compilation bits from server.h to ax.h.
Pedro Alves [Thu, 5 Sep 2013 20:40:58 +0000 (20:40 +0000)]
[gdbserver] Move bytecode compilation bits from server.h to ax.h.

gdb/gdbserver/
2013-09-05  Pedro Alves  <palves@redhat.com>

* server.h (struct emit_ops, current_insn_ptr, emit_error):
Move ...
        * ax.h: ... here.

11 years ago[gdbserver] Split a new tracepoint.h file out of server.h.
Pedro Alves [Thu, 5 Sep 2013 20:40:33 +0000 (20:40 +0000)]
[gdbserver] Split a new tracepoint.h file out of server.h.

gdb/gdbserver/
2013-09-05  Pedro Alves  <palves@redhat.com>

* ax.c, linux-low.c, linux-x86-low.c, server.c: Include
tracepoint.h.
* server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
(disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
(handle_tracepoint_general_set, handle_tracepoint_query)
(tracepoint_finished_step, tracepoint_was_hit)
(release_while_stepping_state_list, current_traceframe)
(in_readonly_region, traceframe_read_mem)
(fetch_traceframe_registers, traceframe_read_sdata)
(traceframe_read_info, struct fast_tpoint_collect_status)
(fast_tracepoint_collecting, force_unlock_trace_buffer)
(handle_tracepoit_bkpts, initialize_low_tracepoint)
(supply_fast_tracepoint_registers)
(supply_static_tracepoint_registers, set_trampoline_buffer_space)
(ipa_tdesc, claim_trampoline_space)
(have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
(agent_mem_read, agent_get_trace_state_variable_value)
(agent_set_trace_state_variable_value, agent_tsv_read)
(agent_mem_read_string, get_raw_reg_func_addr)
(get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
* tracepoint.h: ... this new file.

11 years ago[gdbserver] Split a new utils.h file out of server.h.
Pedro Alves [Thu, 5 Sep 2013 20:39:48 +0000 (20:39 +0000)]
[gdbserver] Split a new utils.h file out of server.h.

gdb/gdbserver/
2013-09-05  Pedro Alves  <palves@redhat.com>

* server.h (perror_with_name, error, fatal, warning, paddress)
(pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
include it.
* utils.h: New file.

11 years ago[gdbserver] Split a new remote-utils.h file out of server.h.
Pedro Alves [Thu, 5 Sep 2013 20:39:17 +0000 (20:39 +0000)]
[gdbserver] Split a new remote-utils.h file out of server.h.

gdb/gdbserver/
2013-09-05  Pedro Alves  <palves@redhat.com>

* server.h (remote_debug, noack_mode, transport_is_reliable)
(gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
(read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
(getpkt, remote_prepare, remote_open, remote_close, write_ok)
(write_enn, initialize_async_io, enable_async_io)
(disable_async_io, check_remote_input_interrupt_request)
(convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
(dead_thread_notify, prepare_resume_reply)
(decode_address_to_semicolon, decode_address, decode_m_packet)
(decode_M_packet, decode_X_packet, decode_xfer_write)
(decode_search_memory_packet, unhexify, hexify)
(remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
(look_up_one_symbol, relocate_instruction)
(monitor_output): Move to remote-utils.h, and include it.
* remote-utils.h: New file.

11 years ago[gdbserver] Delete _ macro (gettext).
Pedro Alves [Thu, 5 Sep 2013 20:38:45 +0000 (20:38 +0000)]
[gdbserver] Delete _ macro (gettext).

server.h nowadays includes gdb_locale.h, which already brings this in.

gdb/gdbserver/
2013-09-05  Pedro Alves  <palves@redhat.com>

* server.h (_): Delete.

11 years agoRemove deprecated_command_loop_hook.
Andrew Burgess [Thu, 5 Sep 2013 16:46:56 +0000 (16:46 +0000)]
Remove deprecated_command_loop_hook.

  https://sourceware.org/ml/gdb-patches/2013-09/msg00174.html

gdb/ChangeLog

        * gdb/defs.h (deprecated_command_loop_hook): Remove, including
        references in comments.
        * gdb/interps.c (current_interp_command_loop): No longer use
        deprecated_command_loop_hook.
        (clear_interpreter_hooks): Remove deprecated_command_loop_hook
        setup.
        * gdb/top.c (deprecated_command_loop_hook): Remove.

11 years agodwarf2loc.c: minor cleanup. don't print integer with paddress.
Pedro Alves [Thu, 5 Sep 2013 14:49:13 +0000 (14:49 +0000)]
dwarf2loc.c: minor cleanup. don't print integer with paddress.

A couple years ago, dwarf_expr_fetch used to return a CORE_ADDR.  It
was made to return a ULONGEST since, and the 'dwarf_regnum' local
adjusted accordingly, but, we kept printing it with paddress.
gdbarch_dwarf2_reg_to_regnum takes the register number as 'int', so
there's really no point in using ULONGEST/pulongest either.

gdb/
2013-09-05  Pedro Alves  <palves@redhat.com>

* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): 'dwarf_regnum'
local is now int instead of ULONGEST.  Print it with %d
instead of paddress.

11 years ago2013-09-05 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Thu, 5 Sep 2013 14:15:27 +0000 (14:15 +0000)]
2013-09-05  Tristan Gingold  <gingold@adacore.com>

* MAINTAINERS: Remove avr maintainership.

11 years agoRework value_of_register in terms of value_of_register_lazy.
Pedro Alves [Thu, 5 Sep 2013 14:02:16 +0000 (14:02 +0000)]
Rework value_of_register in terms of value_of_register_lazy.

I noticed that value_of_register (used for getting values _of_
registers ($pc, $rax, etc.), rather than variables _in_ registers),
kind of builds a franken-value, by propagating the lval and address of
the frame register value, but not the entire location, like necessary
for lval_computed (if some unwinder ever returns that, the resulting
value will misbehave).  This gets in the way of printing optimized out
(not saved) lval_registers differently from other optimized out
values, as it doesn't make sure the resulting value is lval_register.

I started out by just doing something like:

-  VALUE_LVAL (reg_val) = lval;
-  set_value_address (reg_val, addr);
+  VALUE_LVAL (reg_val) = lval_register;

... just like value_of_register_lazy below.  That's sufficient to fix
the issue.

Then I noticed this is using frame_register, which we should avoid
nowadays, for it returns elements of a value, but not all that's
sometimes necessary (unavailable-ness is all or nothing with it, for
instance), and considered using get_frame_register_value instead
(which returns a struct value), and value_contents_copy, just like
value_fetch_lazy's handling of lval_register.  But at that point, I
realized we might as well just defer all that work to
value_of_register_lazy/value_fetch_lazy...

Doing it this way adds a frame_find_by_id lookup (from within
value_fetch_lazy), while we already have a frame pointer handy in
value_of_register.  I considered factoring out the lazy register
fetching out of value_fetch_lazy, into a function that takes a frame
pointer and call that instead, avoiding the lookup, but then it looked
like too much complication for an early optimization, and went back to
keeping it simple.

Tested on x86_64 Fedora 17.

gdb/
2013-09-05  Pedro Alves  <palves@redhat.com>

* findvar.c (value_of_register): Rework in terms of
value_of_register_lazy.

11 years ago2013-09-05 Muhammad Bilal <mbilal@codesourcery.com>
Muhammad Bilal [Thu, 5 Sep 2013 13:13:25 +0000 (13:13 +0000)]
2013-09-05  Muhammad Bilal  <mbilal@codesourcery.com>

* symfile.c (add_symbol_file_command): Remove trailing
 whitespaces and blank line after comment.

11 years ago[TUI] Rewrite register-changed decision bits.
Pedro Alves [Thu, 5 Sep 2013 11:50:48 +0000 (11:50 +0000)]
[TUI] Rewrite register-changed decision bits.

I stumbled on the TUI's register-changed decision code before (used to
decided whether the register should be highlighted in the register
window), for it is trying to compare all the different possible states
and contents or previous/current register contents, and as such may
need updating whenever the value machinery changes to have more state.
It's just much simpler and more future proof to compare the
previous/current printable representation instead.

The bit in tui_register_format that returns early if the register has
no name gets a bit in the way of the new prototype (what to return in
that case? NULL, empty string, etc.?).  Fortunately, that check isn't
really necessary.  All the callers will have already skipped unnamed
registers.

gdb/
2013-09-05  Pedro Alves  <palves@redhat.com>

* tui/tui-regs.c (tui_register_format): Don't look at the
register's name here.  Return string representing register
value instead of storing it in the data element.
(tui_get_register): Compare register string representations
instead of register value states and contents.

11 years ago[PR tui/15933] TUI shows registers of the wrong frame the first time
Pedro Alves [Thu, 5 Sep 2013 11:20:16 +0000 (11:20 +0000)]
[PR tui/15933] TUI shows registers of the wrong frame the first time

I've stumbled on this by inspection.

When the TUI's register window is first displayed, it always shows the
registers of the current frame, instead of of the selected frame,
which is obviously bogus.

E.g.,

 (gdb) step             # into "function"
 (gdb) up
 (gdb) tui reg general  # or C-x 2, C-x 2

shows the registers of "function", rather than the caller's.

A subsequent:

 (gdb) frame

or

 (gdb) down
 (gdb) up

can be used as workaround to "fix" it.

gdb/
2013-09-05  Pedro Alves  <palves@redhat.com>

PR tui/15933
* tui/tui-regs.c (tui_show_registers): Show registers of the
selected frame, not the current frame.

11 years ago2013-09-05 Ricard Wanderlof <ricardw@axis.com>
Ricard Wanderlof [Thu, 5 Sep 2013 08:22:15 +0000 (08:22 +0000)]
2013-09-05  Ricard Wanderlof  <ricardw@axis.com>

* MAINTAINERS: Add myself to Write After Approval.

11 years agodaily update
Alan Modra [Thu, 5 Sep 2013 00:00:05 +0000 (00:00 +0000)]
daily update

11 years ago * gdb.python/py-events.py (exit_handler): Verify we get the expected
Doug Evans [Wed, 4 Sep 2013 23:49:21 +0000 (23:49 +0000)]
* gdb.python/py-events.py (exit_handler): Verify we get the expected
event.
(continue_handler, new_objfile_handler): Ditto.
(test_events): Rename command to "test-events".
(test_newobj_events): Rename command to "test-objfile-events".
* gdb.python/py-events.exp: Update.
* gdb.python/py-evsignal.exp: Update.
* gdb.python/py-evthreads.exp: Update.

11 years ago * dwarf2read.c (queue_and_load_all_dwo_tus): New function.
Doug Evans [Wed, 4 Sep 2013 23:05:32 +0000 (23:05 +0000)]
* dwarf2read.c (queue_and_load_all_dwo_tus): New function.
(queue_and_load_dwo_tu): New function.
(lookup_dwo_signatured_type): Set per_cu.tu_read.
(maybe_queue_comp_unit): Rename this_cu argument to dependent_cu.
Make dependent_cu optional.
(dw2_do_instantiate_symtab): If we just loaded a CU from a DWO,
and an older .gdb_index is in use, queue and load all its TUs too.

testsuite/
* gdb.base/enumval.c (ZERO): New enum value.
(main): Use it
* gdb.base/enumval.exp: Test ability to print ZERO.

11 years agoCode cleanup: Change OPF_DISABLE_REALPATH to OPF_RETURN_REALPATH.
Jan Kratochvil [Wed, 4 Sep 2013 20:09:39 +0000 (20:09 +0000)]
Code cleanup: Change OPF_DISABLE_REALPATH to OPF_RETURN_REALPATH.

gdb/
2013-09-04  Jan Kratochvil  <jan.kratochvil@redhat.com>

Code cleanup: Change OPF_DISABLE_REALPATH to OPF_RETURN_REALPATH.
* cli/cli-cmds.c (find_and_open_script): Add OPF_RETURN_REALPATH to
variable search_flags.
* defs.h (OPF_DISABLE_REALPATH): Rename to ...
(OPF_RETURN_REALPATH): ... here.
* dwarf2read.c (try_open_dwop_file): Set OPF_RETURN_REALPATH for flags.
* exec.c (exec_file_attach): Remove OPF_DISABLE_REALPATH from openp
call.  Twice.
* nto-tdep.c (nto_find_and_open_solib): Add OPF_RETURN_REALPATH for
openp call.
* solib.c (solib_find): Likewise.  Four times.
* source.c (openp): Change OPF_DISABLE_REALPATH to OPF_RETURN_REALPATH
in the function comment and for the realpath_fptr variable.
(source_full_path_of): Add OPF_RETURN_REALPATH for openp call.
(find_and_open_source): Likewise.  Twice.
* symfile.c (symfile_bfd_open): Likewise, also twice.

11 years ago * progspace.c (save_current_space_and_thread): Remove unnecessary
Doug Evans [Wed, 4 Sep 2013 19:53:11 +0000 (19:53 +0000)]
* progspace.c (save_current_space_and_thread): Remove unnecessary
call to save_current_inferior.

11 years agoAvoid printing unavailable/optimized out registers (sh64-tdep.c)
Andrew Burgess [Wed, 4 Sep 2013 16:34:07 +0000 (16:34 +0000)]
Avoid printing unavailable/optimized out registers (sh64-tdep.c)

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

gdb/ChangeLog

        * sh64-tdep.c (sh64_do_register): Return after printing message
        about unavailable register contents.

11 years agold/testsuite/
Yufeng Zhang [Wed, 4 Sep 2013 14:35:13 +0000 (14:35 +0000)]
ld/testsuite/

2013-09-04  Vidya Praveen  <vidyapraveen@arm.com>

* ld-arm/export-class.exp: Fix the condition.

11 years agogas/
Tristan Gingold [Wed, 4 Sep 2013 12:28:11 +0000 (12:28 +0000)]
gas/
* config/tc-ppc.c (md_apply_fix): Handle defined after use toc
symbols.

gas/testsuite/
* gas/ppc/aix.exp: Run xcoff-toc-1 test.
* gas/ppc/xcoff-toc-1.s, gas/ppc/xcoff-toc-1.d: New test.

11 years ago PR gas/15914
Nick Clifton [Wed, 4 Sep 2013 07:59:33 +0000 (07:59 +0000)]
PR gas/15914

* config/tc-arm.c (T16_32_TAB): Add _udf.
(do_t_udf): New function.
(insns): Add "udf".

* gas/arm/udf-bad.s: New file.
* gas/arm/udf-bad.d: New file.
* gas/arm/udf-bad.l: New file.
* gas/arm/udf.s: New file.
* gas/arm/udf.d: New file.
* gas/arm/udf.l: New file.

* arm-dis.c (arm_opcodes): Add udf.
(thumb_opcodes): Use "udf" mnemonic rather than UNDEFINED_INSTRUCTION.
(thumb32_opcodes): Add udf.w.
(print_insn_thumb32): Handle %H as the thumb32_opcodes comment says.

11 years ago2013-09-04 Muhammad Bilal <mbilal@codesourcery.com>
Muhammad Bilal [Wed, 4 Sep 2013 06:17:08 +0000 (06:17 +0000)]
2013-09-04  Muhammad Bilal  <mbilal@codesourcery.com>
            Pedro Alves  <palves@redhat.com>

* symfile.c (add_symbol_file_command): Error out on unknown
        option.  Handle EXPECTING_SEC_ADDR/EXPECTING_SEC_NAME before '-'
        options and collapse into single conditional branch.
2013-09-13  Muhammad Bilal  <mbilal@codesourcery.com>
            Pedro Alves  <palves@redhat.com>

* gdb.base/relocate.exp: Check that invalid options are
rejected.

11 years agodaily update
Alan Modra [Wed, 4 Sep 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agosim: mark complete_option_list args const to fix build warnings
Mike Frysinger [Tue, 3 Sep 2013 20:45:08 +0000 (20:45 +0000)]
sim: mark complete_option_list args const to fix build warnings

The completion API was updated, but this func missed having its
text/word args const.

11 years agoUse relative relocation for R_X86_64_32 on x32
H.J. Lu [Tue, 3 Sep 2013 17:38:57 +0000 (17:38 +0000)]
Use relative relocation for R_X86_64_32 on x32

2013-09-03  Pavel Chupin  <pavel.v.chupin@intel.com>

PR gold/15927
* x86_64.cc (Target_x86_64<size>::Scan::global): Use relative
relocation for R_X86_64_32 on x32.

11 years ago * inf-child.c (inf_child_follow_fork) New parameter
Luis Machado [Tue, 3 Sep 2013 17:22:45 +0000 (17:22 +0000)]
* inf-child.c (inf_child_follow_fork) New parameter
detach_fork.
* inf-ptrace.c (inf_ptrace_follow_fork): Likewise.
* inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
* inferior.h (detach_fork): Remove.
* infrun.c (detach_fork): Adjust comment and make it
static.
(follow_fork): Pass detach_fork parameter to
target_follow_fork.
* linux-nat.c (linux_child_follow_fork): New parameter
detach_fork.
* target.c (target_follow_fork): New parameter detach_fork.
Pass detach_fork as parameter and print its value.
* target.h (struct target_ops) <to_follow_fork>: New int
parameter.
(target_follow_fork): New parameter detach_fork.

11 years agoFix build failure in solib-ia64-hpux.c
Joel Brobecker [Tue, 3 Sep 2013 16:59:18 +0000 (16:59 +0000)]
Fix build failure in solib-ia64-hpux.c

The field "bfd" no longer exists in struct target_section.
Use the_bfd_section->owner instead.

gdb/ChangeLog:

        * solib-ia64-hpux.c (ia64_hpux_relocate_section_addresses):
        Replace sec->bfd by sec->the_bfd_section->owner.

11 years agodaily update
Alan Modra [Tue, 3 Sep 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agogdb/
Yao Qi [Mon, 2 Sep 2013 23:09:57 +0000 (23:09 +0000)]
gdb/

* linux-tdep.c (linux_is_uclinux): New function.  Code moved
from linux_has_shared_address_space.
(linux_has_shared_address_space): Call linux_is_uclinux.
* linux-tdep.h (linux_is_uclinux): Declare.
* m68klinux-tdep.c (m68k_linux_get_sigtramp_info): Call
linux_is_uclinux.

11 years agogdb/
Yao Qi [Mon, 2 Sep 2013 23:07:07 +0000 (23:07 +0000)]
gdb/

* config/djgpp/fnchange.lst: Remove entry of
i386-interix-nat.c and i386-interix-tdep.c.
* configure.ac: Remove '*-*-interix*'.
* configure: Re-generated.
* defs.h (enum gdb_osabi): Remove GDB_OSABI_INTERIX.
* i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Remove
obsolete comments.
* osabi.c (gdb_osabi_names): Remove "Interix".

11 years agogdb/
Yao Qi [Mon, 2 Sep 2013 23:00:29 +0000 (23:00 +0000)]
gdb/

* arch-utils.c: Fix typo in the comment to gdbarch_update_p.

11 years ago[gdbserver] Fix trace-buffer-size.exp FAILs.
Pedro Alves [Mon, 2 Sep 2013 15:15:57 +0000 (15:15 +0000)]
[gdbserver] Fix trace-buffer-size.exp FAILs.

I'm seeing trace-buffer-size.exp failing (with gdbserver):

  (gdb) PASS: gdb.trace/trace-buffer-size.exp: tstatus check 2
  show trace-buffer-size 4
  Requested size of trace buffer is 4.
  (gdb) PASS: gdb.trace/trace-buffer-size.exp: show trace buffer size
  set trace-buffer-size -1
  memory clobbered past end of allocated block
  Remote connection closed
  (gdb) FAIL: gdb.trace/trace-buffer-size.exp: set trace buffer size 2
  set trace-buffer-size unlimited
  (gdb) PASS: gdb.trace/trace-buffer-size.exp: set trace-buffer-size unlimited

That "memory clobbered past end of allocated block" is mcheck triggering.

Valgrind shows:

  ==23624== Invalid write of size 1
  ==23624==    at 0x418DD8: clear_trace_buffer (tracepoint.c:1443)
  ==23624==    by 0x418F3A: init_trace_buffer (tracepoint.c:1497)
  ==23624==    by 0x41D95B: cmd_bigqtbuffer_size (tracepoint.c:4061)
  ==23624==    by 0x41DEEC: handle_tracepoint_general_set (tracepoint.c:4193)

clear_trace_buffer does:

  static void
  clear_trace_buffer (void)
  {
    trace_buffer_start = trace_buffer_lo;
    trace_buffer_free = trace_buffer_lo;
    trace_buffer_end_free = trace_buffer_hi;
    trace_buffer_wrap = trace_buffer_hi;
    /* A traceframe with zeroed fields marks the end of trace data.  */
    ((struct traceframe *) trace_buffer_free)->tpnum = 0;
    ((struct traceframe *) trace_buffer_free)->data_size = 0;
    traceframe_read_count = traceframe_write_count = 0;
    traceframes_created = 0;
  }

And the tpnum+data_size fields are over 4 bytes...  This fixes it by
ensuring we allocate space at least for an EOB.  We have code
elsewhere that relies on the EOB being present (like e.g.,
find_traceframe), so this seems simplest.

gdb/gdbserver/
2013-09-02  Pedro Alves  <palves@redhat.com>

* tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
(init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
allocated.
(trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.

11 years agorecord: upcase record_print_flag enumeration constants
Markus Metzger [Mon, 2 Sep 2013 15:06:11 +0000 (15:06 +0000)]
record: upcase record_print_flag enumeration constants

* record.h (record_print_flag) <record_print_src_line,
record_print_insn_range>: Rename into ...
(record_print_flag) <record_print_src_line,
record_print_insn_range>: ... this.  Update all users.

11 years ago * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
Pierre Muller [Mon, 2 Sep 2013 14:32:19 +0000 (14:32 +0000)]
* win32-low.c (child_xfer_memory): Check if ReadProcessMemory
or WriteProcessMemory complete successfully and handle
ERROR_PARTIAL_COPY error.

11 years agoserver.c:gdb_read_memory: Fix error return.
Pedro Alves [Mon, 2 Sep 2013 14:14:58 +0000 (14:14 +0000)]
server.c:gdb_read_memory: Fix error return.

When I added gdb_read_memory, with bits factored out from elsewhere, I
missed adjusting this error return.  gdb_read_memory has an interface
similar to Like GDB's xfer_partial:

> /* Read trace frame or inferior memory.  Returns the number of bytes
>   actually read, zero when no further transfer is possible, and -1 on
>   error.  Return of a positive value smaller than LEN does not
>   indicate there's no more to be read, only the end of the transfer.

Returning EIO, a positive value, is obviously bogus, for the caller
will confuse it with a successful partial transfer.

Found by inspection.

Tested on x86_64 Fedora 17.

gdb/gdbserver/
2013-09-02  Pedro Alves  <palves@redhat.com>

* server.c (gdb_read_memory): Return -1 on traceframe memory read
error instead of EIO.

11 years ago Fix small indentation error in last commit
Pierre Muller [Mon, 2 Sep 2013 13:11:13 +0000 (13:11 +0000)]
 Fix small indentation error in last commit

11 years ago * windows-nat.c (windows_xfer_memory): Handle ERROR_PARTIAL_COPY
Pierre Muller [Mon, 2 Sep 2013 12:57:49 +0000 (12:57 +0000)]
* windows-nat.c (windows_xfer_memory): Handle ERROR_PARTIAL_COPY
error code.

11 years ago * windows-nat.c (windows_xfer_memory): Fix compilation failure
Pierre Muller [Mon, 2 Sep 2013 12:45:55 +0000 (12:45 +0000)]
* windows-nat.c (windows_xfer_memory): Fix compilation failure
by use of plongest function.

11 years ago2013-09-02 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
Andreas Krebbel [Mon, 2 Sep 2013 11:42:38 +0000 (11:42 +0000)]
2013-09-02  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* s390-opc.txt: Fix description for fiebra, fidbra, and fixbra.
For the load fp integer instructions only the suppression flag was
new with z196 version.

11 years ago2013-09-02 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Mon, 2 Sep 2013 09:28:02 +0000 (09:28 +0000)]
2013-09-02  Tristan Gingold  <gingold@adacore.com>

* NEWS: Add entry mentioning support for native Windows x64
SEH data.

* amd64-windows-tdep.c: #include "objfiles.h", "frame-unwind.h",
"coff/internal.h", "coff/i386.h", "coff/pe.h" and "libcoff.h".
(struct amd64_windows_frame_cache): New struct.
(amd64_windows_w2gdb_regnum): New global.
(pc_in_range, amd64_windows_frame_decode_epilogue)
(amd64_windows_frame_decode_insns, amd64_windows_find_unwind_info)
(amd64_windows_frame_cache, amd64_windows_frame_prev_register)
(amd64_windows_frame_this_id): New functions.
(amd64_windows_frame_unwind): New static global.
(amd64_windows_skip_prologue): New function.
(amd64_windows_init_abi): Call frame_unwind_prepend_unwinder
with amd64_windows_frame_unwind. Call set_gdbarch_skip_prologue
with amd64_windows_skip_prologue.

11 years agodaily update
Alan Modra [Mon, 2 Sep 2013 00:00:05 +0000 (00:00 +0000)]
daily update

11 years agodaily update
Alan Modra [Sun, 1 Sep 2013 00:00:05 +0000 (00:00 +0000)]
daily update

11 years ago2013-08-31 John David Anglin <dave.anglin@bell.net>
Dave Anglin [Sat, 31 Aug 2013 11:31:42 +0000 (11:31 +0000)]
2013-08-31  John David Anglin  <dave.anglin@bell.net>

* elf64-hppa.c (elf_hppa_final_link_relocate): Add missing '%' to
format string.

11 years agodaily update
Alan Modra [Sat, 31 Aug 2013 00:00:05 +0000 (00:00 +0000)]
daily update

11 years agoGDB 7.6.1 released.
gdbadmin [Fri, 30 Aug 2013 19:27:16 +0000 (19:27 +0000)]
GDB 7.6.1 released.

11 years agogdb.base/code_elim.exp - force .bss creation.
Andrew Burgess [Fri, 30 Aug 2013 16:36:03 +0000 (16:36 +0000)]
gdb.base/code_elim.exp - force .bss creation.

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

gdb/ChangeLog

        * gdb.base/code_elim1.c (my_bss_symbol): New variable added.
        (my_static_symbol): Add comment.
        (main): Reference my_bss_symbol.

11 years agoMI -trace-find, print frame with LOC_AND_ADDRESS instead of SRC_AND_LOC.
Pedro Alves [Fri, 30 Aug 2013 15:37:37 +0000 (15:37 +0000)]
MI -trace-find, print frame with LOC_AND_ADDRESS instead of SRC_AND_LOC.

When I looked for print_stack_frame calls in MI, I wondered why this
one passing down SRC_AND_LOC.  print_stack_frame does:

  /* For mi, alway print location and address.  */
  if (ui_out_is_mi_like_p (current_uiout))
    print_what = LOC_AND_ADDRESS;

So it really doesn't matter which value is passed down, but, to avoid
confusion in readers, it's better to use the MI standard here.
There's another SRC_AND_LOC in mi-interp.c, but that one makes sense.

gdb/
2013-08-30  Pedro Alves  <palves@redhat.com>

* mi/mi-main.c (mi_cmd_trace_find): Use LOC_AND_ADDRESS instead of
SRC_AND_LOC.

11 years agorestore_selected_frame: tweak warning.
Pedro Alves [Fri, 30 Aug 2013 15:32:45 +0000 (15:32 +0000)]
restore_selected_frame: tweak warning.

I noticed SRC_LINE has special handling within print_stack_frame (mid
statement handling), so I audited all uses, and noticed the one in
restore_selected_frame.  I actually added this warning myself back in
2008, but reading back, I think we can do better.  "reparsed frame" is
probably confusing to users.

Old:

 warning: Couldn't restore frame #2 in current thread, at reparsed frame #0

 45         w = 0;
 (gdb)

New:

 warning: Couldn't restore frame #2 in current thread.  Bottom (innermost) frame selected:
 #0  foo () at foo.c:45
 45         w = 0;
 (gdb)

Tested on x86_64 Fedora 17.

gdb/
2013-08-30  Pedro Alves  <palves@redhat.com>

* thread.c (restore_selected_frame): Use SRC_AND_LOC, and change
warning text.

11 years agobsd-kvm.c: Fix arguments to print_stack_frame.
Pedro Alves [Fri, 30 Aug 2013 15:31:32 +0000 (15:31 +0000)]
bsd-kvm.c: Fix arguments to print_stack_frame.

1 is SRC_AND_LOC.

Then, this is passing -1 as print_level argument to print_stack_frame.
-1 is not a valid print_level value (it's a regular boolean).  But, it
used to be, before
<https://sourceware.org/ml/gdb-patches/2004-04/msg00585.html>.

What happened is that bsd-kvm.c did not exist at the time of that
patch, but went into the tree about a month after, without being
adjusted to the new interface.

Fixed now, exactly as e.g., ocd.c had been adjusted:

> --- ocd.c 18 Jan 2004 19:26:51 -0000 1.28
> +++ ocd.c 23 Apr 2004 14:29:12 -0000
> @@ -225,7 +225,7 @@
>    flush_cached_frames ();
>    registers_changed ();
>    stop_pc = read_pc ();
> -  print_stack_frame (get_selected_frame (), -1, 1);
> +  print_stack_frame (get_selected_frame (), 0, SRC_AND_LOC);

gdb/
2013-08-30  Pedro Alves  <palves@redhat.com>

* bsd-kvm.c (bsd_kvm_open, bsd_kvm_proc_cmd, bsd_kvm_pcb_cmd):
Adjust arguments to print_stack_frame.

11 years agoada-tasks.c: write SRC_AND_LOC instead '1'.
Pedro Alves [Fri, 30 Aug 2013 15:28:40 +0000 (15:28 +0000)]
ada-tasks.c: write SRC_AND_LOC instead '1'.

1 is SRC_AND_LOC.

2013-08-30  Pedro Alves  <palves@redhat.com>

* ada-tasks.c (task_command_1): Write SRC_AND_LOC instead '1'.

11 years agoframe.h: Delete stale declaration.
Pedro Alves [Fri, 30 Aug 2013 15:26:04 +0000 (15:26 +0000)]
frame.h: Delete stale declaration.

This is declaring a function that no longer exists.  It was deleted
back in 2003-01-13:

        ...
        show_and_print_stack_frame, print_only_stack_frame_stub,
print_only_stack_frame): Delete functions.

gdb/
2013-08-30  Pedro Alves  <palves@redhat.com>

* frame.h (show_and_print_stack_frame): Delete declaration.

11 years ago2013-08-30 Phil Muldoon <pmuldoon@redhat.com>
Phil Muldoon [Fri, 30 Aug 2013 10:12:19 +0000 (10:12 +0000)]
2013-08-30  Phil Muldoon  <pmuldoon@redhat.com>

PR python/15461

* python/py-arch.c (ARCHPY_REQUIRE_VALID): New macro.
(archpy_name): Check for valid architecture.
(archpy_disassemble): Ditto.

2013-08-30  Phil Muldoon  <pmuldoon@redhat.com>

* gdb.python/py-arch.exp: Tests for invalid architecture.

11 years agodaily update
Alan Modra [Fri, 30 Aug 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agothread support broken on ppc-aix.
Joel Brobecker [Thu, 29 Aug 2013 21:02:15 +0000 (21:02 +0000)]
thread support broken on ppc-aix.

Thread support got broken when adding 64bit support on ppc-aix.
Upon digging further, I found that the following patch...

   | * gdb_ptrace.h: Use ptrace64 instead of ptrace if HAVE_PTRACE64
   | is defined.
   | * rs6000-nat.c: Check for __ld_info64_ if compiling 64 BIT gdb.
   | (rs6000_ptrace32): Call ptrace64 instead of ptrace if present.
   | (rs6000_ptrace64): Call ptace64 instead of ptracex if present.
   | * configure.ac: Check for ptrace64.
   | * configure, config.in: Regenerate.

... is responsible for this regression:

    (gdb) x /x &__n_pthreads
    0xf06a8258 <__n_pthreads>: Cannot access memory at address 0xf06a8258

Prior to the patch, we have:

    (gdb) x /x &__n_pthreads
    0xf06a8258 <__n_pthreads>: 0x00000003

The problem occurs inside rs6000_ptrace32, while calling ptrace64.
The address is given to rs6000_ptrace32 as an "int *", while
ptrace64 takes a "long long". The cast causes the address to be
sign-extended, which results in GDB trying to read the wrong address.

This patch fixes the issue by casting the address to a "uintptr_t"
instead, and letting the compiler do the implicit conversion to
"long long" in the function call.

gdb/ChangeLog:

        * rs6000-nat.c (rs6000_ptrace32): Cast "addr" to "uintptr_t"
        instead of "long long" in call to ptrace64.

11 years ago2013-08-29 Sterling Augustine <saugustine@google.com>
Sterling Augustine [Thu, 29 Aug 2013 19:22:06 +0000 (19:22 +0000)]
2013-08-29  Sterling Augustine  <saugustine@google.com>

        * boards/remote-stdio-gdbserver.exp: Set rcp_prog and
        rsh_prog in new conditional.  Move use of REMOTE_PORTNUM into
        said conditional.

11 years agoRemove use of deprecated_command_loop_hook from mi code.
Andrew Burgess [Thu, 29 Aug 2013 16:59:48 +0000 (16:59 +0000)]
Remove use of deprecated_command_loop_hook from mi code.

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

gdb/ChangeLog

* mi/mi-interp.c (mi_command_loop): Change signature to match
interp_command_loop_ftype.
(mi1_command_loop): Remove.
(mi2_command_loop): Remove.
(mi3_command_loop): Remove.
(mi_interpreter_resume): Remove setting of
deprecated_command_loop_hook.
(_initialize_mi_interp): Set mi_command_loop as the command loop
callback.

11 years ago2013-08-29 Sanimir Agovic <sanimir.agovic@intel.com>
Sanimir Agovic [Thu, 29 Aug 2013 14:25:22 +0000 (14:25 +0000)]
2013-08-29  Sanimir Agovic  <sanimir.agovic@intel.com>

* valops.c (do_search_struct_field): Pass v2 instead of base_type to
value_type.

11 years agocleanup: make allocate_value_contents static
Sanimir Agovic [Thu, 29 Aug 2013 12:26:59 +0000 (12:26 +0000)]
cleanup: make allocate_value_contents static

2013-08-29  Sanimir Agovic  <sanimir.agovic@intel.com>

* value.c (allocate_value_contents): Make static.
* value.h (allocate_value_contents): Remove prototype.

11 years agocleanup: use value_lazy_at instead of allocate_value_lazy/attribute setter
Sanimir Agovic [Thu, 29 Aug 2013 12:25:03 +0000 (12:25 +0000)]
cleanup: use value_lazy_at instead of allocate_value_lazy/attribute setter

I came across a pattern used to construct a value in the following way:

  struct value *val = allocate_value_lazy (type);
  VALUE_LVAL (val) = lval_memory;
  set_value_address (val, address);

Instead we fold the above call into:

  value_at_lazy (type, addr);

2013-08-27  Sanimir Agovic  <sanimir.agovic@intel.com>

* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use value_at_lazy instead
of assembling value via allocate_value_lazy and attribute setter.
* findvar.c (default_read_var_value): Use value_at_lazy instead of
assembling value via allocate_value_lazy and attribute setter.
* valops.c (do_search_struct_field): Use value_at_lazy instead of
assembling value via allocate_value_lazy and attribute setter.

11 years agocleanup: replace allocate_value and memcpy with value_from_contents
Sanimir Agovic [Thu, 29 Aug 2013 12:21:29 +0000 (12:21 +0000)]
cleanup: replace allocate_value and memcpy with value_from_contents

2013-08-29  Sanimir Agovic  <sanimir.agovic@intel.com>

* value.c (value_from_contents_and_address): Replace allocate_value and
memcpy with value_from_contents.

11 years ago * elf64-x86-64.c (elf_x86_64_check_tls_transition): Allow
Jakub Jelinek [Thu, 29 Aug 2013 10:25:27 +0000 (10:25 +0000)]
* elf64-x86-64.c (elf_x86_64_check_tls_transition): Allow
64-bit -mcmodel=large -fpic TLS GD and LD sequences.
(elf_x86_64_relocate_section): Handle -mcmodel=large -fpic
TLS GD and LD sequences in GD->LE, GD->IE and LD->LE transitions.
ld/testsuite/
* ld-x86-64/x86-64.exp: Add tlsld3, tlsgd7 and tlsgd8 tests.
* ld-x86-64/tlspic1.s: Add -mcmodel=large -fpic TLS GD and LD
sequences.
* ld-x86-64/tlspic.dd: Adjusted.
* ld-x86-64/tlspic.rd: Adjusted.
* ld-x86-64/tlspic-nacl.rd: Adjusted.
* ld-x86-64/tlsld3.dd: New test.
* ld-x86-64/tlsld3.s: New file.
* ld-x86-64/tlsgd7.dd: New test.
* ld-x86-64/tlsgd7.s: New file.
* ld-x86-64/tlsgd8.dd: New test.
* ld-x86-64/tlsgd8.s: New file.

11 years ago2013-08-29 Phil Muldoon <pmuldoon@redhat.com>
Phil Muldoon [Thu, 29 Aug 2013 10:20:03 +0000 (10:20 +0000)]
2013-08-29  Phil Muldoon  <pmuldoon@redhat.com>

* gdb.python/py-arch.exp: Load gdb-python.exp.

11 years ago2013-08-29 Phil Muldoon <pmuldoon@redhat.com>
Phil Muldoon [Thu, 29 Aug 2013 10:06:18 +0000 (10:06 +0000)]
2013-08-29  Phil Muldoon  <pmuldoon@redhat.com>

* python/py-framefilter.c (py_print_frame): Remove usage of
PyString_AsString.  Use python_string_to_host_string instead.
Refactor function to work with a string as a new allocation
instead of a pointer.
(py_print_frame): Ditto.
* python/lib/gdb/frames.py (return_list): Cain iterators together
instead of adding them as a list.
(_sort_list): Call return_list, and remove duplicate code.
(execute_frame_filters): Convert iterator to a list with list().
* python/lib/gdb/command/frame_filters.py
(SetFrameFilterPriority._set_filter_priority): Convert priority
attribute to an integer.
* python/lib/gdb/FrameIterator.py (FrameIterator.next): Define
wrapper function __next__.
* python/lib/gdb/FrameDecorator.py: If basestring not defined,
define as "str".

2013-08-29  Phil Muldoon  <pmuldoon@redhat.com>

* gdb.python/py-framefilter.py (FrameFilter.filter): Check
itertools for imap attribute.  Otherwise use map().
(ElidingIterator): Define wrapper function __next__.
* gdb.python/py-framefilter-mi.exp: Do not use execfile,
use exec (open (read ())) instead.
* gdb.python/py-framefilter.exp: Ditto.
* gdb.python/py-arch.exp: Update print based test to Python 3.x
compliance.
* gdb.python/py-frame.exp: Ditto.
* gdb.python/py-type.exp: Ditto.

11 years ago2013-08-29 Phil Muldoon <pmuldoon@redhat.com>
Phil Muldoon [Thu, 29 Aug 2013 09:36:02 +0000 (09:36 +0000)]
2013-08-29  Phil Muldoon  <pmuldoon@redhat.com>

* ChangeLog: Remove blank lines between PR and ChangeLog description.

11 years ago2013-08-29 Phil Muldoon <pmuldoon@redhat.com>
Phil Muldoon [Thu, 29 Aug 2013 09:24:33 +0000 (09:24 +0000)]
2013-08-29  Phil Muldoon  <pmuldoon@redhat.com>

PR python/15752

* python/py-framefilter.c (apply_frame_filter): Check
gdb_python_initialized.  Exit if the Python frame-filter code
cannot be initialized.

11 years ago2013-08-29 Phil Muldoon <pmuldoon@redhat.com>
Phil Muldoon [Thu, 29 Aug 2013 09:09:22 +0000 (09:09 +0000)]
2013-08-29  Phil Muldoon  <pmuldoon@redhat.com>

PR cli/15842

* top.c (print_gdb_version): Remove erroneous newline after help
text.