Commit Graph

79868 Commits

Author SHA1 Message Date
Jan Kratochvil 849c862eb2 PR gdb/16626
Fix auto-load 7.7 regression,
the regression affects any loading from /usr/share/gdb/auto-load .

5b2bf9471f is the first bad commit
commit 5b2bf9471f
Author: Doug Evans <xdje42@gmail.com>
Date:   Fri Nov 29 21:29:26 2013 -0800
    Move .debug_gdb_script processing to auto-load.c.
    Simplify handling of auto-loaded objfile scripts.

Fedora 20 x86_64
$ gdb -q /usr/lib64/libgobject-2.0.so
Reading symbols from /usr/lib64/libglib-2.0.so.0.3800.2...Reading symbols from
/usr/lib/debug/usr/lib64/libglib-2.0.so.0.3800.2.debug...done.
done.
(gdb) _

Fedora Rawhide x86_64
$ gdb -q /usr/lib64/libgobject-2.0.so
Reading symbols from /usr/lib64/libglib-2.0.so...Reading symbols from
/usr/lib/debug/usr/lib64/libglib-2.0.so.0.3990.0.debug...done.
done.
warning: File "/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py" auto-loading has been declined by your `auto-load safe-path'
set to "$debugdir:$datadir/auto-load:/usr/bin/mono-gdb.py".
To enable execution of this file add
        add-auto-load-safe-path /usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
line to your configuration file "/home/jkratoch/.gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/home/jkratoch/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
        info "(gdb)Auto-loading safe path"
(gdb) _

That is it tries to load "forbidden"
	/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
but it should load instead
	/usr/share/gdb/auto-load/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py*
Although that is also not exactly this way, there does not exist any
	/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
despite regressed GDB says so.

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

	PR gdb/16626
	* auto-load.c (auto_load_objfile_script_1): Change filename to
	debugfile.

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

	PR gdb/16626
	* gdb.base/auto-load-script: New file.
	* gdb.base/auto-load.c: New file.
	* gdb.base/auto-load.exp: New file.

Message-ID: <20140223212400.GA8831@host2.jankratochvil.net>
2014-02-25 18:32:32 +01:00
Jan Kratochvil e2f0d509b3 Fix dw2-icycle.exp -fsanitize=address GDB crash.
binutils readelf -wi:
 <4><a2>: Abbrev Number: 26 (DW_TAG_inlined_subroutine)
    <a3>   DW_AT_abstract_origin: <0x5a>
    <a7>   DW_AT_low_pc      : 0x400590
    <ab>   DW_AT_high_pc     : 0x4
    <af>   DW_AT_call_file   : 1
    <b0>   DW_AT_call_line   : 20
    <b1>   DW_AT_sibling     : <0xb8>
 <2><b8>: Abbrev Number: 35 (DW_TAG_inlined_subroutine)
    <b9>   DW_AT_abstract_origin: <0x5a>
    <bd>   DW_AT_low_pc      : 0x400590
    <c1>   DW_AT_high_pc     : 0x4
    <c5>   DW_AT_call_file   : 1
    <c6>   DW_AT_call_line   : 29

<b1> DW_AT_sibling points to the next DIE - but that DIE is 2 levels
upwards - definitely not a sibling.  This confuses GDB up to a crash:

==32143== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6024000198ac at pc 0xb4d104 bp 0x7fff63e96e70 sp
0x7fff63e96e60
READ of size 1 at 0x6024000198ac thread T0
    #0 0xb4d103 in read_unsigned_leb128 (/home/jkratoch/redhat/gdb-clean/gdb/gdb+0xb4d103)
    #1 0xb15f3c in peek_die_abbrev (/home/jkratoch/redhat/gdb-clean/gdb/gdb+0xb15f3c)
    #2 0xb46185 in load_partial_dies (/home/jkratoch/redhat/gdb-clean/gdb/gdb+0xb46185)
    #3 0xb103fb in process_psymtab_comp_unit_reader (/home/jkratoch/redhat/gdb-clean/gdb/gdb+0xb103fb)
    #4 0xb0d2a9 in init_cutu_and_read_dies (/home/jkratoch/redhat/gdb-clean/gdb/gdb+0xb0d2a9)
    #5 0xb1115f in process_psymtab_comp_unit (/home/jkratoch/redhat/gdb-clean/gdb/gdb+0xb1115f)
    #6 0xb1235f in dwarf2_build_psymtabs_hard (/home/jkratoch/redhat/gdb-clean/gdb/gdb+0xb1235f)
    #7 0xb05536 in dwarf2_build_psymtabs (/home/jkratoch/redhat/gdb-clean/gdb/gdb+0xb05536)
    #8 0x86d5a5 in read_psyms (/home/jkratoch/redhat/gdb-clean/gdb/gdb+0x86d5a5)
    #9 0x9b1c37 in require_partial_symbols (/home/jkratoch/redhat/gdb-clean/gdb/gdb+0x9b1c37)
    #10 0x9bf2d0 in read_symbols (/home/jkratoch/redhat/gdb-clean/gdb/gdb+0x9bf2d0)
    #11 0x9c014c in syms_from_objfile_1 (/home/jkratoch/redhat/gdb-clean/gdb/gdb+0x9c014c)

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

	Fix dw2-icycle.exp -fsanitize=address GDB crash.
	* gdb.dwarf2/dw2-icycle.S: Remove all DW_AT_sibling.

Message-ID: <20140224201011.GA28926@host2.jankratochvil.net>
2014-02-25 18:28:38 +01:00
Ilya Tocar d6e9dd78c4 Remove bogus vcvtps2ph variant.
We currently support version of vcvtps2ph with sae and only 1 register operand.
This version is encoded as if missing operand was equal to ymm0.
I didn't found any references to this variant in
http://download-software.intel.com/sites/default/files/managed/50/1a/319433-018.pdf
This patch removes it.

opcodes/

        * i386-opc.tbl: Remove wrong variant of vcvtps2ph
        * i386-tbl.h: Regenerate.
2014-02-25 08:52:02 -08:00
Joel Brobecker 475109d870 Adjust ia64_linux_xfer_partial following to_xfer_partial API change.
ia64-linux-nat.c no longer compiles because ia64_linux_xfer_partial
no longer matches the to_xfer_partial prototype.  This patch fixes
the problem by adjusting it accordingly.

gdb/ChangeLog:

        * ia64-linux-nat.c (ia64_linux_xfer_partial): Add function
        documentation.  Adjust prototype to match the target_ops
        to_xfer_partial method.  Adjust implementation accordingly.
2014-02-25 11:21:55 -05:00
Hui Zhu 041ab8b484 Fix a format issue of ChangeLog. 2014-02-25 23:59:47 +08:00
Hui Zhu e186c3bd62 2014-02-25 Hui Zhu <hui@codesourcery.com>
* target.h (target_ops): Fix TARGET_DEFAULT_RETURN of
	to_traceframe_info.
2014-02-25 23:55:42 +08:00
Kevin Buettner 6d45194248 Use 16-bit integer type for rl78 register pairs.
This patch changes rl78-tdep.c so that a 16-bit type is used for
register pairs instead of a pointer type as was previously the case.
This will cause these register pairs to be displayed as integers
instead of as a data address with a 0xf0000 ORed in.

E.g. registers ax, bc, de, and hl might now be displayed like this:

    (gdb) info registers ax bc de hl
    ax             0x6      6
    bc             0x0      0
    de             0x10c3   4291
    hl             0x108d   423

Whereas, before, they were displayed as follows:

    (gdb) info registers ax bc de hl
    ax             0xf0006  0xf0006
    bc             0xf0000  0xf0000
    de             0xf10c3  0xf10c3
    hl             0xf108d  0xf108d

These pairs are 16 bit quantities and should be displayed as such.
This change also affects the way that the banked register pairs are
displayed.  Within GDB, the banked register pairs are named bank0_rp0,
bank0_rp1, .., bank3_rp2, bank3_rp3.

However, these register pairs need to be used as addresses in DWARF
expressions.  I have added 16 pseudo registers corresponding to banked
register pairs.  These new pseudo registers are all hidden from the
user and have a pointer type.  Values from these registers are
intended to be used in DWARF expressions.  Therefore,
rl78_dwarf_reg_to_regnum() has been adjusted to return these new
pseudo register numbers.

I had a much simpler patch which only changed the types, but it showed
a number of regressions due to integer values from the banked register
pairs being used as part of an address expression.  This current patch
shows no regressions and now displays values of register pairs
correctly.

	* rl78-tdep.c ( RL78_BANK0_RP0_PTR_REGNUM, RL78_BANK0_RP1_PTR_REGNUM)
	(RL78_BANK0_RP2_PTR_REGNUM, RL78_BANK0_RP3_PTR_REGNUM)
	(RL78_BANK1_RP0_PTR_REGNUM, RL78_BANK1_RP1_PTR_REGNUM)
	(RL78_BANK1_RP2_PTR_REGNUM, RL78_BANK1_RP3_PTR_REGNUM)
	(RL78_BANK2_RP0_PTR_REGNUM, RL78_BANK2_RP1_PTR_REGNUM)
	(RL78_BANK2_RP2_PTR_REGNUM, RL78_BANK2_RP3_PTR_REGNUM)
	(RL78_BANK3_RP0_PTR_REGNUM, RL78_BANK3_RP1_PTR_REGNUM)
	(RL78_BANK3_RP2_PTR_REGNUM, RL78_BANK3_RP3_PTR_REGNUM):
	New constants.
	(rl78_register_type): Use a data pointer type for SP and
	new pseudo registers mentioned above.  Use a 16 bit integer
	type for all other register pairs.
	(rl78_register_name, rl78_g10_register_name): Update for
	new pseudo registers.
	(rl78_pseudo_register_read): Likewise.
	(rl78_pseudo_register_write): Likewise.
	(rl78_dwarf_reg_to_regnum): Return register numbers representing
	to the newly added pseudo registers.
2014-02-25 00:32:45 -07:00
Alan Modra f91d941da8 daily update 2014-02-25 09:30:39 +10:30
Doug Evans eddf0baefe * value.c (record_latest_value): Fix comment.
* printcmd.c (print_command_1): Remove code to handle -1 return from
	record_latest_value.
2014-02-24 14:01:45 -08:00
Doug Evans 50cc37c849 lib/gdb.exp (run_on_host): Log error output if program fails. 2014-02-24 13:39:14 -08:00
Pedro Alves e96027e0d9 procfs.c: Don't install a deprecated_xfer_memory method
This removes yet another instance of a deprecated_xfer_memory user,
and fixes a nasty regression as a side-effect:

    (gdb) start
    Temporary breakpoint 1 at 0x19070: file simple_main.adb, line 4.
    Starting program: /[...]/simple_main
    Warning:
    Cannot insert breakpoint 1.
    Cannot access memory at address 0x19070
    Cannot insert breakpoint -3.
    Temporarily disabling shared library breakpoints:
    breakpoint #-3

The regression was introduced by the to_xfer_partial transition
to return a status enum.  procfs_xfer_partial was updated but
not the case where object is TARGET_OBJECT_MEMORY.  As result,
procfs_xfer_partial was returning the length xfered rather than
the status, and the xfered buffer was left uninitialized.

gdb/
2014-02-19  Pedro Alves  <palves@redhat.com>

	* procfs.c (procfs_target): Don't install procfs_xfer_memory as
	deprecated_xfer_memory hook.
	(procfs_xfer_partial): Call procfs_xfer_memory instead
	of the deprecated_xfer_memory target hook.
	(procfs_xfer_memory): Adjust interface as a to_xfer_partial
	helper.
2014-02-24 12:49:33 -05:00
Yuanhui Zhang 0837c97695 Fix a GDB assert failure on windows
A GDB internal error is found on native mingw32 target.

(gdb) run
../../binutils-gdb/gdb/target.c:1483: internal-error:
target_xfer_partial: Assertion `*xfered_len > 0' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)

This error was introduced by the following snippet in commit
9b409511d0

> @@ -2536,27 +2538,30 @@ windows_xfer_shared_libraries (struct target_ops *ops,
>      }
>
>    obstack_free (&obstack, NULL);
> -  return len;
> +  *xfered_len = (ULONGEST) len;
> +  return TARGET_XFER_OK;
>  }

In the original code, len is returned, which could be 0, but after that
commit, only TARGET_XFER_OK is returned, which is wrong.  If len is 0,
TARGET_XFER_EOF should be returned.  (it is 0 in enum
target_xfer_status declaration).

gdb:

2014-02-24  Yuanhui Zhang  <asmwarrior@gmail.com>

	* windows-nat.c (windows_xfer_shared_libraries): Return
	TARGET_XFER_EOF if LEN is zero to fix an assert failure when
	requested object is TARGET_OBJECT_LIBRARIES.
2014-02-24 15:49:33 +08:00
Yao Qi bc113b4e3e Rename TARGET_XFER_E_UNAVAILABLE to TARGET_XFER_UNAVAILABLE
Nowadays, TARGET_XFER_E_UNAVAILABLE isn't regarded as an error in
to_xfer_partial interface, so _E_ looks odd.  This patch is to
replace TARGET_XFER_E_UNAVAILABLE with TARGET_XFER_UNAVAILABLE,
and change its value from -2 to 2.  Since there is no comparison
on the value of 'enum target_xfer_status', so it should be safe.

gdb:

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

	* target.h (enum target_xfer_status)
	<TARGET_XFER_E_UNAVAILABLE>: Rename it to ...
	<TARGET_XFER_UNAVAILABLE>: ... it with setting value 2
	explicitly.  New.
	* corefile.c (memory_error_message): User updated.
	* exec.c (section_table_read_available_memory): Likewise.
	* record-btrace.c (record_btrace_xfer_partial): Likewise.
	* target.c (target_xfer_status_to_string): Likewise.
	(raw_memory_xfer_partial): Likewise.
	(memory_xfer_partial_1, target_xfer_partial): Likewise.
	* valops.c (read_value_memory): Likewise.
	* exec.h: Update comments.
2014-02-24 14:31:42 +08:00
Yao Qi 01cb880427 Tweak target_xfer_status_to_string
This patch tweaks target_xfer_status_to_string on comments and argument
name.

gdb:

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

	* target.c (target_xfer_status_to_string): Rename argument err
	to status.
	* target.h (target_xfer_status_to_string): Update declaration.
	Replace target_xfer_error_to_string with
	target_xfer_status_to_string in comment.
2014-02-24 14:16:36 +08:00
Yao Qi 93063aa69b Unbreak mips native build
When I build mips native gdb today, I get the follow error,

../../../git/gdb/mips-linux-nat.c: In function '_initialize_mips_linux_nat':
../../../git/gdb/mips-linux-nat.c:792:15: error: assignment from incompatible pointer type [-Werror]
cc1: all warnings being treated as errors

It looks an oversight of recent target_ops delegation patches.  This
patch is to fix the build error.

gdb:

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

	* mips-linux-nat.c (super_close): Update its type.
	(mips_linux_close): Pass 'self' to super_close.
2014-02-24 12:03:05 +08:00
Yao Qi 5c328c057e Remove TARGET_XFER_STATUS_ERROR_P
This patch removes macro TARGET_XFER_STATUS_ERROR_P, as Pedro pointed
out during patches review that TARGET_XFER_STATUS_ERROR_P tends to
be unnecessary.

gdb:

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

	* target.h (TARGET_XFER_STATUS_ERROR_P): Remove.
	* corefile.c (read_memory): Adjusted.
	* target.c (target_write_with_progress): Adjusted.
2014-02-24 11:27:37 +08:00
Alan Modra 605a662f6a daily update 2014-02-24 09:30:35 +10:30
Yao Qi f73023dd06 Revert previous tweaks
As we migrate to the new to_xfer_partial interface, some of previous
tweaks become unnecessary, we don't have to check traceframe is
selected in each target implementation, so this patch below is
reverted.

  [PATCH] Send qXfer:traceframe-info:read when traceframe is selected.
  https://sourceware.org/ml/gdb-patches/2013-10/msg00752.html

Third, to_traceframe_info is only called when traceframe is selected,
that means it is only called when target is remote, tfile or ctf, so
this patch can be partially reverted,

  https://sourceware.org/ml/gdb-patches/2013-04/msg00000.html

gdb:

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

	Revert two patches:

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

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

	2013-07-19  Yao Qi  <yao@codesourcery.com>

	* target.c (update_current_target): Change the default action
	of 'to_traceframe_info' from tcomplain to return_zero.
	* target.h (struct target_ops) <to_traceframe_info>: Add more
	comments.
2014-02-23 11:44:28 +08:00
Yao Qi 5a2eb0ef7f Adjust read_value_memory to use to_xfer_partial
As the new to_xfer_partial implementations are done in ctf and tfile
targets, read_value_memory can be simplified a lot.  Call
target_xfer_partial in a loop, check return value, and set bytes
unavailable when necessary.

gdb:

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

	* valops.c (read_value_memory): Rewrite it.  Call
	target_xfer_partial in a loop.
	* exec.h (section_table_available_memory): Remove declaration.
	Move comments to ...
	* exec.c (section_table_available_memory): ... here.  Make it static.
2014-02-23 11:44:27 +08:00
Yao Qi 1ee79381dd Use new to_xfer_partial interface in ctf and tfile target
This patch adjust both ctf and tfile target implementation of to_xfer_partial,
to return TARGET_XFER_E_UNAVAILABLE and set *XFERED_LEN if data is
unavailable.  Note that some code on xfer in exec.c can be shared, but
we can do it in a separate pass later.

gdb:

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

	* exec.c (section_table_read_available_memory): New function.
	* exec.h (section_table_read_available_memory): Declare.
	* ctf.c (ctf_xfer_partial): Call
	section_table_read_available_memory.
	* tracefile-tfile.c (tfile_xfer_partial): Likewise.
2014-02-23 11:44:27 +08:00
Yao Qi 1ca49d376d Share code on to_xfer_partial for tfile and ctf target
In the to_xfer_partial implementations of ctf and tfile, the code on
reading from read-only sections is duplicated.  This patch moves it to
a separate function exec_read_partial_read_only.

gdb:

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

	* ctf.c (ctf_xfer_partial): Move code to ...
	* exec.c (exec_read_partial_read_only): ... it.  New function.
	* tracefile-tfile.c (tfile_xfer_partial): Likewise.
	* tracefile.c: Include "exec.h".
	* exec.h (exec_read_partial_read_only): Declare.
2014-02-23 11:44:27 +08:00
Yao Qi a283690eb7 Let tracefile has_memory and has_all_memory.
At present, tfile target thinks it has memory but ctf doesn't.
This is an oversight when I added ctf target support.  This patch
moves the implementations of to_has_all_memory and to_has_memory to
upper layer.  After this change, both tfile and ctf target think
they have memory.

gdb:

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

	* tracefile-tfile.c (tfile_has_all_memory): Remove.
	(tfile_has_memory): Remove.
	(init_tfile_ops): Don't set fields to_has_all_memory and
	to_has_memory of tfile_ops.
	* tracefile.c (tracefile_has_all_memory): New function.
	(tracefile_has_memory): New function.
	(init_tracefile_ops): Initialize fields to_has_all_memory and
	to_has_memory of 'ops'.
2014-02-23 11:44:27 +08:00
Yao Qi 12e03cd06a Share some code between ctf and tfile target.
This patch move the duplicated code between tfile and ctf
targets into file tracefile.c.  The common part of target_ops
fields are set in init_tracefile_ops.

gdb:

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

	* ctf.c (ctf_has_stack, ctf_has_registers): Remove.
	(ctf_thread_alive, ctf_get_trace_status): Remove.
	(init_ctf_ops): Don't set some fields of ctf_ops.  Call
	init_tracefile_ops.
	* tracefile-tfile.c (tfile_get_trace_status): Remove.
	(tfile_has_stack, tfile_has_registers): Remove.
	(tfile_thread_alive): Remove.
	(init_tfile_ops): Don't set some fields of tfile_ops.  Call
	init_tracefile_ops.
	* tracefile.c (tracefile_has_stack): New function.
	(tracefile_has_registers): New function.
	(tracefile_thread_alive): New function.
	(tracefile_get_trace_status): New function.
	(init_tracefile_ops): New function.
	* tracefile.h (init_tracefile_ops): Declare.
2014-02-23 11:44:26 +08:00
Yao Qi 1139532379 Move tfile target to tracefile-tfile.c
This patch moves tfile target related code from tracepoint.c to
tracefile-tfile.c.

gdb:

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

	* tracepoint.c (TFILE_PID): Move it to tracefile-tfile.c.
	(O_LARGEFILE): Likewise.
	(tfile_ops): Likewise.
	(TRACE_HEADER_SIZE): Likewise.
	(trace_fd, trace_frames_offset, cur_offset): Likewise.
	(cur_data_size): Likewise.
	(tfile_read, tfile_open, tfile_interp_line): Likewise.
	(tfile_close, tfile_files_info): Likewise.
	(tfile_get_trace_status): Likewise.
	(tfile_get_tracepoint_status): Likewise.
	(tfile_get_traceframe_address): Likewise.
	(tfile_trace_find, match_blocktype): Likewise.
	(traceframe_walk_blocks, traceframe_find_block_type): Likewise.
	(tfile_fetch_registers, tfile_xfer_partial): Likewise.
	(tfile_get_trace_state_variable_value): Likewise.
	(tfile_has_all_memory, tfile_has_memory): Likewise.
	(tfile_has_stack, tfile_has_registers): Likewise.
	(tfile_thread_alive, build_traceframe_info): Likewise.
	(tfile_traceframe_info, init_tfile_ops): Likewise.
	(_initialize_tracepoint): Don't call init_tfile_ops
	and add_target_with_completer.
	* tracefile-tfile.c: Include regcache.h, inferior.h, gdbthread.h,
	exec.h, completer.h and filenames.h.
	(_initialize_tracefile_tfile): New function.
2014-02-23 11:44:26 +08:00
Yao Qi 7951c4eb08 Move trace file writer out of tracepoint.c
This patch is a refactor which moves trace file writer related code
out of tracepoint.c, which has 6k LOC.  It moves general trace file
writer to a new file tracefile.c and moves tfile specific writer to
tracefile-tfile.c.

gdb:

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

	* Makefile.in (REMOTE_OBS): Append tracefile.o and
	tracefile-tfile.o.
	(HFILES_NO_SRCDIR): Add tracefile.h.
	* ctf.c: Include "tracefile.h".
	* tracefile.h: New file.
	* tracefile.c: New file
	* tracefile-tfile.c: New file.
	* tracepoint.c: Include "tracefile.h".
	(free_uploaded_tps, free_uploaded_tsvs): Remove declarations.
	(stop_reason_names): Add const.
	(trace_file_writer_xfree): Move it to tracefile.c.
	(trace_save, trace_save_command, trace_save_tfile): Likewise.
	(trace_save_ctf): Likewise.
	(struct tfile_trace_file_writer): Move it to tracefile-tfile.c.
	(tfile_target_save, tfile_dtor, tfile_start): Likewise.
	(tfile_write_header, tfile_write_regblock_type): Likewise.
	(tfile_write_status, tfile_write_uploaded_tsv): Likewise.
	(tfile_write_uploaded_tp, tfile_write_definition_end): Likewise.
	(tfile_write_raw_data, tfile_end): Likewise.
	(tfile_trace_file_writer_new): Likewise.
	(free_uploaded_tp): Make it extern.
	(free_uploaded_tsv): Make it extern.
	(_initialize_tracepoint): Move code to register command 'tsave'
	to tracefile.c.
	* tracepoint.h (stop_reason_names): Declare.
	(struct trace_frame_write_ops): Move it to tracefile.h.
	(struct trace_file_write_ops): Likewise.
	(struct trace_file_writer): Likewise.
	(free_uploaded_tsvs, free_uploaded_tps): Declare.
2014-02-23 11:44:26 +08:00
Alan Modra cb5111bcea daily update 2014-02-23 09:30:37 +10:30
Alan Modra b103660c45 daily update 2014-02-22 09:30:38 +10:30
Jan Kratochvil 184cd07257 Fix crash on process name "(sd-pam)" (PR 16594).
info os processes -fsanitize=address error
https://sourceware.org/bugzilla/show_bug.cgi?id=16594

info os processes
=================================================================
==5795== ERROR: AddressSanitizer: heap-use-after-free on address
0x600600214974 at pc 0x757a92 bp 0x7fff95dd9f00 sp 0x7fff95dd9ef0
READ of size 4 at 0x600600214974 thread T0
    #0 0x757a91 in get_cores_used_by_process (.../gdb/gdb+0x757a91)

At least Fedora 20 has process(es):
 6678 ?        Ss     0:00 /usr/lib/systemd/systemd --user
 6680 ?        S      0:00  \_ (sd-pam)

and GDB "info os processes" crashes on it as /proc/6680/stat contains:

6680 ((sd-pam)) S 6678 6678 6678 0 -1 1077961024 33 0 0 0 0 0 0 0 20 0 1 0 18568 73768960 120 18446744073709551615 1 1
0 0 0 0 0 4096 0 18446744073709551615 0 0 17 6 0 0 0 0 0 0 0 0 0 0 0 0 0

and GDB fails to find the proper end of the process name "((sd-pam))".
Therefore it reads core number off-by-one (it reads 17 instead of 6) and
overruns the array.

(1) Make the process name parsing more foolproof.

(2) Do not trust the parsed number from /proc/PID/stat and verify it against
    the array size.

I noticed that 'ps' gets this right, so I've peeked at its
sources, and it just looks for the first ')' starting at
the end.

dc072aced7:proc/readproc.c

Look for stat2proc.

Given ps does that, I believe the kernel won't ever be changed
in a way that would break it.  So it sounds like could do strrchr
from the end of stat just as well without worry, which is simpler.

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

	PR gdb/16594
	* common/linux-osdata.c (linux_common_core_of_thread): Find the end of
	process name.
	(get_cores_used_by_process): New parameter num_cores, use it.
	(linux_xfer_osdata_processes): Pass num_cores to it.
	* linux-tdep.c (linux_info_proc, linux_fill_prpsinfo): Find the end of
	process name.

Message-ID: <20140217212826.GA15080@host2.jankratochvil.net>
2014-02-21 18:39:40 +01:00
Ilya Tocar dcf893b581 Add support for CPUID PREFETCHWT1
Latest AVX512 spec
http://download-software.intel.com/sites/default/files/managed/50/1a/319433-018.pdf
Has CPUID PREFETCHWT1 for prefetchwt1 instruction, which we list as AVX512PF.
This patch introduces CPUID PREFETCHWT1.

gas/

        * config/tc-i386.c (cpu_arch): Add .prefetchwt1.
        * doc/c-i386.texi: Document .prefetchwt1/prefetchwt1.

opcodes/

        * i386-gen.c (cpu_flag_init): Add CPU_PREFETCHWT1_FLAGS/
        (cpu_flags): Add CpuPREFETCHWT1.
        * i386-init.h: Regenerate.
        * i386-opc.h (CpuPREFETCHWT1): New.
        (i386_cpu_flags): Add cpuprefetchwt1.
        * i386-opc.tbl: Cahnge CPU of prefetchwt1 from CpuAVX512PF to CpuPREFETCHWT1.
        * i386-tbl.h: Regenerate.

gas/testsuite

        * gas/i386/avx512pf-intel.d: Remove prefetchwt1.
        * gas/i386/avx512pf.s: Ditto.
        * gas/i386/avx512pf.d: Ditto.
        * gas/i386/x86-64-avx512pf-intel.d: Ditto.
        * gas/i386/x86-64-avx512pf.s: Ditto.
        * gas/i386/x86-64-avx512pf.d: Ditto.
        * gas/i386/prefetchwt1-intel.d: New file.
        * gas/i386/prefetchwt1.s: Ditto.
        * gas/i386/prefetchwt1.d: Ditto.
        * gas/i386/x86-64-prefetchwt1-intel.d: Ditto.
        * gas/i386/x86-64-prefetchwt1.s: Ditto.
        * gas/i386/x86-64-prefetchwt1.d: Ditto.
2014-02-21 08:04:00 -08:00
Andreas Krebbel c63528fc47 Fix length arg in call to breakpoint_xfer_memory.
The patch "return target_xfer_status in to_xfer_partial" caused a
regression in various s390(x) test cases, because memory_xfer_partial
filled only the first byte of the read buffer from a breakpoint shadow:

    https://sourceware.org/ml/gdb-patches/2014-01/msg01071.html

This patch fixes the regression.
2014-02-21 15:55:37 +01:00
Pedro Alves ea4758f2dd Rename test.
I realized that the name of this test only made sense when considering
the old (never committed) implementation of the fix that came along
with the test originally, that forced a schedlock while a step-resume
(to get over the signal handler) was inserted.  The final solution
that went into the tree does not force that locking.

So this renames it to something more descriptive.

gdb/testsuite/
2014-02-21  Pedro Alves  <palves@redhat.com>

	* gdb.threads/step-after-sr-lock.c: Rename to ...
	* gdb.threads/signal-while-stepping-over-bp-other-thread.c: ... this.
	* gdb.threads/step-after-sr-lock.exp: Rename to ...
	* gdb.threads/signal-while-stepping-over-bp-other-thread.exp:
	... this.
2014-02-21 13:30:12 +00:00
Alan Modra 0cbc458c9f Add file missed from last commit. 2014-02-21 23:18:50 +10:30
Alan Modra a97726da10 Add ppc476 workaround bootstrap test
I was running this by hand to test out --ppc476-workaround.  Another
bootstrap test doesn't take all that long, so let's add it to the
testsuite.

	* ld-bootstrap/bootstrap.exp: Add ppc476 workaround test.
	* ld-bootstrap/ppc476.t: New file.
2014-02-21 10:22:51 +10:30
Alan Modra 8b5f0ba3a7 daily update 2014-02-21 09:30:38 +10:30
Sergio Durigan Junior d7b30f6729 Fix for PR tdep/16397: SystemTap SDT probe support for x86 doesn't work with "triplet operands"
This is the continuation of what Joel proposed on:

<https://sourceware.org/ml/gdb-patches/2013-12/msg00977.html>

Now that I have already submitted and pushed the patch to split
i386_stap_parse_special_token into two smaller functions, it is indeed
simpler to understand this patch.

It occurs because, on x86, triplet displacement operands are allowed
(like "-4+8-20(%rbp)"), and the current parser for this expression is
buggy.  It does not correctly extract the register name from the
expression, which leads to incorrect evaluation.  The parser was also
being very "generous" with the expression, so I included a few more
checks to ensure that we're indeed dealing with a triplet displacement
operand.

This patch also includes testcases for the two different kind of
expressions that can be encountered on x86: the triplet displacement
(explained above) and the three-argument displacement (as in
"(%rbx,%ebx,-8)").  The tests are obviously arch-dependent and are
placed under gdb.arch/.

Message-ID: <m3mwj1j12v.fsf@redhat.com>
URL: <https://sourceware.org/ml/gdb-patches/2014-01/msg00310.html>

gdb/
2014-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR tdep/16397
	* i386-tdep.c (i386_stap_parse_special_token_triplet): Check if a
	number comes after the + or - signs.  Adjust length of register
	name to be extracted.

gdb/testsuite/
2014-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR tdep/16397
	* gdb.arch/amd64-stap-special-operands.exp: New file.
	* gdb.arch/amd64-stap-three-arg-disp.S: Likewise.
	* gdb.arch/amd64-stap-three-arg-disp.c: Likewise.
	* gdb.arch/amd64-stap-triplet.S: Likewise.
	* gdb.arch/amd64-stap-triplet.c: Likewise.
2014-02-20 18:49:09 -03:00
Doug Evans 3bc32da325 Add single sentence description to top of entry of previous commit. 2014-02-20 13:33:44 -08:00
Tom Tromey 8838afaf75 mark *_varobj_ops as "extern"
The AIX linker pointed out that gdb had multiple definitions of the
various *_varobj_ops objects.  This patch fixes the problem by marking
the declarations as "extern" in varobj.h.  Tested by rebuilding on
x86-64 Fedora 18 and on AIX.

2014-02-20  Tom Tromey  <tromey@redhat.com>

	* varobj.h (c_varobj_ops, cplus_varobj_ops, java_varobj_ops)
	(ada_varobj_ops): Mark "extern".
2014-02-20 14:12:33 -07:00
Doug Evans d86d4aafd4 Remove all_lwps global.
* inferiors.h (ptid_of): Move here from linux-low.h.
	(pid_of, lwpid_of): Ditto.
	* linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
	parameter is a struct thread_info * now.
	(aarch64_notify_debug_reg_change): Fetch pid from current_inferior
	directly.  Pass &all_threads to find_inferior instead of &all_lwps.
	(aarch64_stopped_data_address): Fetch lwpid from current_inferior
	directly.
	(aarch64_linux_prepare_to_resume): Fetch ptid from thread.
	(aarch64_arch_setup): Fetch lwpid from current_inferior directly.
	* linux-arm-low.c (update_registers_callback): Update, "entry"
	parameter is a struct thread_info * now.
	Fetch lwpid from current_inferior directly.
	(arm_insert_point): Pass &all_threads to find_inferior instead of
	&all_lwps.
	(arm_remove_point): Ditto.
	(arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
	(arm_prepare_to_resume): Fetch pid from thread.
	(arm_read_description): Fetch lwpid from current_inferior directly.
	* linux-low.c (all_lwps): Delete.
	(delete_lwp): Delete call to remove_inferior.
	(handle_extended_wait): Fetch lwpid from thread.
	(add_lwp): Don't set lwp->entry.id.  Remove call to
	add_inferior_to_list.
	(linux_attach_lwp_1): Fetch pid from current_inferior directly.
	(linux_kill_one_lwp): Fetch ptid,lwpid from thread.
	(kill_one_lwp_callback): Ditto.
	(linux_kill): Don't dereference NULL pointer.
	Fetch ptid,lwpid from thread.
	(get_detach_signal): Fetch ptid from thread.
	(linux_detach_one_lwp): Fetch ptid,lwpid from thread.
	Simplify call to regcache_invalidate_thread.
	(delete_lwp_callback): Update, "entry" parameter is a
	struct thread_info * now.  Fetch pid from thread.
	(linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
	(status_pending_p_callback): Update, "entry" parameter is a
	struct thread_info * now.  Fetch ptid from thread.
	(find_lwp_pid): Update, "entry" parameter is a
	struct thread_info * now.
	(linux_wait_for_lwp): Fetch pid from thread.
	(linux_fast_tracepoint_collecting): Fetch lwpid from thread.
	(maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
	(enqueue_one_deferred_signal): Fetch lwpid from thread.
	(dequeue_one_deferred_signal): Ditto.
	(cancel_breakpoint): Fetch ptid from current_inferior.
	(linux_wait_for_event): Pass &all_threads to find_inferior,
	not &all_lwps.  Fetch ptid, lwpid from thread.
	(count_events_callback): Update, "entry" parameter is a
	struct thread_info * now.
	(select_singlestep_lwp_callback): Ditto.
	(select_event_lwp_callback): Ditto.
	(cancel_breakpoints_callback): Ditto.
	(linux_cancel_breakpoints): Pass &all_threads to find_inferior,
	not &all_lwps.
	(select_event_lwp): Ditto.  Fetch ptid from event_thread.
	(unsuspend_one_lwp): Update, "entry" parameter is a
	struct thread_info * now.
	(unsuspend_all_lwps): Pass &all_threads to find_inferior,
	not &all_lwps.
	(linux_stabilize_threads): Ditto.  And for for_each_inferior.
	Fetch lwpid from thread, not lwp.
	(linux_wait_1): Fetch ptid, lwpid from current_inferior.
	Pass &all_threads to find_inferior, not &all_lwps.
	(send_sigstop): Fetch lwpid from thread, not lwp.
	(send_sigstop_callback): Update, "entry" parameter is a
	struct thread_info * now.
	(suspend_and_send_sigstop_callback): Ditto.
	(wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
	(stuck_in_jump_pad_callback): Update, "entry" parameter is a
	struct thread_info * now.
	(move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
	from thread, lwp.
	(lwp_running): Update, "entry" parameter is a
	struct thread_info * now.
	(stop_all_lwps): Fetch ptid from thread.
	Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
	(linux_resume_one_lwp): Fetch lwpid from thread.
	(linux_set_resume_request): Update, "entry" parameter is a
	struct thread_info * now.  Fetch pid, lwpid from thread.
	(resume_status_pending_p): Update, "entry" parameter is a
	struct thread_info * now.
	(need_step_over_p): Ditto.  Fetch lwpid from thread.
	(start_step_over): Fetch lwpid from thread.
	(linux_resume_one_thread): Update, "entry" parameter is a
	struct thread_info * now.  Fetch lwpid from thread.
	(linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
	(proceed_one_lwp): Update, "entry" parameter is a
	struct thread_info * now.  Fetch lwpid from thread.
	(unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
	struct thread_info * now.
	(proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
	(unstop_all_lwps): Ditto.  Fetch lwpid from thread.
	(regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
	directly.
	(regsets_store_inferior_registers): Ditto.
	(fetch_register, store_register): Ditto.
	(linux_read_memory, linux_write_memory): Ditto.
	(linux_request_interrupt): Ditto.
	(linux_read_auxv): Ditto.
	(linux_xfer_siginfo): Ditto.
	(linux_qxfer_spu): Ditto.
	(linux_qxfer_libraries_svr4): Ditto.
	* linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
	moved to inferiors.h.
	(get_lwp): Delete.
	(get_thread_lwp): Update.
	(struct lwp_info): Delete member "entry".  Simplify comment for
	member "thread".
	(all_lwps): Delete.
	* linux-mips-low.c (mips_read_description): Fetch lwpid from
	current_inferior directly.
	(update_watch_registers_callback): Update, "entry" parameter is a
	struct thread_info * now.  Fetch pid from thread.
	(mips_linux_prepare_to_resume): Fetch ptid from thread.
	(mips_insert_point): Fetch lwpid from current_inferior.
	Pass &all_threads to find_inferior, not &all_lwps.
	(mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
	(mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
	directly.
	(mips_stopped_data_address): Ditto.
	* linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
	directly.
	* linux-tile-low.c (tile_arch_setup): Ditto.
	* linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
	(update_debug_registers_callback): Update, "entry" parameter is a
	struct thread_info * now.  Fetch pid from thread.
	(i386_dr_low_set_addr): Fetch pid from current_inferior directly.
	Pass &all_threads to find_inferior, not &all_lwps.
	(i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
	(i386_dr_low_set_control): Fetch pid from current_inferior directly.
	Pass &all_threads to find_inferior, not &all_lwps.
	(i386_dr_low_get_control): Fetch ptid from current_inferior directly.
	(i386_dr_low_get_status): Ditto.
	(x86_linux_prepare_to_resume): Fetch ptid from thread.
	(x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
	(x86_linux_read_description): Ditto.
	* proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2014-02-20 12:25:18 -08:00
Tom Tromey 05227d1410 minor cleanup in dbxread.c
I happened to notice that last_o_file_start is write-only in
read_dbx_symtab.  This patch removes it.  Tested by rebuilding.

2014-02-20  Tom Tromey  <tromey@redhat.com>

	* dbxread.c (read_dbx_symtab): Remove last_o_file_start.
2014-02-20 12:17:03 -07:00
Doug Evans 3b8361aa0f * inferiors.c (get_first_inferior): Fix buglet. 2014-02-20 11:11:34 -08:00
Joel Brobecker 83deb43f87 Simplify .section in dw2-icycle.S
The arm-elf assembler chokes on the extra parameters in the .section
pseudo-op, so this patch removes them.

gdb/testsuite/ChangeLog:

        * gdb.dwarf2/dw2-icycle.S: Remove second and third parameters
        in .section pseudo-op.
2014-02-20 18:38:44 +01:00
Doug Evans 1254eefca2 Move containing_scm arg from gdbscm_fill_eqable_gsmob_ptr_slot
to gdbscm_init_eqable_gsmob.

	* guile/scm-gsmob.c (gdbscm_init_eqable_gsmob): New arg containing_scm.
	All callers updated.
	(gdbscm_fill_eqable_gsmob_ptr_slot): Delete arg containing_scm.
	All callers updated.
	* guile/guile-internal.h (gdbscm_init_eqable_gsmob): Update.
	(gdbscm_fill_eqable_gsmob_ptr_slot): Update.
2014-02-20 09:27:12 -08:00
Doug Evans 8c3cb9fa44 fix whitespace in previous commit 2014-02-20 09:16:32 -08:00
Doug Evans adde2bff07 Fix PR symtab/16581
* dwarf2read.c (struct die_info): New member in_process.
	(reset_die_in_process): New function.
	(process_die): Set it at the start, reset when returning.
	(inherit_abstract_dies): Only call process_die if origin_child_die
	not already being processed.

	testsuite/
	* gdb.dwarf2/dw2-icycle.S: New file.
	* gdb.dwarf2/dw2-icycle.c: New file.
	* gdb.dwarf2/dw2-icycle.exp: New file.
2014-02-20 09:13:53 -08:00
Joel Brobecker 3be75f87b9 windows-nat.c: Bring comment back regarding handling of DLL load events.
This patch brings back a comment that got stripped down a bit too much
during a recent change.

gdb/ChangeLog:

        * windows-nat.c (handle_unload_dll): Add function documentation.
        (do_initial_windows_stuff): Add comment explaining why we wait
        until after inferior initialization has finished before
        processing all DLLs.
2014-02-20 17:21:50 +01:00
Ilya Tocar 957d095533 Change cpu for vptestnmd and vptestnmq instructions.
In latest release of AVX512 spec
http://download-software.intel.com/sites/default/files/managed/50/1a/319433-018.pdf
Vptestnmq and vptestnmq instructions have CPUID AVX512F, not AVX512CD.
This patch fixes it.

opcodes/

        * i386-opc.tbl: Change CPU of vptestnmq, vptestnmd from CpuAVX512CD,
        to CpuAVX512F.
        * i386-tbl.h: Regenerate.

gas/testsuite/

        * gas/i386/avx512cd-intel.d: Remove vptestnmq, vptestnmd.
        * gas/i386/avx512cd.s: Ditto.
        * gas/i386/avx512cd.d: Ditto.
        * gas/i386/x86-64-avx512cd-intel.d: Ditto.
        * gas/i386/x86-64-avx512cd.s: Ditto.
        * gas/i386/x86-64-avx512cd.d: Ditto.
        * gas/i386/avx512f-intel.d: Add vptestnmq, vptestnmd.
        * gas/i386/avx512f.s: Ditto.
        * gas/i386/avx512f.d: Ditto.
        * gas/i386/x86-64-avx512f-intel.d: Ditto.
        * gas/i386/x86-64-avx512f.s: Ditto.
        * gas/i386/x86-64-avx512f.d: Ditto.
2014-02-20 07:53:55 -08:00
Joel Brobecker 47f7ffdb18 Simplify windows-nat.c::get_module_name
Now that get_module_name is no longer called for handling DLL events,
we can simplify it a bit, knowing that the only use is to get the
executable's filename.

While doing so, we adjusted the implementation a bit to avoid
references to DLLs, renamed it to make its more-targeted usage
more explicit, moved it right before the only function that uses it.
We also remove the use of hard-coded length for the buffers being
used.

gdb/ChangeLog:

	* windows-nat.c (get_module_name): Delete.
	(windows_get_exec_module_filename): New function, mostly
	inspired from get_module_name.
	(windows_pid_to_exec_file): Replace call to get_module_name
	by call to windows_get_exec_module_filename.
2014-02-20 09:43:03 +01:00
Joel Brobecker 1cd9feab11 Windows: Rely purely on event info when handling DLL load event
When a DLL gets loaded an the debugger gets a debug event about it,
the currently implementation in handle_load_dll currently tries to
fetch the DLL's name by first iterating over all DLLs known to
the system.  It should be sufficient to rely on the name provided
with the event, however, especially in the situation we are now,
where we now know that we're past the statup phase for our inferior.

This patch therefore simplifies windows-nat.c::handle_load_dll to
only rely on the event's lpImageName.

It also updates the function's comment to document the assumption
regarding not being during the inferior's startup phase. And while
at it, it fixes the function documentation, which was probably
unintentionally inherited from another function (perhaps windows_wait).

gdb/ChangeLog:

	* windows-nat.c (handle_load_dll): Rewrite this function's
	introductory comment.  Remove code using get_module_name
	to get the DLL's name.
2014-02-20 09:41:35 +01:00
Joel Brobecker ea39ad355e Ignore DLL load/unload events during inferior initialization.
This patch aims at simplifying DLL handling during the inferior
initialization (process creation during the "run", or during an
"attach"). Instead of processing each DLL load event, which is
sometimes incomplete, we ignore these events until the inferior
has completed its startup phase, and then just iterate over all
DLLs via EnumProcessModules.

gdb/ChangeLog:

        * windows-nat.c (get_windows_debug_event): Ignore
        LOAD_DLL_DEBUG_EVENT and UNLOAD_DLL_DEBUG_EVENT
        if windows_initialization_done == 0.
        (windows_add_all_dlls): Renames windows_ensure_ntdll_loaded.
        Adjust implementation to always load all DLLs.
        (do_initial_windows_stuff): Replace call to
        windows_ensure_ntdll_loaded by call to windows_add_all_dlls.
2014-02-20 09:40:20 +01:00
Joel Brobecker 9506028490 Deprecate windows-specific dll-symbols command and aliases
The "dll-symbols" command, specific to native Windows platforms,
gives the impression that the symbols were not loaded, first
because it completes silently, and second because the "info shared"
output does not get updated after the command completes:

    (gdb) dll-symbols C:\WINDOWS\syswow64\rpcrt4.dll
    (gdb) info shared
    From        To          Syms Read   Shared Object Library
    [...]
    0x77e51000  0x77ee2554  No          C:\WINDOWS\system32\rpcrt4.dll

(we exected the "Syms Read" column to read "Yes").

As far as I can tell, the symbols actually do get loaded, but completely
independently from the solib framework, which explains the silent
loading and the fact that the "Syms Read" column does not get updated.
See windows-nat.c::safe_symbol_file_add_stub, which calls symbol_file_add
instead of calling solib_add.

But, aside from the fact that the "Syms Read" status does not get
updated, I also noticed that it does not take into account the DLL's
actual load address when loading its symbols. As a result, I believe
that we get it wrong if the DLL does not get loaded at the prefered
address.

Rather than trying to fix this command, there does not seem to be
a reason other than historical for having Windows-specific commands
which essentially re-implements the "sharedlibrary" command. The
command interface is slightly different (the latter takes a regexp
rather than a plain filename), but it should be just as easy to use
the "sharedlibrary" command, or its "share" alias, as usisng the
"dll-symbols" command. For instance:

    (gdb) share rpcrt4.dll
    Reading symbols from C:\WINDOWS\system32\rpcrt4.dll...(no debugging symbols found)...done.
    Loaded symbols for C:\WINDOWS\system32\rpcrt4.dll
    (gdb) info shared
    From        To          Syms Read   Shared Object Library
    [...]
    0x77e51000  0x77ee2554  Yes (*)     C:\WINDOWS\system32\rpcrt4.dll

This patch therefore deprecates the "dll-symbols" command, as well
as its two aliases "add-shared-symbol-files" and "assf", with a view
of deleting them as soon as the 7.8 branch gets cut.

gdb/ChangeLog:

	* windows-nat.c (_initialize_windows_nat): Deprecate the
	"dll-symbols" command.  Turn the "add-shared-symbol-files"
	and "assf" aliases into commands, and deprecate them as well.
	* NEWS: Add entry explaining that "dll-symbols" and its two
	aliases are now deprecated.

gdb/doc/ChangeLog:

        * gdb.texinfo (Files): Document "add-shared-symbol-files"
        and "assf" as being deprecated.
        (Cygwin Native): Likewise for "dll-symbols".
        (Non-debug DLL Symbols): Remove reference to "dll-symbols"
        as a way to force the loading of symbols from a DLL.
2014-02-20 09:31:59 +01:00