Commit Graph

32857 Commits

Author SHA1 Message Date
Tom Tromey 25f4350049 cleanup fixes for inf-ptrace.c
This is one of the stylistic patches.  The code here in inf-ptrace.c
is not incorrect, but it is in a style that the cleanup checker cannot
handle.  This patch changes it to a simpler style, following the usual
method of introducing an unconditional "outer" cleanup.

	* inf-ptrace.c (inf_ptrace_create_inferior): Unconditionally
	call discard_cleanups.
	(inf_ptrace_attach): Likewise.
2013-05-30 17:04:03 +00:00
Tom Tromey d6a2e54a5d cleanup fixes for remote-mips.c
remote-mips.c has a few 'return's where cleanups are not run.

	* remote-mips.c (mips_exit_debug): Call do_cleanups on all
	return paths.
	(mips_initialize): Likewise.
	(common_open): Call do_cleanups.
2013-05-30 17:03:00 +00:00
Tom Tromey 48be7c1b92 fix up cleanup handling in internal_vproblem
internal_vproblem can return, so this introduces proper cleanup
handling there.  Otherwise it may make a cleanup that is leaked.

	* utils.c (internal_vproblem): Call do_cleanups.
2013-05-30 17:01:16 +00:00
Tom Tromey e61727abf0 fix linespec bug noticed by the checker
This fixes a linespec bug noticed by the cleanup checker.

find_linespec_symbols did this:

  cleanup = demangle_for_lookup (name, state->language->la_language,
				 &lookup_name);
[...]
      cleanup = make_cleanup (xfree, canon);

But this is wrong, as it makes a subsequent call to do_cleanups not
clean up all the local state.

	* linespec.c (find_linespec_symbols): Don't reassign to 'cleanup'.
2013-05-30 16:57:38 +00:00
Tom Tromey b81b921f79 remove erroneous return from setup_user_args
This fixes setup_user_args to drop a useless and confusing "return".

	* cli/cli-script.c (setup_user_args): Don't return after error.
2013-05-30 16:31:33 +00:00
Tom Tromey fe48dfb1ce fix cleanups in som_symtab_read
This fixes som_symtab_read not to leak cleanups.

	* somread.c (som_symtab_read): Call do_cleanups.
2013-05-30 16:28:29 +00:00
Tom Tromey 27833de78f fix print_command_1
This is a stylistic patch to make it so the checker can analyze
print_command_1.  This amounts to installing an outer cleanup and
unconditionally invoking it.

	* printcmd.c (print_command_1): Unconditionally call do_cleanups.
2013-05-30 16:25:49 +00:00
Tom Tromey 5b3fca71ae some cleanup checker fixes
Fix some bugs pointed out by the cleanup checker.  This one just fixes
some simple CLI reports, where CLI commands know that their caller
will do cleanups.  This an older style with few instances, so it is
simpler to fix them up than to teach the checker about it.

	* cli/cli-cmds.c (cd_command, alias_command): Call do_cleanups.
	* cli/cli-dump.c (restore_binary_file): Call do_cleanups.
	* interps.c (interpreter_exec_cmd): Call do_cleanups.
	* source.c (show_substitute_path_command): Call do_cleanups.
	(unset_substitute_path_command, set_substitute_path_command):
	Likewise.
	* symfile.c (load_command): Call do_cleanups.
2013-05-30 16:24:36 +00:00
Tom Tromey af83e3f886 add the cleanup checker
This patch adds the cleanup checker.  This is a Python plugin for GCC
that checks some rules for cleanup handling.  In particular it tries
to notice when cleanups are left dangling at the end of a function.

It does this by applying a few simple rules.

First, it understands that a function whose return type is "struct
cleanup *" is a "cleanup constructor".  Such functions are expected to
return the first cleanup that they make.

Then, it has the notion of a "master cleanup".  The checker keeps a
stack of all cleanups made in a basic block.  The first element is
pushed on the stack is the master cleanup -- the one that must later
be passed to either do_cleanups or discard_cleanups.

It is not perfect -- some constructs confuse it.  So, part of this
series rewrites some code in gdb so that it is analyzable.  I'll note
these spots and you can decide whether or not this is a good idea.

This patch also changes gcc-with-excheck to give it options.  Now you
must use either -Xc (for the cleanup checker) or -Xx (for the
exception checker).

	* contrib/cleanup_check.py: New file.
	* contrib/gcc-with-excheck: Add option parsing.
2013-05-30 16:22:06 +00:00
Joel Brobecker 564eac4292 windows_delete_thread: Add missing space in cast expression
gdb/ChangeLog:

	* windows-nat.c (windows_delete_thread): Add missing space
	in cast expression.
2013-05-30 13:52:31 +00:00
Hafiz Abid Qadeer 4790207643 2013-05-30 Hafiz Abid Qadeer <abidh@codesourcery.com>
* inferior.c (top level): Include tilde.h.
	(add_inferior_command): Call tilde_expand on the value of 'exec'
	argument.
2013-05-30 12:54:17 +00:00
Yao Qi 23da373ae1 gdb/
* tracepoint.c (encode_actions_1): Remove parameter 't'.
	Caller update.
	(encode_actions): Likewise.
	* remote.c (remote_download_tracepoint): Caller update.
	* tracepoint.h (encode_actions): Update declaration.
2013-05-30 09:29:18 +00:00
Pedro Alves a6e6f79133 Fix build breakage with Python 2.4.
With Python 2.4, we see this build failure:

./python/python-internal.h: In function 'gdb_Py_DECREF':
./python/python-internal.h:179: warning: dereferencing 'void *' pointer
./python/python-internal.h:179: error: request for member 'ob_refcnt' in something not a structure or union

Python 2.4 forgets to cast 'op' to PyObject pointer on the ob_refcnt
accesses:

  #define Py_DECREF(op)                                   \
          if (_Py_DEC_REFTOTAL  _Py_REF_DEBUG_COMMA       \
              --(op)->ob_refcnt != 0)                     \
                  _Py_CHECK_REFCNT(op)                    \
          else                                            \
                  _Py_Dealloc((PyObject *)(op))

...

  #define _Py_CHECK_REFCNT(OP)                                    \
  {       if ((OP)->ob_refcnt < 0)                                \
                  _Py_NegativeRefcount(__FILE__, __LINE__,        \
                                       (PyObject *)(OP));         \
  }

Python 2.7:

  #define Py_DECREF(op)                                   \
      do {                                                \
          if (_Py_DEC_REFTOTAL  _Py_REF_DEBUG_COMMA       \
          --((PyObject*)(op))->ob_refcnt != 0)            \
              _Py_CHECK_REFCNT(op)                        \
          else                                            \
          _Py_Dealloc((PyObject *)(op));                  \
      } while (0)

...

  #define _Py_CHECK_REFCNT(OP)                                    \
  {       if (((PyObject*)OP)->ob_refcnt < 0)                             \
                  _Py_NegativeRefcount(__FILE__, __LINE__,        \
                                       (PyObject *)(OP));         \
  }

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

	* python/python-internal.h (gdb_Py_DECREF): Cast OP to PyObject
	pointer.
2013-05-30 08:56:56 +00:00
Yao Qi 36d25514de gdb/
* remote.c (remote_check_symbols): Remove unused parameter
	'objfile'.
	Declaration update.
	(remote_start_remote, remote_new_objfile): Caller update.
2013-05-30 00:40:21 +00:00
Yao Qi 62a813ccaf gdb/
* mi/mi-cmds.c (mi_cmds): Define MI command
	'-exec-arguments' by macro DEF_MI_CMD_CLI_1 instead of
	DEF_MI_CMD_CLI.

gdb/testsuite/
	* gdb.mi/mi-cmd-param-changed.exp (test_command_param_changed):
	Add a test that no MI notification is emitted when executing
	-exec-arguments.
2013-05-30 00:25:16 +00:00
gdbadmin c0f316436d *** empty log message *** 2013-05-30 00:00:32 +00:00
Pedro Alves 28439a30ac [remote] Insert breakpoints in the right process.
I noticed that gdb.multi/multi-arch.exp wasn't passing with
extended-remote GDBserver with my pending multi-process+multi-arch
series anymore on current mainline, while it used to pass before:

 (gdb) run
 Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.multi/ma-hangout
 Process /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.multi/ma-hangout created; pid = 32067
 Warning:
 Cannot insert breakpoint 2.
 Error accessing memory address 0x4005c2: Unknown error -1.
 Cannot insert breakpoint -1.
 Temporarily disabling shared library breakpoints:
 breakpoint #-1

 (gdb) FAIL: gdb.multi/multi-arch.exp: starting inferior 2


Investigating manually, I found an easy way to reproduce.  You just
need breakpoints on distinct inferiors, and a way to have GDB install
them in one go:

 (gdb) set breakpoint always-inserted on
 (gdb) info breakpoints
 Num     Type           Disp Enb Address            What
 2       breakpoint     del  n   <MULTIPLE>
 2.1                         y     0x00000000004005c2 in main at ../../../src/gdb/testsuite/gdb.multi/hello.c:40 inf 1
 2.2                         y     0x08048475         in main at ../../../src/gdb/testsuite/gdb.multi/hangout.c:22 inf 2
 (gdb) enable 2
 Warning:
 Cannot insert breakpoint 2.
 Error accessing memory address 0x4005c2: Unknown error -1.

And turning on remote debugging, we see:

 (gdb) set debug remote 1
 (gdb) disable 2
 (gdb) enable 2
 Sending packet: $Z0,4005c2,1#71...Packet received: E01
 Sending packet: $Z0,8048475,1#87...Packet received: OK
 Warning:
 Cannot insert breakpoint 2.
 Error accessing memory address 0x4005c2: Unknown error -1.

Notice that each of those Z0 breakpoints should be set in different
processes.  However, no Hg packet to select a process has been sent in
between, so GDBserver tries to plant both on the same process that
happens to be current.  The first Z0 then not so surprisingly fails.
IOW, the blame is on GDB, for telling GDBserver to plant both
breakpoints in the same process.

remote.c has a lazy scheme where it keeps a local cache of the
remote's selected general thread, and delays updating it on the remote
side until necessary (memory/register reads/writes, etc.).  This is
done to reduce RSP traffic.  The bug is that the Zx breakpoint
insert/remove methods weren't committing the selected thread/process
back to the remote side:

 Breakpoint 3, remote_insert_breakpoint (gdbarch=0x1383ae0, bp_tgt=0x140c2b0) at ../../src/gdb/remote.c:8148
 8148      if (remote_protocol_packets[PACKET_Z0].support != PACKET_DISABLE)
 (top-gdb) p inferior_ptid
 $3 = {pid = 3670, lwp = 0, tid = 3670}
 (top-gdb) p general_thread
 $4 = {pid = 3671, lwp = 0, tid = 3671}

IOW, a call to set_general_process is missing.

I did some auditing over remote.c, and added calls to all places I
found missing it.

This only used to work by chance before.  breakpoint.c switches to a
thread of the target process before installing a breakpoint location.
That calls switch_to_thread.  Before:

 2012-07-27  Yao Qi  <yao@codesourcery.com>

         * thread.c (switch_to_thread): Don't call registers_changed.

that caused the register caches to all be flushed and refetched before
installing the breakpoint location.  Given fetching registers commits
the remote general thread (with Hg), masking out the latent bug.

Tested on x86_64 Fedora 17 with GDBserver.

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

	* remote.c (remote_insert_breakpoint, remote_remove_breakpoint)
	(remote_insert_watchpoint, remote_remove_watchpoint)
	(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
	(remote_verify_memory, compare_sections_command)
	(remote_search_memory): Set the general process/thread on the
	remote side.
2013-05-29 11:57:48 +00:00
Pedro Alves 6ac1c0821e [AArch64] Remove all traces of aarch64-without-fpu.xml.
The aarch64-without-fpu description is unused.

Linux requires an FPU, so the AArch64 native port always returns the
with-fpu variant:

static const struct target_desc *
aarch64_linux_read_description (struct target_ops *ops)
{
  initialize_tdesc_aarch64 ();
  return tdesc_aarch64;
}

When the target doesn't report a target description at all, we
fallback to a register set with an FPU:

aarch64_gdbarch_init ()
...
  if (!tdesc_has_registers (tdesc))
    tdesc = tdesc_aarch64;

This just removes the dead description.

Tested by building on x86_64 Fedora 17 with --enable=targets=all.

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

	* aarch64-tdep.c: Don't include "features/aarch64-without-fpu.c".
	(_initialize_aarch64_tdep): Don't call
	initialize_tdesc_aarch64_without_fpu.
	* features/Makefile (WHICH): Remove reference to
	aarch64-without-fpu.
	* features/aarch64-without-fpu.c: Delete file.
	* regformats/aarch64-without-fpu.dat: Delete file.
2013-05-29 09:18:48 +00:00
gdbadmin 177565ddef *** empty log message *** 2013-05-29 00:00:02 +00:00
Pedro Alves 9b25f2d30c [GDBserver][AArch64] Remove references to aarch64-without-fpu.xml.
The GDBserver Aarch64 port includes the aarch64-without-fpu
description in the build, but doesn't actually use it anywhere.  As
Linux always requires an FPU, just remove the dead code.

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

	* Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
	(aarch64-without-fpu.c): Delete rule.
	* configure.srv (aarch64*-*-linux*): Remove references to
	aarch64-without-fpu.o and aarch64-without-fpu.xml.
	* linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
	declaration.
2013-05-28 10:41:17 +00:00
Yao Qi a73e3634d1 gdb/
* tracepoint.c (stringify_collection_list): Remove parameter
	'string'.
	(encode_actions): Caller update.  Remove local variables.
2013-05-28 02:55:04 +00:00
gdbadmin 18e17b047d *** empty log message *** 2013-05-28 00:00:02 +00:00
gdbadmin 0513b0a3e8 *** empty log message *** 2013-05-27 00:00:03 +00:00
gdbadmin 89ca6a248b *** empty log message *** 2013-05-26 00:00:02 +00:00
gdbadmin b5cc0fabb4 *** empty log message *** 2013-05-25 00:00:03 +00:00
Jan Kratochvil 8f56dad4bb gdb/testsuite/
PR testsuite/12649
	* gdb.mi/mi-dprintf.exp (mi_continue_dprintf) (mi 2nd dprintf): Replace
	$mi_gdb_prompt expectation by mi_expect_stop.
	(mi 1st dprintf, agent, mi 2nd dprintf, agent)
	(mi info dprintf second time): Replace them by mi_send_resuming_command
	and mi_expect_stop.
2013-05-24 15:37:25 +00:00
Gary Benson c588eb206c 2013-05-24 Gary Benson <gbenson@redhat.com>
* gdb.base/solib-disc.exp (exec_opts): Remove unnecesary
	backslash.
	* gdb.base/unload.exp (exec_opts): Remove two unnecessary
	backslashes.
	* gdb.base/watchpoint-solib.exp (exec_opts): Remove unnecesary
	backslash.
2013-05-24 14:02:35 +00:00
Yao Qi c0ea94eb34 gdb/
* tracepoint.c (TFILE_PID): Remove.
	(tfile_open): Don't add thread and inferior.
	(tfile_close): Don't set 'inferior_ptid'.  Don't call
	exit_inferior_silent.
	(tfile_thread_alive): Remove.
	(init_tfile_ops): Don't set field 'to_thread_alive' of
	tfile_ops.

gdb/testsuite/

	* gdb.trace/tfile.exp: Test inferior and thread.
2013-05-24 12:27:39 +00:00
Pedro Alves 6740dc9c3e [gdbserver] Don't assume vCont;r ADDR1,ADDR2 comes with a ptid attached.
This bit:

+	  p1 = strchr (p, ':');
+	  decode_address (&resume_info[i].step_range_end, p, p1 - p);

should not expect the ':' to be there.  An action without a ptid is
valid:

 "If an action is specified with no thread-id, then it is applied to any
 threads that don't have a specific action specified"

This is handled further below:

      if (p[0] == 0)
	{
	  resume_info[i].thread = minus_one_ptid;
	  default_action = resume_info[i];

	  /* Note: we don't increment i here, we'll overwrite this entry
	     the next time through.  */
	}
      else if (p[0] == ':')

A stub that doesn't support and report to gdb thread ids at all (like
metal metal targets) only will always only see a single default action
with no ptid.

Use unpack_varlen_hex instead of decode_address.  The former doesn't
need to be told where the hex number ends, and it actually returns
that info instead, which we can use for validation.

Tested on x86_64 Fedora 17.

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

	* server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
	instead of strchr/decode_address.  Error if the range isn't split
	with a ','.  Don't assume there's be a ':' in the action.
2013-05-24 11:28:06 +00:00
Yao Qi db1ac43683 gdb/testsuite/
* gdb.base/range-stepping.exp: Skip the rest of tests if the
	test fails.
	* lib/range-stepping-support.exp (exec_cmd_expect_vCont_count):
	Return 0 if the test passes, otherwise return 1.
2013-05-24 09:57:12 +00:00
Joel Brobecker 5901af59c9 Fix gdb.info build failure
gdb.texinfo:36367: `Installed System-wide Configuration Scripts' has no Up field (perhaps incorrect sectioning?).
    gdb.texinfo:36367: warning: unreferenced node `Installed System-wide Configuration Scripts'.

gdb/doc/ChangeLog:

        * gdb.texinfo (System-wide Configuration Scripts): Renames
        "Installed System-wide Configuration Scripts". Add associated
        @menu block.
2013-05-24 04:50:26 +00:00
Doug Evans c0803dc23a Update to load fission.exp. 2013-05-24 01:33:50 +00:00
Doug Evans b6abb10ccc * boards/fission-dwp.exp: New file. 2013-05-24 01:30:05 +00:00
Doug Evans 20d7f21139 * contrib/cc-with-tweaks.sh (-p): Handle no dwo files. 2013-05-24 00:30:24 +00:00
gdbadmin e6ec244956 *** empty log message *** 2013-05-24 00:00:02 +00:00
Pedro Alves 8658d16d9d common/filestuff.c: No sockets on DJGPP.
Building gdb with --host=i586-pc-msdosdjgpp ends up with:

 i586-pc-msdosdjgpp-gcc -g -O2 -I../../src/gdb/config/djgpp  -I. -I../../src/gdb -I../../src/gdb/common -I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../bfd -I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber -I../../src/gdb/../libdecnumber -I./../intl -I../../src/gdb/gnulib/import -Ibuild-gnulib/import    -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Werror -c -o filestuff.o -MT filestuff.o -MMD -MP -MF .deps/filestuff.Tpo ../../src/gdb/common/filestuff.c
 ../../src/gdb/common/filestuff.c:38:24: fatal error: sys/socket.h: No such file or directory

There are no sockets on djgpp.  This #ifdef's out the bits in the file
that use sockets, depending on whether winsock or sys/socket.h is
available.

As alternative approach, given ser-tcp.c, ser-pipe.c, etc. are split
into separate files, and which to use is selected by configure.ac:

 dnl Figure out which of the many generic ser-*.c files the _host_ supports.
 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
 case ${host} in
  *go32* ) SER_HARDWIRE=ser-go32.o ;;
  *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
  *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
 esac
 AC_SUBST(SER_HARDWIRE)

... I considered splitting filestuff.c similarly.  But I quickly gave
up on the idea, as it looked like a lot more complication over this
approach, for no real gain.  Plus, there are uses of these functions
outside the ser*.c framework.

gdbserver's configure.ac is already checking for sys/socket.h.

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

	* common/filestuff.c [USE_WIN32API]: Define HAVE_SOCKETS.
	[HAVE_SYS_SOCKET_H]: Define HAVE_SOCKETS.
	(socket_mark_cloexec, gdb_socketpair_cloexec, gdb_socket_cloexec):
	Only define if HAVE_SOCKETS is defined.
	* configure.ac: Check for sys/socket.h.
	* config.in, configure: Regenerate.
2013-05-23 18:37:00 +00:00
Pedro Alves 21aa081e21 dwarf2read.c: Don't assume uint32_t is unsigned int on all hosts.
Building gdb on GNU/Linux, for --host=i586-pc-msdosdjgpp, I get:

 ../../src/gdb/dwarf2read.c: In function 'create_dwp_hash_table':
 ../../src/gdb/dwarf2read.c:8626:7: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t' [-Werror=format]
 ../../src/gdb/dwarf2read.c:8632:7: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t' [-Werror=format]
 ../../src/gdb/dwarf2read.c: In function 'create_dwo_in_dwp':
 ../../src/gdb/dwarf2read.c:8754:6: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' [-Werror=format]
 ../../src/gdb/dwarf2read.c: In function 'open_and_init_dwp_file':
 ../../src/gdb/dwarf2read.c:9248:6: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format]
 ../../src/gdb/dwarf2read.c:9248:6: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format]

And:

 $ grep uint32_t /usr/i586-pc-msdosdjgpp/sys-include/*
 /usr/i586-pc-msdosdjgpp/sys-include/stdint.h:typedef unsigned long uint32_t;

As decided on the discussion at
<http://sourceware.org/ml/gdb-patches/2013-05/msg00788.html>, use
pulongest rather than PRIu32.

Tested on F17.  Also confirmed GDB still builds OK with
--host=i686-w64-mingw32.

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

	* dwarf2read.c (create_dwp_hash_table, create_dwo_in_dwp)
	(open_and_init_dwp_file): Use %s/pulongest instead of %u for
	printing uint32_t variables.
2013-05-23 18:31:29 +00:00
Pedro Alves bc5065a70f range stepping: tests
This adds tests to verify range stepping is used as expected, by
inspecting the RSP traffic, looking for vCont;s and vCont;r packets.

gdb/testsuite/
2013-05-23  Yao Qi  <yao@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* gdb.base/range-stepping.c: New file.
	* gdb.base/range-stepping.exp: New file.
	* gdb.trace/range-stepping.c: New file.
	* gdb.trace/range-stepping.exp: New file.
	* lib/range-stepping-support.exp: New file.
2013-05-23 17:19:05 +00:00
Pedro Alves c2d6af84da range stepping: gdbserver (x86 GNU/Linux)
This patch adds support for range stepping to GDBserver, teaching it
about vCont;r.

It'd be easy to enable this for all hardware single-step targets
without needing the linux_target_ops hook, however, at least PPC needs
special care, due to the fact that PPC atomic sequences can't be
hardware single-stepped through, a thing which GDBserver doesn't know
about.  So this leaves the support limited to x86/x86_64.

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

	* NEWS: Mention GDBserver range stepping support.

gdb/gdbserver/
2013-05-23  Yao Qi  <yao@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* linux-low.c (lwp_in_step_range): New function.
	(linux_wait_1): If the thread was range stepping and stopped
	outside the stepping range, report the stop to GDB.  Otherwise,
	continue stepping.  Add range stepping debug output.
	(linux_set_resume_request): Copy the step range from the resume
	request to the lwp.
	(linux_supports_range_stepping): New.
	(linux_target_ops) <supports_range_stepping>: Set to
	linux_supports_range_stepping.
	* linux-low.h (struct linux_target_ops)
	<supports_range_stepping>: New field.
	(struct lwp_info) <step_range_start, step_range_end>: New fields.
	* linux-x86-low.c (x86_supports_range_stepping): New.
	(the_low_target) <supports_range_stepping>: Set to
	x86_supports_range_stepping.
	* server.c (handle_v_cont): Handle 'r' action.
	(handle_v_requests): Append ";r" if the target supports range
	stepping.
	* target.h (struct thread_resume) <step_range_start,
	step_range_end>: New fields.
	(struct target_ops) <supports_range_stepping>:
	New field.
	(target_supports_range_stepping): New macro.
2013-05-23 17:17:50 +00:00
Pedro Alves c1e36e3e91 range stepping: gdb
This patch teaches GDB to take advantage of target-assisted range
stepping.  It adds a new 'r ADDR1,ADDR2' action to vCont (vCont;r),
meaning, "step once, and keep stepping as long as the thread is in the
[ADDR1,ADDR2) range".

Rationale:

When user issues the "step" command on the following line of source,

   a = b + c + d * e - a;

GDB single-steps every single instruction until the program reaches a
new different line.  E.g., on x86_64, that line compiles to:

   0x08048434 <+65>:    mov    0x1c(%esp),%eax
   0x08048438 <+69>:    mov    0x30(%esp),%edx
   0x0804843c <+73>:    add    %eax,%edx
   0x0804843e <+75>:    mov    0x18(%esp),%eax
   0x08048442 <+79>:    imul   0x2c(%esp),%eax
   0x08048447 <+84>:    add    %edx,%eax
   0x08048449 <+86>:    sub    0x34(%esp),%eax
   0x0804844d <+90>:    mov    %eax,0x34(%esp)
   0x08048451 <+94>:    mov    0x1c(%esp),%eax

and the following is the RSP traffic between GDB and GDBserver:

 --> vCont;s:p2e13.2e13;c
 <-- T0505:68efffbf;04:30efffbf;08:3c840408;thread:p2e13.2e13;core:1;
 --> vCont;s:p2e13.2e13;c
 <-- T0505:68efffbf;04:30efffbf;08:3e840408;thread:p2e13.2e13;core:2;
 --> vCont;s:p2e13.2e13;c
 <-- T0505:68efffbf;04:30efffbf;08:42840408;thread:p2e13.2e13;core:2;
 --> vCont;s:p2e13.2e13;c
 <-- T0505:68efffbf;04:30efffbf;08:47840408;thread:p2e13.2e13;core:0;
 --> vCont;s:p2e13.2e13;c
 <-- T0505:68efffbf;04:30efffbf;08:49840408;thread:p2e13.2e13;core:0;
 --> vCont;s:p2e13.2e13;c
 <-- T0505:68efffbf;04:30efffbf;08:4d840408;thread:p2e13.2e13;core:0;
 --> vCont;s:p2e13.2e13;c
 <-- T0505:68efffbf;04:30efffbf;08:51840408;thread:p2e13.2e13;core:0;

IOW, a lot of roundtrips between GDB and GDBserver.

If we add a new command to the RSP, meaning "keep stepping and don't
report a stop until the program goes out of the [0x08048434,
0x08048451) address range", then the RSP traffic can be reduced down
to:

 --> vCont;r8048434,8048451:p2db0.2db0;c
 <-- T0505:68efffbf;04:30efffbf;08:51840408;thread:p2db0.2db0;core:1;

As number of packets is reduced dramatically, the performance of
stepping source lines is much improved.

In case something is wrong with range stepping on the stub side, the
debug info or even gdb, this adds a "set/show range-stepping" command
to be able to turn range stepping off.

gdb/
2013-05-23  Yao Qi  <yao@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* gdbthread.h (struct thread_control_state) <may_range_step>: New
	field.
	* infcmd.c (step_once, until_next_command): Enable range stepping.
	* infrun.c (displaced_step_prepare): Disable range stepping.
	(resume): Disable range stepping if stepping over a breakpoint or
	we have software watchpoints.  If range stepping is enabled,
	assert the thread is in the stepping range.
	(clear_proceed_status_thread): Clear may_range_step.
	(handle_inferior_event): Disable range stepping as soon as we know
	the thread that hit the event.  Re-enable it whenever we're going
	to step with a step range.
	* remote.c (struct vCont_action_support) <r>: New field.
	(use_range_stepping): New global.
	(remote_vcont_probe): Handle 'r' action.
	(append_resumption): Append an 'r' action if the thread may range
	step.
	(show_range_stepping): New function.
	(set_range_stepping): New function.
	(_initialize_remote): Call add_setshow_boolean_cmd to register the
	'set range-stepping' and 'show range-stepping' commands.
	* NEWS: Mention range stepping, the new vCont;r action, and the
	new "set/show range-stepping" commands.

gdb/doc/
2013-05-23  Yao Qi  <yao@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* gdb.texinfo (Packets): Document 'vCont;r'.
	(Continuing and Stepping): Document target-assisted range
	stepping, and the 'set range-stepping' and 'show range-stepping'
	commands.
2013-05-23 17:15:35 +00:00
Pedro Alves d458bd84a8 Convert rs->support_vCont_t to a struct.
Convert the 'support_vCont_t' int field to a struct, in preparation
for adding more fields to it.

gdb/
2013-05-23  Yao Qi  <yao@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* remote.c (struct vCont_action_support): New struct.
	(struct remote_state) <support_vCont_t>: Remove field.
	<vCont_actions_support>: New field.
	(remote_vcont_probe, remote_stop_ns): Update.
2013-05-23 17:13:57 +00:00
Pedro Alves ce4c476a0f Factor out in-stepping-range checks.
This adds a function for doing within-thread's-stepping-range checks,
and converts a couple spots to use it.  Following patches will add
more uses.

gdb/
2013-05-23  Yao Qi  <yao@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* gdbthread.h (pc_in_thread_step_range): New declaration.
	* thread.c (pc_in_thread_step_range): New function.
	* infrun.c (handle_inferior_event): Use it.
2013-05-23 17:12:51 +00:00
Joel Brobecker ce70887aa8 mi/mi-cmd-break.c: Use xsnprintf instead of sprintf (ARI fix)
gdb/ChangeLog:

        * mi/mi-cmd-break.c (mi_argv_to_format): Use xsnprintf instead
        of sprintf.
2013-05-23 06:39:42 +00:00
Joel Brobecker 0201faace7 Document new <data-dir>/system-gdbinit area
gdb/doc/ChangeLog:

        * gdb.texinfo (Installed System-wide Configuration Scripts):
        Add subsection describing the scripts now available under
        the data-dir's system-gdbbinit subdirectory.
        * NEWS: Add entry announcing the availability of system-wide
        configuration scripts for ElinOS and Wind River Linux.
2013-05-23 06:00:53 +00:00
gdbadmin 5fd133faea *** empty log message *** 2013-05-23 00:00:03 +00:00
Keith Seitz 55b87a526f * ada-lang.c (is_known_support_routine): Add explicit free of
'func_name' from find_frame_funname.
	(ada_unhandled_exception_name_addr_from_raise): Add cleanups
	for func_name from find_frame_funname.
	* python/py-frame.c (frapy_name): Add explicit free of
	'name' from find_frame_funname.
	* stack.c (find_frame_funname): Add comment explaining that
	funcp must be freed by the caller.
	Return copy of symbol names instead of pointers.
	(print_frame): Add a cleanup for 'funname' from
	find_frame_funname.
	* stack.h (find_frame_funname): Remove "const" from
	'funname' parameter.
2013-05-22 21:16:18 +00:00
Tom Tromey 5f2e6b00f8 PR c++/15401:
* c-valprint.c (c_value_print): Use value_addr for
	references.  Convert back to reference type with value_ref.
gdb/testsuite
	* gdb.cp/class2.cc (main): New local 'aref'.
	* gdb.cp/class2.exp: Check printing of 'aref'.
2013-05-22 20:51:49 +00:00
Doug Evans e6ba475a03 * gdb.threads/wp-replication.c (main): Insert some code at the start
to ensure the breakpoint on main is only hit once.  Fix comment.
2013-05-22 16:30:24 +00:00
Eli Zaretskii d85c48475f Fix reporting of DLL unload events on MS-Windows.
gdb/windows-nat.c (handle_unload_dll): Don't call solib_add for the
 unloaded DLL, it will be done by handle_solib_event.  See
 http://sourceware.org/ml/gdb-patches/2013-05/msg00713.html for the
 details.
2013-05-22 16:18:12 +00:00
Phil Muldoon 54eb231c4b 2013-05-22 Phil Muldoon <pmuldoon@redhat.com>
* ui-out.c: Create typedef ui_out_level_p and define vector
	operations for that type.
	(struct ui_out): Use a vector instead of an array.
	(current_level): Return level from a vector.
	(push_level): Create a level in a vector.
	(pop_level): Delete a level in a vector.
	(ui_out_new): Create initial level zero level, and store in a
	vector.
	(ui_out_destroy): Add vector cleanup.
2013-05-22 12:27:13 +00:00
Pedro Alves ac90359cdc Let the ARI know gdb_Py_DECREF is OK.
The ARI complains with:

> gdb/python/python-internal.h:177: code: editCase function: Function name starts lower case but has uppercased letters.
gdb/python/python-internal.h:177:gdb_Py_DECREF (void *op)

gdb_Py_DECREF is just wrapping a python macro that happens to be mixed case.

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

	* python/python-internal.h (gdb_Py_DECREF): Tag with
	"ARI: editCase function".
2013-05-22 09:31:44 +00:00
gdbadmin 6415af12e6 *** empty log message *** 2013-05-22 00:00:03 +00:00
Paul Pluzhnikov 6dcc1893b6 2013-05-21 Paul Pluzhnikov <ppluzhnikov@google.com>
* solib-svr4.c (svr4_free_so): Protect against NULL dereference.
2013-05-21 23:41:29 +00:00
Pedro Alves c8c735b963 py_decref: Don't check for NULL before calling Py_DECREF.
The only difference between Py_DECREF and Py_XDECREF is that the latter allows passing
in a NULL object, while the former prohibits it.  Given that, it's natural to expect
the same from py_decref vs py_xdecref.

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

	* python/py-prettyprint.c (apply_val_pretty_printer): Check
	whether PRINTER is NULL before installing a Py_DECREF cleanup.
	* python/py-utils.c (py_decref): Don't check for NULL before
	calling Py_DECREF.
2013-05-21 20:53:21 +00:00
Pedro Alves 1915daebe6 Centralize workaround for Python 2.6's Py_DECREF.
Wrap/redefine Py_DECREF ourselves, avoiding the need for uses to care
about extra braces due to the fact that Python only started wrapping Py_DECREF
in 'do {} while (0)' after 2.6.

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

	* python/py-utils.c (py_decref): Remove extra braces.
	(gdb_pymodule_addobject): Remove extra braces.
	* python-internal.h (gdb_Py_DECREF): New static inline function.
	(Py_DECREF): Redefine as calling gdb_Py_DECREF.
2013-05-21 20:52:30 +00:00
Keith Seitz 52c935b6f5 * gdb.base/filesym.exp: Use gdb_test_multiple instead of
gdb_expect.
	Add test to flush the remaining input buffer so that this
	file passes testsuite/12649.
2013-05-21 19:11:50 +00:00
Philippe Waroquiers bd9673a4de Fix internal error caused by interaction between catch signal and fork 2013-05-21 18:47:05 +00:00
Sterling Augustine 69a97597d5 2013-05-21 Sterling Augustine <saugustine@google.com>
* boards/remote-stdio-gdbserver.exp: New file.
2013-05-21 17:58:46 +00:00
Jan Kratochvil ff6009d09a gdb/
Workaround Python 2.6.
	* python/py-utils.c (gdb_pymodule_addobject): Wrap Py_DECREF into
	a block.
2013-05-21 15:02:28 +00:00
Jan Kratochvil 44e9736318 gdb/testsuite/
PR testsuite/12649
	* gdb.mi/mi-dprintf.exp (mi_continue_dprintf): Fix expect strings for
	racy matches.
2013-05-21 15:00:32 +00:00
Jan Kratochvil 3641da115a gdb/
Code cleanup: constification.
	* solib.c (solib_ops): Make return type and ops variable type const.
	(set_solib_ops): Make the new_ops parameter and ops variable const.
	(solib_find, solib_map_sections, clear_so, free_so, update_solib_list)
	(solib_add, solib_keep_data_in_core, clear_solib)
	(solib_create_inferior_hook, in_solib_dynsym_resolve_code)
	(reload_shared_libraries, solib_global_lookup): Make the ops variable
	const.
	* solib.h (set_solib_ops): Make the new_ops parameter const.
2013-05-21 08:16:10 +00:00
Christian Groessler 023928657e * gdb.dwarf2/dw2-dir-file-name.exp: Don't use brace expansion,
since it's not supported in all shells.
2013-05-21 07:25:51 +00:00
Joel Brobecker 776af39ed7 Add new system-gdbinit infrastructure
gdb/ChangeLog:

        * data-directory/Makefile.in (SYSTEM_GDBINIT_SRCDIR): New
        variable.
        (VPATH): Add SYSTEM_GDBINIT_SRCDIR.
        (SYSTEM_GDBINIT_DIR, SYSTEM_GDBINIT_INSTALL_DIR)
        (SYSTEM_GDBINIT_FILES): New variables.
        (all): Add stamp-system-gdbinit.
        (stamp-system-gdbinit): New rule.
        (clean-system-gdbinit, install-system-gdbinit)
        (uninstall-system-gdbinit): New rules.  Make them .PHONY.
        (install-only): Add dependency on install-system-gdbinit.
        (uninstall): Add dependency on uninstall-system-gdbinit.
        (clean): Add dependency on clean-system-gdbinit.
        * system-gdbinit/elinos.py: New file.
        * system-gdbinit/wrs-linux.py: New file.
2013-05-21 06:50:12 +00:00
Joel Brobecker 1509e5737f [Ada] Fix cleanup leak in ada-lang.c:old_renaming_is_invisible
gdb/ChangeLog:

	* ada-lang.c (old_renaming_is_invisible): Fix cleanup leak.
2013-05-21 05:41:31 +00:00
Hui Zhu c5867ab65c 2013-05-21 Hui Zhu <hui@codesourcery.com>
* breakpoint.c (dprintf_breakpoint_ops): Remove its static.
	* breakpoint.h (dprintf_breakpoint_ops): Add extern.
	* mi/mi-cmd-break.c (ctype.h): New include.
	(gdb_obstack.h): New include.
	(mi_argv_to_format, mi_cmd_break_insert_1): New.
	(mi_cmd_break_insert): Call mi_cmd_break_insert_1.
	(mi_cmd_dprintf_insert): New.
	* mi/mi-cmds.c (mi_cmds): Add "dprintf-insert".
	* mi/mi-cmds.h (mi_cmd_dprintf_insert): New extern.

2013-05-21  Hui Zhu  <hui@codesourcery.com>

	* gdb.texinfo (GDB/MI Breakpoint Commands): Describe the
	"-dprintf-insert" command.

2013-05-21  Hui Zhu  <hui@codesourcery.com>

	* gdb.mi/Makefile.in (PROGS): Add "mi-dprintf".
	* gdb.mi/mi-dprintf.exp, gdb.mi/mi-dprintf.c: New.
2013-05-21 04:18:55 +00:00
gdbadmin a825696a06 *** empty log message *** 2013-05-21 00:00:32 +00:00
Doug Evans 6c9e2db469 * lib/dwarf.exp (Dwarf): New variable _abbrev_section.
(_handle_DW_TAG): Use it.
	(cu, tu): Replace parameters is_64, version, addr_size with options.
	All callers updated.  Add Fission support.
	* gdb.dwarf2/implptrconst.exp: Update callers of "cu".
	* gdb.dwarf2/method-ptr.exp: Ditto.
	* gdb.dwarf2/nostaticblock.exp: Ditto.
	* gdb.dwarf2/subrange.exp: Ditto.
	* gdb.dwarf2/missing-sig-type.exp: Update callers of "cu", "tu".
2013-05-20 22:11:37 +00:00
Tom Tromey 4a6e676ceb * gdb.gdb/python-selftest.exp: New file. 2013-05-20 20:43:28 +00:00
Tom Tromey 7d38e38f3f * python/py-prettyprint.c (search_pp_list): Decref 'attr'. 2013-05-20 20:39:31 +00:00
Tom Tromey 97b77b3951 * python/py-value.c (valpy_get_dynamic_type): Simplify
dynamic_type assignment.  Use Py_XINCREF.
2013-05-20 20:38:47 +00:00
Tom Tromey 53e6647928 * python/py-type.c (typy_fields): Unconditionally decref 'r'. 2013-05-20 20:37:48 +00:00
Tom Tromey dcf8783234 * python/py-frame.c (frapy_older, frapy_newer, gdbpy_newest_frame)
(gdbpy_selected_frame): Move object-construction code
	out of TRY_CATCH.
2013-05-20 20:37:06 +00:00
Tom Tromey aa36459a92 * python/py-arch.c (gdbpy_initialize_arch): Use
gdb_pymodule_addobject.
	* python/py-block.c (gdbpy_initialize_blocks): Use
	gdb_pymodule_addobject.
	* python/py-breakpoint.c (gdbpy_initialize_breakpoints): Use
	gdb_pymodule_addobject.
	* python/py-cmd.c (gdbpy_initialize_breakpoints): Use
	gdb_pymodule_addobject.
	* python/py-event.c (gdbpy_initialize_event_generic): Use
	gdb_pymodule_addobject.
	* python/py-evtregistry.c (gdbpy_initialize_eventregistry): Use
	gdb_pymodule_addobject.
	* python/py-evts.c (add_new_registry): Use
	gdb_pymodule_addobject.
	(gdbpy_initialize_py_events): Likewise.
	* python/py-finishbreakpoint.c
	(gdbpy_initialize_finishbreakpoints): Use
	gdb_pymodule_addobject.
	* python/py-frame.c (gdbpy_initialize_frames): Use
	gdb_pymodule_addobject.
	* python/py-function.c (gdbpy_initialize_functions): Use
	gdb_pymodule_addobject.
	* python/py-inferior.c (gdbpy_initialize_inferior): Use
	gdb_pymodule_addobject.
	* python/py-infthread.c (gdbpy_initialize_thread): Use
	gdb_pymodule_addobject.
	* python/py-objfile.c (gdbpy_initialize_objfile): Use
	gdb_pymodule_addobject.
	* python/py-param.c (gdbpy_initialize_parameters): Use
	gdb_pymodule_addobject.
	* python/py-progspace.c (gdbpy_initialize_pspace): Use
	gdb_pymodule_addobject.
	* python/py-symbol.c (gdbpy_initialize_symbols): Use
	gdb_pymodule_addobject.
	* python/py-symtab.c (gdbpy_initialize_symtabs): Use
	gdb_pymodule_addobject.
	* python/py-type.c (gdbpy_initialize_types): Use
	gdb_pymodule_addobject.
	* python/py-utils.c (gdb_pymodule_addobject): New function.
	* python/py-value.c (gdbpy_initialize_values): Use
	gdb_pymodule_addobject.
	* python/python-internal.h (gdb_pymodule_addobject): Declare.
	* python/python.c (_initialize_python): Use
	gdb_pymodule_addobject.
2013-05-20 20:36:19 +00:00
Tom Tromey 3d4a3c3ea2 * python/py-cmd.c (cmdpy_completer): Use explicit decref.
* python/py-param.c (get_set_value, get_show_value): Use
	explicit decrefs.
	* python/python.c (start_type_printers, apply_type_printers):
	Use explicit decrefs.
2013-05-20 20:34:49 +00:00
Tom Tromey 72ff8829c1 * python/py-evts.c (gdbpy_initialize_py_events): Don't
incref the module.
2013-05-20 20:34:11 +00:00
Tom Tromey 02146ba51f * python/python.c (gdbpy_run_events): Decref the result
of PyObject_CallObject.
2013-05-20 20:32:56 +00:00
Tom Tromey 33ee792fe5 * python/py-symtab.c (set_sal): Use
CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION.  Return -1 on error.
	(symtab_and_line_to_sal_object): Update.
2013-05-20 20:31:18 +00:00
Tom Tromey fcb49fc817 * python/py-param.c (compute_enum_values): Decref 'item'. 2013-05-20 20:30:24 +00:00
Tom Tromey 0646da15da * mi/mi-main.c: Include python-internal.h.
(mi_cmd_list_features): Check gdb_python_initialized.
	* python/py-inferior.c (python_on_normal_stop, python_on_resume)
	(python_inferior_exit, python_new_objfile, add_thread_object)
	(delete_thread_object, py_free_inferior): Check
	gdb_python_initialized.
	* python/py-prettyprint.c (apply_val_pretty_printer): Check
	gdb_python_initialized.
	* python/py-type.c (save_objfile_types): Check
	gdb_python_initialized.
	* python/python-internal.h (gdb_python_initialized): Declare.
	* python/python.c (ensure_python_env): Throw exception if
	Python not initialized.
	(before_prompt_hook, source_python_script_for_objfile)
	(start_type_printers, apply_type_printers,
	free_type_printers): Check gdb_python_initialized.
	* varobj.c (varobj_get_display_hint)
	(dynamic_varobj_has_child_method, update_dynamic_varobj_children)
	(install_new_value_visualizer, varobj_set_visualizer)
	(value_get_print_value): Check gdb_python_initialized.
2013-05-20 20:29:44 +00:00
Tom Tromey 999633ede7 * python/py-arch.c (gdbpy_initialize_arch): Return 'int'.
Check errors.
	* python/py-auto-load.c (gdbpy_initialize_auto_load): Return 'int'.
	* python/py-block.c (gdbpy_initialize_blocks): Return 'int'.
	Check errors.
	* python/py-breakpoint.c (gdbpy_initialize_breakpoints): Return 'int'.
	Check errors.
	* python/py-cmd.c (gdbpy_initialize_commands): Return 'int'.
	Check errors.
	* python/py-event.c (gdbpy_initialize_event): Return 'int'.
	Check errors.
	* python/py-event.h (GDBPY_NEW_EVENT_TYPE): Change generated
	init function to return 'int'.
	* python/py-evtregistry.c (gdbpy_initialize_eventregistry):
	Return 'int'.  Check errors.
	* python/py-evts.c (gdbpy_initialize_py_events): Return 'int'.
	Check errors.
	* python/py-finishbreakpoint.c (gdbpy_initialize_finishbreakpoints):
	Return 'int'.  Check errors.
	* python/py-frame.c (gdbpy_initialize_frames): Return 'int'.
	Check errors.
	* python/py-function.c (gdbpy_initialize_functions): Return 'int'.
	Check errors.
	* python/py-gdb-readline.c (gdbpy_initialize_gdb_readline):
	Check errors.
	* python/py-inferior.c (gdbpy_initialize_inferior): Return 'int'.
	Check errors.
	* python/py-infthread.c (gdbpy_initialize_thread): Return 'int'.
	Check errors.
	* python/py-lazy-string.c (gdbpy_initialize_lazy_string): Return 'int'.
	Check errors.
	* python/py-objfile.c (gdbpy_initialize_objfile): Return 'int'.
	Check errors.
	* python/py-param.c (gdbpy_initialize_parameters): Return 'int'.
	Check errors.
	* python/py-progspace.c (gdbpy_initialize_pspace): Return 'int'.
	Check errors.
	* python/py-symbol.c (gdbpy_initialize_symbols): Return 'int'.
	Check errors.
	* python/py-symtab.c (gdbpy_initialize_symtabs): Return 'int'.
	Check errors.
	* python/py-type.c (gdbpy_initialize_types): Return 'int'.
	Check errors.
	* python/py-value.c (gdbpy_initialize_values): Return 'int'.
	Check errors.
	* python/python-internal.h (gdbpy_initialize_auto_load,
	gdbpy_initialize_values, gdbpy_initialize_frames,
	gdbpy_initialize_symtabs, gdbpy_initialize_commands,
	gdbpy_initialize_symbols, gdbpy_initialize_symtabs,
	gdbpy_initialize_blocks, gdbpy_initialize_types,
	gdbpy_initialize_functions, gdbpy_initialize_pspace,
	gdbpy_initialize_objfile, gdbpy_initialize_breakpoints,
	gdbpy_initialize_finishbreakpoints,
	gdbpy_initialize_lazy_string, gdbpy_initialize_parameters,
	gdbpy_initialize_thread, gdbpy_initialize_inferior,
	gdbpy_initialize_eventregistry, gdbpy_initialize_event,
	gdbpy_initialize_py_events, gdbpy_initialize_stop_event,
	gdbpy_initialize_signal_event,
	gdbpy_initialize_breakpoint_event,
	gdbpy_initialize_continue_event,
	gdbpy_initialize_exited_event, gdbpy_initialize_thread_event,
	gdbpy_initialize_new_objfile_event, gdbpy_initialize_arch):
	Update.  Use CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION.
	* python/python.c (gdb_python_initialized): New global.
	(gdbpy_initialize_events): Return 'int'.  Check errors.
	(_initialize_python): Check errors.  Set
	gdb_python_initialized.
2013-05-20 20:28:52 +00:00
Tom Tromey 1886886089 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope):
Decref the reslut of PyObject_CallMethod.
2013-05-20 20:27:44 +00:00
Tom Tromey 9f4ff0c296 * python/py-event.c (gdbpy_initialize_event_generic): Return
early if PyType_Ready fails.
2013-05-20 20:26:39 +00:00
Tom Tromey 0d3a2e8a79 * python/py-type.c (make_fielditem): Add gdb_assert_not_reached
as 'default' in the switch.
2013-05-20 20:25:40 +00:00
Tom Tromey b86af38a5a * python/py-inferior.c (gdbpy_inferiors): Update. Hoist
get_addr_from_python calls out of TRY_CATCH.
	(infpy_write_memory, infpy_search_memory): Likewise.
	* python/py-utils.c (get_addr_from_python): Return negative
	value on error.  Use TRY_CATCH.
	* python/python-internal.h (get_addr_from_python): Use
	CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION.
2013-05-20 20:24:49 +00:00
Doug Evans e19d3afbf8 * gdb.base/maint.exp: Fix test for "mt expand-symtabs" to account for
-fdebug-types-section.
2013-05-20 20:23:20 +00:00
Tom Tromey c127ec5867 * python/py-event.c (evpy_emit_event): Decref the
result of PyObject_CallFunctionObjArgs.
2013-05-20 20:23:19 +00:00
Tom Tromey ba327838ba * python/py-cmd.c (cmdpy_completer): Use iterator protocol.
Correctly decref.
2013-05-20 20:21:55 +00:00
Tom Tromey d819143244 * python/py-cmd.c (cmdpy_init): Decref 'ds_obj'. 2013-05-20 20:20:48 +00:00
Tom Tromey 5d153bd188 * python/py-event.h (gdbpy_initialize_event_generic): Use
CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION.
	* python/py-evts.c (add_new_registry): Use
	CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION.
	* python/python-internal.h
	(CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION): New macro.
2013-05-20 20:19:54 +00:00
Tom Tromey 56cc411c4b * python/py-arch.c (archpy_disassemble): Update.
* python/py-type.c (typy_get_composite, typy_lookup_typename)
	(typy_lookup_type): Use GDB_PY_HANDLE_EXCEPTION.
	* python/py-utils.c (gdbpy_convert_exception): Return 'void'.
	* python/python-internal.h (CPYCHECKER_SETS_EXCEPTION): New
	macro.
	(GDB_PY_HANDLE_EXCEPTION): Update.
	(gdbpy_convert_exception): Update.  Use CPYCHECKER_SETS_EXCEPTION.
2013-05-20 20:19:03 +00:00
Tom Tromey 8919e1746d * python/python-internal.h (events_object_type): Remove. 2013-05-20 20:18:22 +00:00
Tom Tromey 9b08f22510 * python/py-event.h (evpy_emit_event): Use
CPYCHECKER_STEALS_REFERENCE_TO_ARG.
        * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
        New macro.
2013-05-20 20:16:57 +00:00
Tom Tromey f04010ffab * py-evtregistry.c (create_event_object): Decref
eventregistry_object if PyList_New fails.
2013-05-20 20:16:24 +00:00
Tom Tromey 3919fd966c * py-cmd.c (gdbpy_string_to_argv): Check result of
PyList_New.
2013-05-20 20:14:51 +00:00
Tom Tromey 0430e8cba9 * python/python.c (before_prompt_hook): Add cleanup to
decref 'hook'.
2013-05-20 20:13:28 +00:00
Tom Tromey 764123e402 * python/py-function.c (fnpy_init): Decref result of
PyObject_GetAttrString.
2013-05-20 20:12:04 +00:00
Tom Tromey 634c58be55 * python/py-threadevent.c (get_event_thread): Use
CPYCHECKER_RETURNS_BORROWED_REF.
	* python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
	New define.
	(pspace_to_pspace_object, objfile_to_objfile_object)
	(find_thread_object): Use it.
2013-05-20 20:10:03 +00:00
Tom Tromey 62eec1a534 * python/py-arch.c (arch_object_type): Use
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-block.c (block_syms_iterator_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-bpevent.c (breakpoint_event_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-cmd.c (cmdpy_object_type): Use
	CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-continueevent.c (continue_event_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-event.h (GDBPY_NEW_EVENT_TYPE):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-events.h (thread_event_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-evtregistry.c (eventregistry_object_type): Use
	CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-exitedevent.c (exited_event_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-finishbreakpoint.c (finish_breakpoint_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-function.c (fnpy_object_type): Use
	CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-inferior.c (inferior_object_type, membuf_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-infthread.c (thread_object_type): Use
	CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-lazy-string.c (lazy_string_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-newobjfileevent.c (new_objfile_event_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-objfile.c (objfile_object_type): Use
	CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-param.c (parmpy_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-progspace.c (pspace_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-signalevent.c (signal_event_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-symtab.c (symtab_object_type, sal_object_type): Use
	CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-type.c (type_object_type, field_object_type)
	(type_iterator_object_type): Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-internal.h (CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF): New
	define.
	(value_object_type, block_object_type, symbol_object_type)
	(event_object_type, stop_event_object_type, breakpoint_object_type)
	(frame_object_type): Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
2013-05-20 20:09:01 +00:00
Andreas Tobler 81ea8796fe 2013-05-20 Andreas Tobler <andreas@fgznet.ch>
* Makefile.in (ALL_TARGET_OBS): Add ppcfbsd-tdep.o.
        (ALLDEPFILES): Add ppcfbsd-nat.c and ppcfbsd-tdep.c.
2013-05-20 18:00:36 +00:00
Doug Evans a2ce51a0ef When reading CU, stay in DWO. Be more tolerent of bad debug info.
For Fission.
	* dwarf2read.c (struct dwarf2_per_cu_data): New member
	reading_dwo_directly.
	(struct signatured_type): New member dwo_unit.
	(struct die_reader_specs): New member comp_dir.
	(create_signatured_type_table_from_index): Use malloc for
	all_type_units instead of objfile's obstack.
	(create_all_type_units): Ditto.
	(fill_in_sig_entry_from_dwo_entry): New function.
	(add_type_unit): New function.
	(lookup_dwo_signatured_type): New function.
	(lookup_dwp_signatured_type): New function.
	(lookup_signatured_type): New arg cu.  All callers updated.
	(init_cu_die_reader): Initialize comp_dir.
	(read_cutu_die_from_dwo): New arg stub_comp_dir.  All callers updated.
	Change assert of matching type signatures to call error on mismatch.
	(lookup_dwo_unit): Add assert.
	(init_tu_and_read_dwo_dies): New function.
	(init_cutu_and_read_dies): Call it.
	(build_type_unit_groups): Handle case of no type unit groups created.
	(hash_dwo_file, eq_dwo_file): Handle missing comp_dir.
	(lookup_dwo_cutu): Tweak complaint.
	(dwarf2_free_abbrev_table): Check for NULL abbrev_table.
	(dwarf2_per_objfile_free): Free all_type_units.
2013-05-20 17:24:21 +00:00
Joel Brobecker a25cd31f61 Add missing empty line after var declarations in handle_unload_dll
gdb/ChangeLog:

        * windows-nat.c (handle_unload_dll): Add missing empty line.
2013-05-20 10:27:26 +00:00
Joel Brobecker 4d804846db [dwarf] Mark all functions as prototyped except C functions.
This makes sure that the types of the arguments are taken into account
when performing an inferior function call to a non-C (or C-like)
function.  In particular, this makes sure that the arguments are
appropriatly converted to the correct type.

For instance, on x86_64-linux, with the following Ada code:

   procedure Set_Float (F : Float) is
   begin
      Global_Float := F;
   end Set_Float;

The following sequence shows that Float arguments are incorrectly
passed (Ada's Float type is the equivalent of type "float" in C):

    (gdb) call set_float (2.0)
    (gdb) print global_float
    $1 = 0.0

Putting a breakpoint inside set_float to inspect the value of
register xmm0 gives the first hint of the problem:

    (gdb) p $xmm0
    $2 = (v4_float => (0 => 0.0, 2.0, 0.0, 0.0),
          v2_double => (0 => 2.0, 0.0),
    [...]

It shows that the argument was passed as a double.

The code responsible for doing appropriate type conversions
for the arguments (value_arg_coerce) found that our function
was not prototyped, and thus could not use typing information
for the arguments. Instead, it defaulted to the value of "set
coerce-float-to-double", which by default is true, to determine
the argument type.

This patch fixes the problem by setting the PROTOTYPE flag
for all functions of any language except C and Objective C.

gdb/ChangeLog:

        * dwarf2read.c (prototyped_function_p): New function.
        (read_subroutine_type): Use it.

gdb/testsuite/ChangeLog:

        * gdb.ada/float_param: New testcase.
2013-05-20 09:45:13 +00:00
Joel Brobecker 1c432e72b0 De-indent example code in rs6000-aix-tdep.c (ARI fix)
This patch de-indents the code provided as a comment explaining
how the code declaring the ld_info32_desc and ld_info64_desc globals
was generated. The intent is to avoid an ARI warning about a macro
not starting at column zero of the line.

gdb/ChangeLog:

        * rs6000-aix-tdep.c: De-indent some example code provided
        as a comment.
2013-05-20 09:14:24 +00:00
gdbadmin fdc2322aef *** empty log message *** 2013-05-20 00:00:02 +00:00
gdbadmin 2f2fb5e626 *** empty log message *** 2013-05-19 00:00:33 +00:00
gdbadmin 3e68617657 *** empty log message *** 2013-05-18 00:00:02 +00:00
Edjunior Barbosa Machado 4feebbddff 2013-05-17 Edjunior Machado <emachado@linux.vnet.ibm.com>
* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Check if the
	region is ok for a hardware watchpoint using the new ptrace interface
	on Power servers.
2013-05-17 23:05:00 +00:00
Doug Evans 7d0c9981dc * NEWS: Mention new maintenance commands check-symtabs, and
expand-symtabs, and renamed check-psymtabs.
	* psymtab.c (maintenance_check_psymtabs): Renamed from
	maintenance_check_symtabs.  Only process already-expanded symbol
	tables.
	(_initialize_psymtab): Update.
	* symmisc.c (maintenance_check_symtabs): New function.
	(maintenance_expand_name_matcher): New function
	(maintenance_expand_file_matcher): New function
	(maintenance_expand_symtabs): New function.
	(_initialize_symmisc): Add "mt check-symtabs" and "mt expand-symtabs"
	commands.

	doc/
	* gdb.texinfo (Maintenance Commands): Update doc for
	"maint check-psymtabs".  Add doc for "maint check-symtabs",
	"maint expand-symtabs".

	testsuite/
	* gdb.base/maint.exp: Update test for "maint check-psymtabs".
	Add tests for "maint check-symtabs", "maint expand-symtabs".
2013-05-17 18:09:06 +00:00
Doug Evans 8d324e8329 * gdb.base/maint.exp: Remove testing of individual maint command
help output.
2013-05-17 18:05:19 +00:00
Tom Tromey 6cbc7c3d34 * python/py-inferior.c (infpy_read_memory): Don't call
PyErr_SetString if PyObject_New fails.
	* python/py-frame.c (frame_info_to_frame_object): Don't call
	PyErr_SetString if PyObject_New fails.
2013-05-17 16:52:34 +00:00
H.J. Lu a48b32c068 Replace hardcoded -ldl with check for availability
2013-05-17  Pavel Chupin  <pavel.v.chupin@intel.com>

	* acinclude.m4: Add check for dlopen in libdl.
	* configure.ac: Ditto.
	* configure: Regenerate.
2013-05-17 16:24:21 +00:00
Phil Muldoon 3de661e642 2013-05-17 Phil Muldoon <pmuldoon@redhat.com>
* frame.c (frame_stash): Convert to htab.
	(frame_addr_hash): New function.
	(frame_addr_hash_eq): New function.
	(frame_stash_create): Convert function to create
	a hash table.
	(frame_stash_add): Convert function to add an entry to a hash
	table.
	(frame_stash_find): Convert function to search the hash table.
	(frame_stash_invalidate): Convert function to empty the hash
	table.
	(get_frame_id): Only add to stash if a frame_id is created.
	(_initialize_frame): Call frame_stash_create.
2013-05-17 08:34:18 +00:00
Thomas Schwinge bb4168a9a7 Mark the following commit as tiny change:
gdb/
2013-05-16  Yue Lu  <hacklu.newborn@gmail.com>

	* configure.ac: Ensure MIG is available when building for GNU Hurd
	hosts.
	* configure: Regenerate.
2013-05-17 06:58:33 +00:00
Joel Brobecker 58794e1a64 [gdbserver/lynx178]: Fix null_ptid -vs- minus_one_ptid confusion in comment
gdb/gdbserver/ChangeLog:

        * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
        confusion in comment.
2013-05-17 06:53:53 +00:00
Joel Brobecker d631c5a779 gdbserver/lynx178: spurious SIG61 signal when resuming inferior.
On ppc-lynx178, resuming the execution of a program after hitting
a breakpoint sometimes triggers a spurious SIG61 event:

    (gdb) cont
    Continuing.

    Program received signal SIG61, Real-time event 61.
    [Switching to Thread 39]
    0x10002324 in a_test.task1 (<_task>=0x3ffff774) at a_test.adb:30
    30          select  -- Task 1

From this point on, continuing again lets the signal kill the program.
Using "signal 0" or configuring GDB to discard the signal does not
help either, as the program immediately reports the same signal again.

What happens is the following:

  - GDB sends a single-step order to gdbserver: $vCont;s:31
    This tells GDBserver to do a step using thread 0x31=49.
    GDBserver does the step, and thread 49 receives the SIGTRAP
    indicating that the step has finished.

  - GDB then sends a "continue", but this time does not specify
    which thread to continue: $vCont;c
    GDBserver uses an arbitrary thread's ptid to resume the program's
    execution (the current_inferior's ptid was chosen for that).
    See lynx-low.c:lynx_resume:

        if (ptid_equal (ptid, minus_one_ptid))
          ptid = thread_to_gdb_id (current_inferior);

So far on all LynxOS platforms, this has been good enough. But
not so on LynxOS 178. If the ptid used to resume the execution
is not the same as the thread that did the step, we get the weird
signal.

This patch fixes the problem by saving the ptid of the thread
that last caused an event, received during a call to waitpid.
The ptid is saved in per-process private data.

gdb/gdbserver/ChangeLog:

        * lynx-low.c (struct process_info_private): New type.
        (lynx_add_process): New function.
        (lynx_create_inferior, lynx_attach): Replace calls to
        add_process by calls to lynx_add_process.
        (lynx_resume): If PTID is null, then try using
        current_process()->private->last_wait_event_ptid.
        Add comments.
        (lynx_clear_inferiors): Delete.  The contents of that function
        has been inlined in lynx_mourn;
        (lynx_wait_1): Save the ptid in the process's private data.
        (lynx_mourn): Free the process' private data.  Replace call
        to lynx_clear_inferiors by call to clear_inferiors.
2013-05-17 06:47:44 +00:00
Yao Qi 96f7a20fe9 gdb/gdbserver
* i386-low.c (i386_length_and_rw_bits): Move the comment to
	the right place.
2013-05-17 02:22:52 +00:00
gdbadmin 4bebc771c7 *** empty log message *** 2013-05-17 00:00:32 +00:00
Thomas Schwinge 036c3acbab gdb/
2013-05-16  Yue Lu  <hacklu.newborn@gmail.com>

	* configure.ac: Ensure MIG is available when building for GNU Hurd
	hosts.
	* configure: Regenerate.
2013-05-16 21:54:34 +00:00
Luis Machado db0dfaa0e6 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
	(linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
	PT_TEXT_END_ADDR guards.  Update comments.
	(linux_target_op) <read_offsets>: Conditionally define to
	linux_read_offsets if the target is UCLIBC and if it defines
	PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2013-05-16 10:31:49 +00:00
Pedro Alves 177aadc492 gdb.ada/complete.exp: Fix FIXME.
2013-05-16  Pedro Alves  <palves@redhat.com>

	* gdb.ada/complete.exp (test_gdb_no_completion): Fix typo in
	comment.  Use gdb_test_no_output.
2013-05-16 10:13:33 +00:00
Joel Brobecker d1be32476e [dwarf]: Add DW_LANG_UPC support in set_cu_language.
gdb/ChangeLog:

        * dwarf2read.c (set_cu_language): Add DW_LANG_UPC handling.
2013-05-16 07:39:43 +00:00
Joel Brobecker b8fea896fe Missing do_cleanups in ada_make_symbol_completion_list.
This results in an internal-warning when trying the completion
when in Ada mode:

    (gdb) b simple<TAB>
    /[...]/cleanups.c:265: internal-warning: restore_my_cleanups has found a stale cleanup
    A problem internal to GDB has been detected,
    further debugging may prove unreliable.
    Quit this debugging session? (y or n)

gdb/ChangeLog:

        * ada-lang.c (ada_make_symbol_completion_list): Make sure
        all cleanups are done before returning from this function.

gdb/testsuite/ChangeLog:

        * gdb.ada/complete.exp: Add test verifying completion using
        the "tab" key.
2013-05-16 07:02:43 +00:00
gdbadmin 38d80a64fb *** empty log message *** 2013-05-16 00:00:02 +00:00
Keith Seitz bba5b66718 * gdb.base/filesym.exp: New completer test.
* gdb.base/filesym.c: New file.
2013-05-15 21:21:05 +00:00
Pedro Alves ed0f00b834 Remove my name from a couple tests.
Tested on x86_64 Fedora 17.

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

	* gdb.base/fixsection.c: Remove attribution.
	* gdb.base/watch-read.exp: Ditto.
2013-05-15 17:33:04 +00:00
Joel Brobecker af880d85b8 Remove forward enum declaration in utils.h.
These forward declarations are a GNU extension, and they trigger
a build warning when the compiler does not support it.

gdb/ChangeLog:

        * utils.h: #include "exceptions.h".
        (enum errors): Remove partial declaration.
2013-05-15 12:49:05 +00:00
Joel Brobecker 356a523362 ppc-aix core file relocation.
The current code attempts to provide relocation support when debugging
core files via the rs6000_xfer_partial method of the rs6000-nat
target_ops vector. However, this target_ops vector does not get pushed
on the target stack at all when debugging core files, thus bypassing
completely that part of the code.

This patch fixes the problem by extending corelow's core_xfer_partial
into handling the TARGET_OBJECT_LIBRARIES_AIX object.

gdb/ChangeLog:

	* gdbarch.sh (core_xfer_shared_libraries_aix): New method.
	* gdbarch.h, gdbarch.c: Regenerate.
	* corelow.c (core_xfer_partial): Add TARGET_OBJECT_LIBRARIES_AIX
	handling.

	* rs6000-aix-tdep.h: New file.
	* Makefile.in (HFILES_NO_SRCDIR): Add rs6000-aix-tdep.h.
	* rs6000-aix-tdep.c: Include "rs6000-aix-tdep.h" and
	"xml-utils.h".
	(struct field_info, struct ld_info_desc): New types.
	(ld_info32_desc, ld_info64_desc): New static constants.
	(struct ld_info): New type.
	(rs6000_aix_extract_ld_info): New function.
	(rs6000_aix_shared_library_to_xml): Likewise.
	(rs6000_aix_ld_info_to_xml): Likewise.
	(rs6000_aix_core_xfer_shared_libraries_aix): Likewise.
	(rs6000_aix_init_osabi): Add call to
	set_gdbarch_core_xfer_shared_libraries_aix.
	* rs6000-nat.c: Add "rs6000-aix-tdep.h" include.
	Remove "xml-utils.h" include.
	(LdInfo): Delete typedef.
	(ARCH64_DECL, LDI_FIELD, LDI_NEXT, LDI_FD, LDI_FILENAME):
	Delete macros.
	(rs6000_ptrace_ldinfo): Change return type to gdb_byte *.
	Adjust code accordingly.
	(rs6000_core_ldinfo): Delete, folded into
	rs6000_aix_core_xfer_shared_libraries_aix.
	(rs6000_xfer_shared_library): Delete.
	(rs6000_xfer_shared_libraries): Reimplement.
2013-05-15 12:26:14 +00:00
Markus Metzger 742ce053c1 The "record goto" command scans its arguments for "begin", "start", or "end".
Turn those into sub-commands.

Document the "record goto" command.
2013-05-15 07:04:12 +00:00
gdbadmin fba526b6fb *** empty log message *** 2013-05-15 00:00:32 +00:00
Jan Kratochvil e93ba63057 gdb/
* linespec.c (convert_linespec_to_sals): New comment for
	SOURCE_FILENAME assignment.
2013-05-14 20:41:45 +00:00
Jan Kratochvil 5821aace70 gdb/
* cleanups.c (restore_my_cleanups): Replace gdb_assert by
	internal_warning.
2013-05-14 20:39:12 +00:00
Tom Tromey a1b8c4cc7e * eval.c (parse_and_eval_long): Make 'exp' const.
* value.h (parse_and_eval_long): Update.
2013-05-14 20:37:57 +00:00
Tom Tromey 23b3a2c3d1 * ui-file.c (gdb_fopen): Make arguments const.
* ui-file.h (gdb_fopen): Make arguments const.
2013-05-14 20:35:24 +00:00
Tom Tromey ca623f82a4 * remote.c (remote_set_trace_notes): Make arguments const.
* target.c (update_current_target): Update cast.
	* target.h (to_set_trace_notes): Make arguments const.
2013-05-14 20:33:36 +00:00
Tom Tromey 503ebb2c1d * go32-nat.c (go32_terminal_info): Make 'args' const.
* inferior.h (child_terminal_info): Update.
	* inflow.c (child_terminal_info): Make 'args' const.
	* target.c (default_terminal_info): Make 'args' const.
	(debug_to_terminal_save_ours): Likewise.
	* target.h (struct target_ops) <to_terminal_info>: Make argument
	const.
2013-05-14 20:32:15 +00:00
Tom Tromey 85e1311a3c * gcore.c (create_gcore_bfd): Make 'filename' const.
* gcore.h (create_gcore_bfd): Make 'filename' const.
	* record-full.c (record_full_save): Make 'recfilename' const.
	* target.c (target_save_record): Make 'filename' const.
	* target.h (struct target_ops) <to_save_record>: Make 'filename'
	const.
	(target_save_record): Likewise.
2013-05-14 20:30:48 +00:00
gdbadmin ce355ebab0 *** empty log message *** 2013-05-14 00:00:02 +00:00
Tom Tromey 55fb6d274d * gdb.dwarf2/implptrconst.exp: Create a CU with 4 byte address
size and change type sizes to 4 bytes.
2013-05-13 19:32:17 +00:00
Tom Tromey 92ce080be6 fix PR number in ChangeLog 2013-05-13 16:57:20 +00:00
Tom Tromey d62bfeaff5 PR gdb/15538:
* dwarf2read.c (dwarf2_record_block_ranges): Ensure that the
	ranges section has been read.
2013-05-13 16:56:09 +00:00
Tom Tromey ac1ca910d7 PR exp/15364:
* eval.c (evaluate_subexp_standard) <STRUCTOP_STRUCT,
	STRUCTOP_PTR>: Return a not_lval value for
	EVAL_AVOID_SIDE_EFFECTS.
	* opencl-lang.c (evaluate_subexp_opencl): Return a not_lval value
	for EVAL_AVOID_SIDE_EFFECTS.
gdb/testsuite
	* gdb.base/exprs.exp (test_expr): Add regression test.
	* gdb.base/exprs.c (null_t_struct): New global.
2013-05-13 16:51:52 +00:00
Joel Brobecker 36d1c68c70 Float parameter passing in funcall on ppc-aix & ppc-lynx178.
Given the following code:

    float global_float = 0.0;

    void
    set_float (float f)
    {
      global_float = f;
    }

GDB incorrectly calls set_float if the set_float function is marked
as prototyped:

    (gdb) call set_float (5.0)
    (gdb) print global_float
    $1 = 2048

What happens, when the function is marked as prototyped, is that
GDB finds that the argument is a float, casts the value given in
the expression to a float, and then gives that float to ppc-aix/
ppc-lynx178's push_dummy_call gdbarch routine. The latter then blindly
copies it as is in the first floating-point register, instead of
making sure that it has the proper format first.

gdb/ChangeLog:

        * rs6000-aix-tdep.c (rs6000_push_dummy_call): Convert
        floating point registers to register type before storing
        value.
        * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call):
        Likewise.
2013-05-13 10:27:35 +00:00
Muhammad Bilal 8414efeff8 * History saving should stay disabled for test cases *
I saw some test cases in gdb.base/default.exp and gdb.base/setshow.exp
are enabling the history saving.
Hence .gdb_history file is modified with history information even
though, by default, we have History saving disabled.
So we should modify GDB test cases so that history saving should stay
off for all test cases.



ChangeLog:

2013-05-13  Muhammad Bilal  <mbilal@codesourcery.com>

       * gdb.base/default.exp: Disable history saving.
       * gdb.base/setshow.exp: Likewise.
2013-05-13 08:49:23 +00:00
gdbadmin 8444d6e5fb *** empty log message *** 2013-05-13 00:00:32 +00:00
gdbadmin 8e0fcbead6 *** empty log message *** 2013-05-12 00:00:03 +00:00
gdbadmin f653ca4a15 *** empty log message *** 2013-05-11 00:00:02 +00:00
Tom Tromey 21ff46861c 2013-05-10 Joel Brobecker <brobecker@adacore.com>
Tom Tromey  <tromey@redhat.com>

	* common/filestuff.c (mark_fd_no_cloexec, unmark_fd_no_cloexec):
	New functions.
	* common/filestuff.c (mark_fd_no_cloexec, unmark_fd_no_cloexec):
	Declare.
	* darwin-nat.c (darwin_pre_ptrace): Use mark_fd_no_cloexec.
	(darwin_ptrace_him): Use unmark_fd_no_cloexec.
	* inf-ttrace.c (do_cleanup_pfds): Use unmark_fd_no_cloexec.
	(inf_ttrace_prepare): Use mark_fd_no_cloexec.
2013-05-10 17:01:00 +00:00
Tom Tromey d3685d60d6 gdb
Freddie Chopin  <freddie_chopin@op.pl>
	PR build/15414:
	* configure: Rebuild.
	* configure.ac (build_warnings): Do not use -Wformat-nonliteral
	with -Wno-format.
sim/common
	* acinclude.m4 (SIM_AC_OPTION_WARNINGS): Do not use
	-Wformat-nonliteral with -Wno-format.
sim/bfin
	* configure: Rebuild.
sim/cr16
	* configure: Rebuild.
sim/cris
	* configure: Rebuild.
sim/d10v
	* configure: Rebuild.
sim/igen
	* configure: Rebuild.
sim/m68hc11
	* configure: Rebuild.
sim/mips
	* configure: Rebuild.
sim/mn10300
	* configure: Rebuild.
sim/v850
	* configure: Rebuild.
2013-05-10 16:10:40 +00:00
Pedro Alves eb9fe518e9 Fix typo in "show remote traceframe-info-packet"
I noticed:

  (gdb) show remote traceframe-info-packet
  Support for the `qXfer:trace-frame-info:read' packet is auto-detected, currently unknown.
                         ^^^^^^^^^^^

The packet is actually qXfer:traceframe-info:read.

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

	* remote.c (_initialize_remote): Fix spelling of
	qXfer:traceframe-info:read packet in packet config command.
2013-05-10 14:31:05 +00:00
Pedro Alves 9779ab84ac PR remote/15455 - QTro remote packet broken
In the function remote_trace_set_readonly_regions in gdb/remote.c, the
local variable 'offset' does not account for "QTro" at the start of
the packet with the result that if there are any read-only regions,
the packet is sent -- but without the "QTro" -- causing the remote
stub to report that the packet is unsupported:

  Sending packet: $:0000000000400200,(...),00000000004560a4#ab...Packet received:

vs the expected:

  Sending packet: $QTro:0000000000400200,(...),00000000004560a4#31...Packet received: OK

We don't see the problem when testing with GDBserver, as that supports
qXfer:trace-frame-info:read, meaning GDBserver never needs to read
from the read-only sections directly itself.  This commit adds a test
that explicitly disables qXfer:trace-frame-info:read.

gdb/
2013-05-10  David Taylor  <dtaylor@emc.com>

	PR remote/15455

	* remote.c (remote_trace_set_readonly_regions): Do not overwrite
	"QTro" at start of packet.

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

	PR remote/15455

	* gdb.trace/qtro.c: New file.
	* gdb.trace/qtro.exp: New file.
2013-05-10 13:59:45 +00:00
Joel Brobecker ab1c4e8861 Remove FIXME in solib-aix.c:solib_aix_relocate_section_addresses
This issue should now be fixed thanks to a change in bfd removing
the SEC_ALLOC flag from all sections that do not get mapped to
memory.

gdb/ChangeLog:

        * solib-aix.c (solib_aix_relocate_section_addresses):
        Remove FIXME comment.
2013-05-10 13:25:28 +00:00
Joel Brobecker 060cfbef39 AIX: wrong address for shared object's .bss section
gdb/ChangeLog:

        * solib-aix.c (solib_aix_relocate_section_addresses):
        For the .bss section action, apply the same offset as
        the .data section.
2013-05-10 12:55:13 +00:00
Joel Brobecker c1357578b3 move sparc-sol-thread.c back into sol-thread.c.
The routines in sparc-sol-thread used to be SPARC-specific (and
documented as such in the ptrace man page), and therefore hosting them
in a sparc-specific file made sense.  However, newer versions of
Solaris now use those callbacks (Solaris 10 Update 10, apparently),
and thus the note about these callbacks being specific to SPARC
was removed.

So this patch deletes sparc-sol-thread.c and moves the code back
inside sol-thread.c.

gdb/ChangeLog:

        PR tdep/15420:
        * sol-thread.c (ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs):
        New functions, directly copied from sparc-sol-thread.c.
        * sparc-sol-thread.c: Delete.
        * configure.ac: Remove code handling sparc-solaris-thread.c.
        * configure: Regenerate.
2013-05-10 12:10:20 +00:00
Phil Muldoon 1e611234ee 2013-05-10 Phil Muldoon <pmuldoon@redhat.com>
* stack.c (backtrace_command_1): Add "no-filters", and Python frame
	filter logic.
	(backtrace_command): Add "no-filters" option parsing.
	(_initialize_stack): Alter help to reflect "no-filters" option.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-framefilter.o
	(SUBDIR_PYTHON_SRCS): Add py-framefilter.c
	(py-frame.o): Add target
	* data-directory/Makefile.in (PYTHON_DIR): Add Python frame
	filter files.
	* python/python.h: Add new frame filter constants, and flag enum.
	(apply_frame_filter): Add definition.
	* python/python.c (apply_frame_filter): New non-Python
	enabled function.
	* python/py-utils.c (py_xdecref): New function.
	(make_cleanup_py_xdecref): Ditto.
	* python/py-objfile.c: Declare frame_filters dictionary.
	(objfpy_dealloc): Add frame_filters dealloc.
	(objfpy_new): Initialize frame_filters attribute.
	(objfile_to_objfile_object): Ditto.
	(objfpy_get_frame_filters): New function.
	(objfpy_set_frame_filters): New function.
	* python/py-progspace.c: Declare frame_filters dictionary.
	(pspy_dealloc): Add frame_filters dealloc.
	(pspy_new): Initialize frame_filters attribute.
	(pspacee_to_pspace_object): Ditto.
	(pspy_get_frame_filters): New function.
	(pspy_set_frame_filters): New function.
	* python/py-framefilter.c: New file.
	* python/lib/gdb/command/frame_filters.py: New file.
	* python/lib/gdb/frames.py: New file.
	* python/lib/gdb/__init__.py: Initialize global frame_filters
	dictionary
	* python/lib/gdb/FrameDecorator.py: New file.
	* python/lib/gdb/FrameIterator.py: New file.
	* mi/mi-cmds.c (mi_cmds): Add frame filters command.
	* mi/mi-cmds.h: Declare.
	* mi/mi-cmd-stack.c (mi_cmd_stack_list_frames): Add
	--no-frame-filter logic, and Python frame filter logic.
	(stack_enable_frame_filters): New function.
	(parse_no_frame_option): Ditto.
	(mi_cmd_stack_list_frames): Add --no-frame-filter and Python frame
	filter logic.
	(mi_cmd_stack_list_locals): Ditto.
	(mi_cmd_stack_list_args): Ditto.
	(mi_cmd_stack_list_variables): Ditto.
	* NEWS: Add frame filter note.

2013-05-10  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-framefilter.py: New File.
	* gdb.python/py-framefilter-mi.exp: Ditto.
	* gdb.python/py-framefilter.c: Ditto.
	* gdb.python/py-framefilter-mi.exp: Ditto.
	* gdb.python/py-framefilter-mi.c: Ditto,
	* gdb.python/py-framefilter-gdb.py.in: Ditto.

2013-05-10 Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Backtrace): Add "no-filter" argument.
	(Python API): Add Frame	Filters API, Frame Wrapper API,
	Writing a Frame Filter/Wrapper,	Managing Management of Frame
	Filters chapter entries.
	(Frame Filters API): New Node.
	(Frame Wrapper API): New Node.
	(Writing a Frame Filter): New Node.
	(Managing Frame Filters): New Node.
	(Progspaces In Python): Add note about frame_filters attribute.
	(Objfiles in Python): Ditto.
	(GDB/MI Stack Manipulation): Add -enable-frame-filters command,
	@anchors and --no-frame-filters option to -stack-list-variables,
	-stack-list-frames, -stack-list-locals and -stack-list-arguments
	commands.
2013-05-10 10:26:03 +00:00
gdbadmin 47f79097c0 *** empty log message *** 2013-05-10 00:00:02 +00:00
Doug Evans 6bf667bb73 * symfile.c (syms_from_objfile_1): Delete args offsets, num_offsets.
All callers updated.
	(syms_from_objfile): Ditto.  Make static.
	(symbol_file_add_with_addrs): Renamed from
	symbol_file_add_with_addrs_or_offsets.  Delete args offsets,
	num_offsets.  All callers updated.
	* symfile.h (syms_from_objfile): Delete.
2013-05-09 18:03:28 +00:00
Doug Evans 2cb9c8590a * symfile.c (decrement_reading_symtab): Add assert.
(increment_reading_symtab): Ditto.
2013-05-09 17:24:55 +00:00
Joel Brobecker 40aea47721 source.c: Use fgetc instead of getc.
On AIX, getc is a macro which triggers an -Wunused-value warning.

gdb/ChangeLog:

        * source.c (forward_search_command): Replace call to getc
        by call to fgetc.
        (reverse_search_command): Likewise.
2013-05-09 06:52:21 +00:00
gdbadmin 8f979b3d59 *** empty log message *** 2013-05-09 00:00:32 +00:00
Doug Evans 680d1742c4 * psymtab.c (expand_symtabs_matching_via_partial): Fix file name
matching test.
2013-05-08 22:38:19 +00:00
Tom Tromey 5e4c3ac43b * gdb.base/solib-search.exp: Set test name for "set
solib-search-path" test.
2013-05-08 18:56:02 +00:00
Hafiz Abid Qadeer 993654a97a 2013-05-08 Hafiz Abid Qadeer <abidh@codesourcery.com>
* gdb.trace/circ.exp: Remove unnecessary 'if then' checks.
	(set_a_tracepoint): Set tracepoint before prologue.
	(run_trace_experiment): Test setup_tracepoints and 'break end'
	in it.
	(trace_buffer_normal): Remove.
	(gdb_trace_circular_tests): Remove.  Move tests to...
	(top level): ...here.  Call 'runto_main' before checking for
	trace support.  Use commands to check the support for circular
	trace buffer and changing of trace buffer size.  Add test
	to calculate size of single frame.  Use this size to
	calculate the size of trace buffer.  Use 'tfind pc func9'
	instead of 'tfind 9'.  Use 'with_test_prefix'.
2013-05-08 16:15:02 +00:00
Joel Brobecker 17e760ae36 Avoid duplicating text in sol-thread.c:info_cb
This is a minor cleanup that helps avoiding duplicating the output
of a command when handling alternative situations.

gdb/ChangeLog:

        * sol-thread.c (info_cb): Factorize the code a little.
2013-05-08 06:25:21 +00:00
Joel Brobecker c0f5f49044 Improve output of "maintenance info sol-threads" command.
This patch does the following:
  - Puts the startfunc and "Sleep func" info on the same line;
  - Renames "Sleep func" into "sleepfunc" to be consistent with
    "startfunc"
  - Avoids the use of a '-' as a separate before the "sleepfunc"
    output, because the '-' looks odd and out of place when the
    "startfunc" field is not printed (ti.ti_startfunc is nul).
  - Use a '=' instead of ':' and avoids the space between
    the name of the value and its value, mostly to help group
    the value with its name.

For the record, this is how the new outout now looks like:

    (gdb) maintenance info sol-threads
    user   thread #1, lwp 1, (active)
    system thread #2, lwp 2, (active)
    system thread #3, lwp 0, (asleep)    sleepfunc=0xff32d9e0
    user   thread #4, lwp 4, (asleep)    startfunc=[...].task_wrapper   sleepfunc=0xff3290f0
    system thread #5, lwp 7, (active)    startfunc=_co_timerset
    user   thread #6, lwp 8, (active)    startfunc=[...].task_wrapper

gdb/ChangeLog:

        * sol-thread.c (info_cb): Rework the output of the "maintenance
        info sol-threads" command a bit.
2013-05-08 06:23:50 +00:00
Joel Brobecker 5d74e06193 ti.ti_pc vs ti.ti_startfunc copy-pasto in sol-thread.c:info_cb
gdb/ChangeLog:

        * sol-thread.c (info_cb) [ti.ti_state == TD_THR_SLEEP]:
        Replace ti.ti_startfunc by ti.ti_pc.

Probably OK to commit without approval, so will likely do so in the
next few days.
2013-05-08 06:19:32 +00:00
Joel Brobecker 814a3ff71b Dummy implementation of solib_aix_free_library_list if libexpat missing.
gdb/ChangeLog:

        * solib-aix.c (solib_aix_free_library_list): New function
        for the case where HAVE_LIBEXPAT is not defined.
2013-05-08 06:10:03 +00:00
Joel Brobecker 2874cb8393 [doco] Document the XML format used for AIX shared lib support.
gdb/doc/ChangeLog:

        * gdbint.texinfo (Native Debugging): Add "AIX Shared Library
        Support" subsection documenting the XML format used to transfer
        shared library info on AIX.
2013-05-08 05:50:47 +00:00
Joel Brobecker 9a005eb9f9 Document set/show debug aix-solib.
gdb/doc/ChangeLog:

        * gdb.texinfo (Debugging Output): Add documentation of
        "set debug aix-solib" and "show debug aix-solib" commands.
2013-05-08 05:40:44 +00:00
gdbadmin ff954c7a69 *** empty log message *** 2013-05-08 00:00:02 +00:00
Tom Tromey c95aea6b79 * lib/selftest-support.exp: New file.
* gdb.gdb/complaints.exp: Load selftest-support.exp.  Use
	do_self_tests.
	(setup_test, find_gdb): Remove.
	* gdb.gdb/observer.exp: Load selftest-support.exp.  Use
	do_self_tests.
	(setup_test, find_gdb): Remove.
	(test_observer): Don't call setup_test.  Remove argument.
	* gdb.gdb/selftest.exp: Load selftest-support.exp.
	(find_gdb): Remove.
	* gdb.gdb/complaints.exp: Load selftest-support.exp.  Use
	do_self_tests.
	(setup_test, find_gdb): Remove.
	(test_with_self): Don't call setup_test.  Remove argument.
2013-05-07 18:06:16 +00:00
Pedro Alves 1f031429fc Merge gdb.arch/system-gcore.exp into gdb.base/gcore.exp
The test case gdb.arch/system-gcore.exp is almost an identical copy of
gdb.base/gcore.exp.  The only functional change is the additional
comparison of the "info reg system" command output.

It should be safe to perform this comparison on all architectures.
Thus the patch removes the arch-specific version and adds "info reg
system" to the common gcore test case instead.

Tested on i686-linux and s390x-linux.

gdb/testsuite/Changelog:
2013-05-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>

	* gdb.arch/system-gcore.exp: Remove.
	* gdb.arch/gcore.c: Remove.
	* gdb.base/gcore.exp: Add "info reg system".
2013-05-07 17:51:42 +00:00
Sergio Durigan Junior 58ce7251e8 gdb/
2013-05-07  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR breakpoints/15413:
	* breakpoint.c (condition_completer): Simplify the code to
	disconsider multiple locations of breakpoints when completing the
	"condition" command.

gdb/testsuite/
2013-05-07  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR breakpoints/15413:
	* gdb.base/pending.exp: Add test for completion of the "condition"
	command for pending breakpoints.
	* gdb.linespec/linespec.ex: Add test for completion of the
	"condition" command when dealing with multiple locations.
2013-05-07 17:04:29 +00:00
Pierre Muller be8b1ea676 * common/linux-btrace.c: ARI fix: Include "gdb_wait.h"
instead of <sys/wait.h>.
2013-05-07 13:04:58 +00:00
Pierre Muller 1e52bda604 * nios2-tdep.c (nios2_dwarf_reg_to_regnum): ARI fix: remove
trailing new line from warning message.
2013-05-07 13:02:19 +00:00
Pierre Muller 27fd0c6b3f * contrib/ari/gdb_ari.sh (SOLIB_ADD, SOLIB_CREATE_INFERIOR_HOOK)
(PC_SOLIB): Change type from ari_deprecate to ari_regression.
2013-05-07 13:00:07 +00:00
Joel Brobecker e228ac8788 Add missing ChangeLog entries...
... for the following commits:

2013-05-07  Joel Brobecker  <brobecker@adacore.com>

       * rs6000-nat.c (rs6000_core_ldinfo): Remove '\n' at end of
       error message (ARI fix).

2013-05-07  Joel Brobecker  <brobecker@adacore.com>

       * features/library-list-aix.dtd: Replace library-list by
       library-list-aix.
       * rs6000-nat.c: Replace library-list by library-list-aix
       throughout.
       * solib-aix.c: Likewise.

2013-05-07  Joel Brobecker  <brobecker@adacore.com>

       * target.h (enum target_object) [TARGET_OBJECT_LIBRARIES_AIX]:
       Renames TARGET_OBJECT_AIX_LIBRARIES.
       * rs6000-nat.c: Replace TARGET_OBJECT_AIX_LIBRARIES with
       TARGET_OBJECT_LIBRARIES_AIX throughout.
       * solib-aix.c: Likwise.

There were added, but accidently not checked in.
2013-05-07 12:40:08 +00:00
Joel Brobecker 2f565103af rs6000-nat.c:rs6000_core_ldinfo: Remove \n at end of error message.
gdb/ChangeLog:

        * rs6000-nat.c (rs6000_core_ldinfo): Remove '\n' at end of
        error message (ARI fix).
2013-05-07 12:36:13 +00:00
Joel Brobecker 8c56e11254 AIX: Change XML to use library-list-aix instead of library-list.
This is more consistent with what we do with other similar XML lists,
and avoids a potential confusion with the library-list XML list.

gdb/ChangeLog:

        * features/library-list-aix.dtd: Replace library-list by
        library-list-aix.
        * rs6000-nat.c: Replace library-list by library-list-aix
        throughout.
        * solib-aix.c: Likewise.
2013-05-07 09:50:49 +00:00
Joel Brobecker ff99b71b22 Rename TARGET_OBJECT_AIX_LIBRARIES to TARGET_OBJECT_LIBRARIES_AIX
More consistent with the name of other similar object names.

gdb/ChangeLog:

	* target.h (enum target_object) [TARGET_OBJECT_LIBRARIES_AIX]:
	Renames TARGET_OBJECT_AIX_LIBRARIES.
	* rs6000-nat.c: Replace TARGET_OBJECT_AIX_LIBRARIES with
	TARGET_OBJECT_LIBRARIES_AIX throughout.
	* solib-aix.c: Likwise.
2013-05-07 09:50:41 +00:00
Yao Qi 26a4dda9e5 gdb/
* solib-dsbt.c (struct dsbt_info) <enable_break2_done>: Remove.
	(get_dsbt_info, enable_break, dsbt_clear_solib): Update.
2013-05-07 09:26:09 +00:00
Yao Qi 3582629f2d gdb/
* solib-dsbt.c (enable_break): Declare.
	(dsbt_current_sos): Remove call to enable_break2.
	(enable_break2): Rename to enable_break.  Set solib breakpoint
	on '_dl_debug_state'.
	(enable_break): Remove.
2013-05-07 09:23:28 +00:00
Luis Machado aacbb8a556 gdb/
* ppc-linux-nat.c (ppc_linux_new_thread): Clear the new thread's
	debug state prior to replicating existing hardware watchpoints or
	breakpoints.

	gdb/testsuite/
	* gdb.threads/wp-replication.c: New file.
	* gdb.threads/wp-replication.exp: New file.
2013-05-07 07:43:33 +00:00
Jan Kratochvil 0c01335354 gdb/
* gcore.c (gcore_create_callback): Ignore sections with
	separate_debug_objfile_backlink != NULL.
2013-05-07 01:38:04 +00:00
Sandra Loosemore 2dd6254d53 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/
	* gdb.xml/tdesc-regs.exp: Add case for nios2.
2013-05-07 01:12:41 +00:00
Sandra Loosemore 68f5f83833 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
Andrew Jenner  <andrew@codesourcery.com>

	gdb/gdbserver/
	* Makefile.in (SFILES): Add linux-nios2-low.c.
	(clean): Add action to delete nios2-linux.c.
	(nios2-linux.c): New rule.
	* configure.srv: Add nios2*-*-linux*.
	* linux-nios2-low.c: New.
2013-05-07 01:11:16 +00:00
Sandra Loosemore a1217d97c4 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
Andrew Jenner  <andrew@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>

	Based on the nios2-elf port from Altera Corporation.

	gdb/
	* Makefile.in (ALL_TARGET_OBS): Add nios2-tdep.o and
	nios2-linux-tdep.o.
	(HFILES_NO_SRCDIR): Add nios2-tdep.h.
	(ALLDEPFILES): Add nios2-tdep.c and nios2-linux-tdep.c.
	* configure.tgt: Add nios2*-*-linux* and nios2*-*-* targets.
	* nios2-tdep.h: New.
	* nios2-tdep.c: New.
	* nios2-linux-tdep.c: New.
	* features/Makefile (WHICH): Add nios2-linux.
	(nios2-linux-expedite): Set.
	* features/nios2-cpu.xml: New.
	* features/nios2.xml: New.
	* features/nios2-linux.xml: New.
	* features/nios2.c: New (autogenerated).
	* features/nios2-linux.c: New (autogenerated).
	* regformats/nios2-linux.dat: New (autogenerated).
	* NEWS (Changes since GDB 7.6): Add new Nios II targets
	and commands.

	gdb/doc/
	* gdb.texinfo (Nios II): New section.
	(Nios II Features): New section.
2013-05-07 01:09:29 +00:00
Doug Evans 3b7bacacfd * symfile.c: Whitespace cleanup. 2013-05-07 00:02:12 +00:00
gdbadmin 0d0b92c1ee *** empty log message *** 2013-05-07 00:00:02 +00:00
Doug Evans b903e17e96 * gdb.base/solib-search-lib1.c: New file.
* gdb.base/solib-search-lib2.c: New file.
	* gdb.base/solib-search.c: New file.
	* gdb.base/solib-search.h: New file.
	* gdb.base/solib-search.exp: New file.
2013-05-06 22:20:18 +00:00
Doug Evans 0892cb63bd * solist.h (struct target_so_ops): New member clear_so.
* solib-svr4.c (svr4_clear_so): New function.
	(_initialize_svr4_solib): Set svr4_so_ops.clear_so.
	* solib.c (clear_so): Renamed from free_so_symbols.
	All callers updated.  Call target clear_so if it exists.
2013-05-06 22:18:39 +00:00
Doug Evans fac51dd9e5 * lib/gdb.exp (gdb_core_cmd): New function.
* gdb.arch/system-gcore.exp: Use it.
	* gdb.arch/vsx-regs.exp: Ditto.
	* gdb.base/gcore.exp: Ditto.
	* gdb.threads/gcore-thread.exp: Ditto.
2013-05-06 22:11:16 +00:00
Doug Evans c2a96e8caf * gdb.reverse/shr.h: New file.
* gdb.reverse/shr1.c: New file.
	* gdb.reverse/shr2.c: #include "shr.h".
	* gdb.reverse/solib-reverse.c: Remove #include <stdio.h>.
	#include "shr.h".  Replace calls to printf,sleep to call shr1 instead.
	* gdb.reverse/solib-precsave.exp: Build shr2.sl.
	Update tests using sleep/printf to use shr2.sl instead.
	* gdb.reverse/solib-reverse.exp: Ditt.o
2013-05-06 22:07:13 +00:00
Tom Tromey 40501e00a1 * ada-lang.c (ada_value_primitive_packed_val): Don't
call value_incref.
	* value.c (set_value_parent): Incref the new parent and decref
	the old parent.
	(value_copy, value_primitive_field): Use set_value_parent.
2013-05-06 19:46:15 +00:00
Tom Tromey b6807d988a * dwarf2loc.c (invalid_synthetic_pointer): Move earlier.
(indirect_pieced_value): Call dwarf2_fetch_constant_bytes
	if needed.
	* dwarf2loc.h (dwarf2_fetch_constant_bytes): Declare.
	* dwarf2read.c (write_constant_as_bytes)
	(dwarf2_fetch_constant_bytes): New functions.
gdb/testsuite
	* gdb.dwarf2/implptrconst.c: New file.
	* gdb.dwarf2/implptrconst.exp: New file.
	* lib/dwarf.exp (Dwarf::_nz_quote): New proc.
	(Dwarf::_handle_DW_FORM): Handle DW_FORM_block1.
	(Dwarf::_location): Handle DW_OP_GNU_implicit_pointer.
2013-05-06 19:44:04 +00:00
Tom Tromey 3aef2284c6 * dwarf2read.c (dwarf2_const_value_data): Remove unused
parameters.
	(dwarf2_const_value_attr): Update.
2013-05-06 19:39:09 +00:00
Tom Tromey 66f65e2b48 * somread.c (som_symfile_offsets): Add 'const' to addrs.
* machoread.c (macho_symfile_offsets): Add 'const' to addrs.
	* xcoffread.c (xcoff_symfile_offsets): Add 'const' to addrs.
	Remove declaration.
2013-05-06 19:38:04 +00:00
Tom Tromey 7919a97345 * dwarf2read.c (dwarf2_const_value_attr): Use 'obstack', not
objfile's obstack.
2013-05-06 19:28:36 +00:00
Doug Evans 3189cb1297 * dbxread.c (process_one_symbol): Constify section_offsets parameter.
* stabsread.h (process_one_symbol): Update declaration.
	* dwarf2read.c (dw2_relocate): Constify new_offsets, delta parameters.
	* elfread.c (elf_symfile_relocate_probe): Ditto.
	* psymtab.c (relocate_psymtabs): Ditto.
	* objfiles.c (objfile_relocate1): Constify new_offsets parameter.
	(objfile_relocate): Ditto.
	* objfiles.h (objfile_relocate): Update declaration.
	* symfile.c (relative_addr_info_to_section_offsets): Constify
	addrs parameter.
	(default_symfile_offsets): Ditto.
	(syms_from_objfile_1): Constify offsets parameter.
	(syms_from_objfile): Ditto.
	(symbol_file_add_with_addrs_or_offsets): Ditto.
	(symfile_map_offsets_to_segments): Constify data parameter.
	* symfile.h (struct quick_symbol_functions): Constify new_offsets,
	delta parameters of member relocate.
	(struct sym_probe_fns): Constify new_offsets,
	delta parameters of member sym_relocate_probe.
	(struct sym_fns): Constify section_addr_info parameter of member
	sym_offsets.
	(relative_addr_info_to_section_offsets): Update declaration.
	(default_symfile_offsets): Ditto.
	(syms_from_objfile): Ditto.
	(symfile_map_offsets_to_segments): Ditto.
2013-05-06 19:15:17 +00:00
Doug Evans a7bfba49b2 * symfile.c (syms_from_objfile_1): Use correct section count when
objfile->sf == NULL.
2013-05-06 18:50:08 +00:00
Mike Frysinger 5f8e0b8f4f gdb: btrace: fix indentation style
Most of this func had the incorrect indentation level (starting with 4
spaces instead of 2).
2013-05-06 18:03:33 +00:00
Doug Evans ea52d8933d * psympriv.h (struct partial_symtab): Augment comment for member
section_offsets.
2013-05-06 16:45:13 +00:00
Joel Brobecker 4d1eb6b4d2 Reimplement shared library support on ppc-aix...
... using the target_so_ops framework.

gdb/ChangeLog:

        * target.h (TARGET_OBJECT_AIX_LIBRARIES): New target_object enum.
        * features/library-list-aix.dtd: New file.
        * solib-aix.h, solib-aix.c: New file.
        * rs6000-aix-tdep.c: #include "solib.h" and "solib-aix.h".
        (rs6000_find_toc_address_hook): Delete.
        (rs6000_push_dummy_call): Rewrite code setting the TOC value.
        (rs6000_aix_init_osabi): Register solib_aix_so_ops.
        * rs6000-nat.c: Remove "xcoffsolib.h" include.  Include
        "xml-utils.h".
        (map_vmap, vmap_exec, vmap_ldinfo, add_vmap, objfile_symbol_add)
        (vmap_symtab, fixup_breakpoints): Delete.
        (rs6000_xfer_shared_libraries): New function.
        (rs6000_xfer_partial): Add TARGET_OBJECT_AIX_LIBRARIES handling.
        (vmap_secs, bss_data_overlap, vmap_add_symbols): Delete.
        (xcoff_relocate_symtab, xcoff_relocate_core): Delete.
        (rs6000_ptrace_ldinfo, rs6000_core_ldinfo)
        (rs6000_xfer_shared_library): New function.
        (find_toc_address): Delete.
        (_initialize_rs6000_nat): Do not set rs6000_find_toc_address_hook.
        * rs6000-tdep.h (rs6000_find_toc_address_hook): Remove.
        * xcoffread.c (record_minimal_symbol): Reloate symbol address
        before creating minimal symbol.  Adjust function description
        accordingly.
        (scan_xcoff_symtab): Replace call to
        prim_record_minimal_symbol_and_info by call to
        record_minimal_symbol.
        (xcoff_symfile_offsets): Reimplement mostly as a wrapper
        around default_symfile_offsets.
        * configure.tgt: Add solib-aix.o to gdb_target_obs for
        powerpc-aix targets.
        * config/rs6000/nm-rs6000.h: Delete.
        * config/powerpc/aix.mh (NAT_FILE): Delete.
        (NATDEPFILES): Remove xcoffsolib.o.
        * Makefile.in (XMLFILES): Add library-list-aix.dtd.
        (ALL_TARGET_OBS): Add solib-aix.o.
        (HFILES_NO_SRCDIR): Remove xcoffsolib.h and
        config/rs6000/nm-rs6000.h.  Add solib-aix.h.
        (ALLDEPFILES): Add solib-aix.c.  Remove xcoffsolib.c.
        * xcoffsolib.h, xcoffsolib.c: Delete.

        * solib.c (reload_shared_libraries): Remove reference to
        SOLIB_CREATE_INFERIOR_HOOK.
        * breakpoint.c (handle_solib_event): Remove reference to SOLIB_ADD.
        (disable_breakpoints_in_shlibs): Remove reference to PC_SOLIB.
        (momentary_bkpt_re_set): Replace SOLIB_ADD by solib_add in
        comment.
        * corelow.c (deprecated_core_resize_section_table): Delete.
        * exec.c: Remove include of xcoffsolib.h".
        (map_vmap, vmap): Delete.
        (exec_close_1): Remove references to vmap.
        (exec_file_attach): Remove vmap handling code, and reference
        to DEPRECATED_IBM6000_TARGET.
        (bfdsec_to_vmap): Delete.
        (exec_files_info): Remove block of code handling VMAP.
        * infcmd.c (post_create_inferior): Remove reference to
        SOLIB_CREATE_INFERIOR_HOOK and SOLIB_ADD.
        * infrun.c (follow_exec): Remove reference to
        SOLIB_CREATE_INFERIOR_HOOK.
        * stack.c (print_frame): Remove reference to PC_SOLIB.
        * solib-dsbt.c (dsbt_current_sos): Adjust comment.
        (dsbt_relocate_main_executable): Likewise.
        * solib-frv.c (frv_current_sos): Likewise.

gdb/doc/ChangeLog:

        * gdbint.texinfo (Algorithms): Remove entries documenting
        DEPRECATED_IBM6000_TARGET, SOLIB_ADD, and
        SOLIB_CREATE_INFERIOR_HOOK.
2013-05-06 14:15:50 +00:00
Joel Brobecker 0c4f667cfe Fix -Wpointer-sign warning in sol-thread.c
gdb/ChangeLog:

        * sol-thread.c (rw_common): Cast BUF to "gdb_byte *" in calls
        to target_write_memory and target_read_memory.
2013-05-06 12:55:52 +00:00
Joel Brobecker 726ce67c26 darwin: warning resuming inferior after attach
This patch avoids a warning when resuming the execution of a program
that we attached to. For instance:

    (gdb) attach 29989
    (gdb) continue
    Continuing.
    warning: Mach error at "/[...]/darwin-nat.c:738" in function
             "darwin_resume_thread": (os/kern) failure (0x5)

The warning is relatively harmless, but worrisome for the average
user.  The warning comes from the fact that darwin_wait recorded
that the fake stop event corresponding to the suspend action was
caused by the main thread being suspended on a SIGTRAP. As a result
of this, when resuming the program's execution, we try to resume
the thread's execution as well.  This is where the issue occurs,
as the thread was not in fact suspended, thus triggering the warning.

gdb/ChangeLog:

        * darwin-nat.c (darwin_setup_fake_stop_event): New function.
        (darwin_attach): Adjust using darwin_setup_fake_stop_event.
2013-05-06 12:41:14 +00:00
Joel Brobecker c8c9911faa darwin-nat: Print all hex values with 0x prefix.
gdb/ChangeLog:

        * darwin-nat.c: Replace all "%x" instances in format strings
        into "0x%x" throughout.
2013-05-06 12:37:52 +00:00
Joel Brobecker fda184b639 darwin-nat.c: Do not use gdb_assert on system call outcomes.
There were many cases were we make a system call which could fail
due to reasons outside of the debugger control. We should handle
these situations a little more gracefully than triggering an
internal error.

gdb/ChangeLog:

        * darwin-nat.c (darwin_mourn_inferior): Replace call to
        gdb_assert by call to MACH_CHECK_ERROR.
        (darwin_attach_pid): Raise an error rather than a failed
        assertion when various system calls failed.  Report a warning
        instead of raising a failed assertion when PREV_NOT is not NULL
        after call to mach_port_request_notification.
        (darwin_ptrace_me): Raise an error rather than a failed
        assertion when read returns nonzero.
2013-05-06 12:35:46 +00:00
Joel Brobecker d1d69afb19 amd64-darwin-tdep.c: Remove #include "gdb_assert.h"
gdb_assert.h is already included from darwin-nat.h, so no need to
include it again...

gdb/ChangeLog:

        * amd64-darwin-tdep.c: Remove #include "gdb_assert.h".
2013-05-06 12:33:00 +00:00
gdbadmin a9c0e92d1b *** empty log message *** 2013-05-06 00:00:32 +00:00
Jan Kratochvil dc90b24d1b gdb/
* cleanups.c (restore_my_cleanups): New gdb_assert for SENTINEL_CLEANUP.
2013-05-05 16:56:07 +00:00
Jan Kratochvil faab992242 gdb/
* event-top.c (display_gdb_prompt): Call missing do_cleanups.
	* infcmd.c (get_return_value) <!stop_regs>: Do not overwrite CLEANUP.
	* symfile.c (symfile_bfd_open): New variable back_to.  Do not leave
	a stale cleanup.  Fix double free of NAME.
2013-05-05 16:54:26 +00:00
gdbadmin c307590a7c *** empty log message *** 2013-05-05 00:00:03 +00:00
Eli Zaretskii e0ea48a0d7 Announce thread death on MS-Windows.
* windows-nat.c (windows_delete_thread): Accept an additional
	argument, the thread's exit code, and announce thread death when
	print_thread_events is non-zero and we are deleting a thread that
	is not the main thread.
	(get_windows_debug_event): Pass thread exit code to
	windows_delete_thread.
2013-05-04 13:36:18 +00:00
Kevin Buettner 83b2706ad5 * v850-tdep.c (elf-bfd.h, elf/v850.h): Include.
(R_149_REGNUM, E_NUM_OF_V850E2_REGS, E_SELID_1_R0_REGNUM)
	(E_SELID_1_R31_REGNUM, E_SELID_2_R0_REGNUM, E_SELID_2_R31_REGNUM)
	(E_SELID_3_R0_REGNUM, E_SELID_3_R31_REGNUM, E_SELID_4_R0_REGNUM)
	(E_SELID_4_R31_REGNUM, E_SELID_5_R0_REGNUM, E_SELID_5_R31_REGNUM)
	(E_SELID_6_R0_REGNUM, E_SELID_6_R31_REGNUM, E_SELID_7_R0_REGNUM, E_SELID_7_R31_REGNUM)
	(E_VR0_REGNUM, E_VR31_REGNUM, E_NUM_OF_V850E3V5_REGS): Define.
	(v850_abi, V850_ABI_GCC, V850_ABI_RH850): New enum and constants.
	(gdbarch_tdep): New struct.
	(v850e2_register_name): Use E_NUM_OF_V850E2_REGS instead of
	E_NUM_REGS.
	(v850e3v5_register_name): New function.
	(v850_register_type): v850e3v5 vector registers are 64-bits wide.
	(v850_use_struct_convention): Add `gdbarch' parameter.  Add new
	code handling the struct return conventions for the RH850 ABI.
	Update all callers.
	(v850_eight_byte_align_p): New function.
	(v850_push_call_dummy): Push structs by value, not by reference
	for the RH850 ABI.  Add support for eight byte alignment.
	(v850_dbtrap_breakpoint_from_pc): New function.
	(v850_gdbarch_init): Add ABI detection code.  Register
	v850e3v5_register_name for the v850e3v5 architecture.  Set the
	number of registers for v850e3v5.  Register
	v850_dbtrap_breakpoint_from_pc as appropriate.
	(_initialize_gdbarch_init): Registration bfd_arch_v850_rh850.
2013-05-04 06:25:20 +00:00
Doug Evans d445b2f6a4 * objfiles.c (objfile_relocate): Use gdb_bfd_count_sections instead
of bfd_count_sections.
	* solib-target.c (solib_target_relocate_section_addresses): Ditto.
	* symfile.c (default_symfile_offsets): Ditto.
	(syms_from_objfile_1): Ditto.  Make dummy addrs list an array of
	one entry, not bfd_count_sections entries.
2013-05-04 06:19:31 +00:00
Kevin Buettner b3ce41ea47 * rl78-tdep.c (rl78_register_reggroup_p): Include SP in the
`save' and `restore' register groups.  Don't include SPL
	or SPH in these groups.
	(rl78_dwarf_reg_to_regnum):  Adjust mapping for
	RL78_PC_REGNUM.  Add mappings for RL78_PSW_REGNUM,
	RL78_ES_REGNUM, and RL78_CS_REGNUM.
	(rl78_gdbarch_init): Set `dwarf2_addr_size' to 4.  Invoke
	dwarf2_append_unwinders().
2013-05-04 06:14:53 +00:00
gdbadmin c154501950 *** empty log message *** 2013-05-04 00:00:02 +00:00
Philippe Waroquiers 96f7d3f166 Fix to handle properly 'catch signal SIGINT' and SIGTRAP 2013-05-03 19:16:56 +00:00
Hafiz Abid Qadeer 1ebff1fdfd 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
* tracepoint.c (cmd_qtinit): Call 'stop_tracing'.

2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>

	* status-stop.exp (test_tstart_tstart): Check for error
	returned by the second 'tstart' command.
2013-05-03 15:43:58 +00:00
gdbadmin 5b34ca8af7 *** empty log message *** 2013-05-03 00:00:03 +00:00
gdbadmin 1e456ce018 *** empty log message *** 2013-05-02 00:00:33 +00:00
Joel Brobecker b9dd19477d Fix various -Wpointer-sign warnings in darwin-nat.c
gdb/ChangeLog:

        * darwin-nat.c (darwin_read_write_inferior): Change types
        of parameters rdaddr and wraddr to "gdb_byte *". Change type
        of copy_count to "mach_msg_type_number_t".
        (darwin_read_dyld_info): Change type of parameter
        rdaddr to "gdb_byte *".
2013-05-01 14:54:18 +00:00
Joel Brobecker 4ca18a63a8 Fix -Wpointer-sign errors in solib-ia64-hpux.c
gdb/ChangeLog:

        * solib-ia64-hpux.c (ia64_hpux_read_dynamic_info): Change cast
        of &info->load_map from "char *" to "gdb_byte *".
2013-05-01 14:33:00 +00:00
Joel Brobecker 2b692d328b Fix -Wpointer-sign errors in ia64-tdep.c
gdb/ChangeLog:

        * ia64-tdep.c (ia64_access_fpreg): Change cast of val
        from "char *" to "gdb_byte *".
        (ia64_access_rse_fpreg, ia64_access_mem): Likewise.
2013-05-01 14:31:55 +00:00
gdbadmin a976710f0d *** empty log message *** 2013-05-01 00:00:02 +00:00
Doug Evans 6a506a2dcb * dwarf2read.c (lookup_dwo_unit): Return NULL if DWO not found.
(init_cutu_and_read_dies): Flag a complaint, not error, for bad
	DWO stub.  If DWO isn't found, just use stub.
	(lookup_dwo_cutu): Don't try DWO if there's a DWP file.
2013-04-30 23:19:41 +00:00
Doug Evans a98c29a089 * dwarf2read.c (dw2_find_symbol_file): Initialize filename before
calling init_cutu_and_read_dies.
2013-04-30 21:11:50 +00:00
Walfred Tedeschi f92b06daf9 Fix display of structures/bitfields in register description.
Add support for displaying structures and bitfields for registers when
executing "maint print c-tdesc". This command is also used when
converting the xml target description file into c file.

Example of the behaviour is given below reporting a snipet of the xml file
and a snippet of the c code generated.

XML file contains:
...
    <union id="vecint">
      <field name="v4" type="v4int8"/>
      <field name="v2" type="v2int16"/>
    </union>

    <struct id="struct1">
      <field name="v4" type="v4int8"/>
      <field name="v2" type="v2int16"/>
    </struct>

    <struct id="struct2" size="8">
      <field name="f1" start="0" end="34"/>
      <field name="f2" start="63" end="63"/>
    </struct>
...

Setting this xml file as target description file and
issuing the maintenance print c-tdesc the following output
is obtained:

  feature = tdesc_create_feature (result, "extra");
  field_type = tdesc_named_type (feature, "int8");
  tdesc_create_vector (feature, "v4int8", field_type, 4);

  field_type = tdesc_named_type (feature, "int16");
  tdesc_create_vector (feature, "v2int16", field_type, 2);

  type = tdesc_create_union (feature, "vecint");
  field_type = tdesc_named_type (feature, "v4int8");
  tdesc_add_field (type, "v4", field_type);
  field_type = tdesc_named_type (feature, "v2int16");
  tdesc_add_field (type, "v2", field_type);

C output is not supported type "struct1".

This is finally the issue.

2013-03-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>

        * target-descriptions.c (maint_print_c_tdesc_cmd):
        Add case to parse structures as register types and
        bitfields.

testsuite/

	* gdb.xml/maint_print_struct.exp: New file.
	* gdb.xml/maint_print_struct.xml: New file.

Change-Id: I2e20b095d508319c80275e724a9452c7e2834067
Signed-off-by: Walfred Tedeschi <walfred.tedeschi@intel.com>
2013-04-30 12:33:52 +00:00
Joel Brobecker f1d02dd44d Fix date in some of my recent ChangeLog entries... 2013-04-30 11:56:23 +00:00
Joel Brobecker 019c1128ac Fix -Wpointer-sign warning in sol-thread.c
This fixes a couple of compiler warnings in rw_common when calling
target_read_memory/target_write_memory due to the type of parameter
"buf" (char *) not matching what these function expect (gdb_byte *).

gdb/ChangeLog:

        * sol-thread.c (rw_common): Change type of parameter "buf"
        to "gdb_byte *".
        (ps_pdwrite, ps_ptwrite): Cast parameter "buf" in call to
        rw_common to "gdb_byte *" instead of "char *".
2013-04-30 11:52:13 +00:00
Joel Brobecker 5812197ca1 Fix build error in sol-thread.c:info_cb
gdb/ChangeLog:

        * sol-thread.c (info_cb) [ti.ti_startfunc != 0]: Change type
        of local variable msym to const struct bound_minimal_symbol.
        Adjust use accordingly.
        [ti.ti_state == TD_THR_SLEEP]: Likewise.
2013-04-30 11:36:45 +00:00
Walfred Tedeschi 95eebdcc1f Add myself as a maintainer.
Change-Id: Ie1b0cb082a384144eef327e9294949e9bacc4415
2013-04-30 11:17:20 +00:00
Thomas Schwinge ecccb8133f 2013-04-30 Samuel Thibault <samuel.thibault@gnu.org>
* i386gnu-nat.c (CREG_OFFSET): New macro.
	(creg_offset): New array.
	(CREG_ADDR): Use creg_offset instead of reg_offset.
2013-04-30 09:27:43 +00:00
Joel Brobecker 54746424da mep: define gdbarch_pc_regnum instead of gdbarch_write_pc.
gdb/ChangeLog:

    * mep-tdep.c (mep_write_pc): Delete.
    (mep_gdbarch_init): Remove call to set_gdbarch_write_pc.
    Add call to set_gdbarch_pc_regnum.
2013-04-30 08:28:54 +00:00
Joel Brobecker ee35f36cec Delete ChangeLog entry with no corresponding change in sources.
This ChangeLog entry was the result of a result of botched commit
which resulted in the ChangeLog update being checked in, while
the actual code code itself did not make it to CVS.

This patch deletes the entry in gdb/ChangeLog titled:

    mep: define gdbarch_pc_regnum instead of gdbarch_write_pc.
2013-04-30 08:28:31 +00:00
Joel Brobecker 01da98f9f4 filestuff.c: Include "gdb_dirent.h" instead of <dirent.h>
gdb/ChangeLog:

        * common/filestuff.c: Replace #include <dirent.h> by
        #include "gdb_dirent.h".
2013-04-30 08:20:47 +00:00
Joel Brobecker 366c6766d8 filestuff.c: Use gdb_stat.h instead of <sys/stat.h>
gdb/ChangeLog:

        * common/filestuff.c: Replace #include <sys/stat.h> by
        #include "gdb_stat.h".
2013-04-30 08:20:04 +00:00
gdbadmin 013519f747 *** empty log message *** 2013-04-30 00:00:02 +00:00
Tom Tromey 3f84184e8b PR python/14204:
* gdb.texinfo (Python API): Fix menu entry.
	(Blocks In Python): Fix subsubsection text.  Rewrite intro.
	Define global and static block.  Add example.  Clarify
	block relationship for inline functions.
2013-04-29 17:32:43 +00:00
Tom Tromey 6015523492 * gdb.texinfo (Python API): Mention Python help and keyword
arguments.  Move pagination text to Basic Python.
	(Basic Python): Put pagination text here.  Document
	close-on-exec, SIGCHLD, and SIGINT.
2013-04-29 17:30:26 +00:00
Joel Brobecker 09526ec1c2 mep: define gdbarch_pc_regnum instead of gdbarch_write_pc.
gdb/ChangeLog:

	* mep-tdep.c (mep_write_pc): Delete.
	(mep_gdbarch_init): Remove call to set_gdbarch_write_pc.
	Add call to set_gdbarch_pc_regnum.
2013-04-29 10:10:35 +00:00
Joel Brobecker d27b54adf3 Use gdbarch_pc_regnum instead of gdbarch_write_pc.
gdb/ChangeLog:

	* m32r-tdep.c (m32r_write_pc): Delete.
	(m32r_gdbarch_init): Remove call to set_gdbarch_write_pc.
	Add call to set_gdbarch_pc_regnum.
2013-04-29 10:08:46 +00:00
Pierre Muller b385a60dc4 * dwarf2read.c (handle_DW_AT_stmt_list): Avoid ARI warning for
editCase function rule.
	(get_DW_AT_signature_type): Likewise.
2013-04-29 09:52:07 +00:00
Pierre Muller 47d21dc520 * ./contrib/ari/gdb_ari.sh (editCase rule): Fix spelling error. 2013-04-29 08:32:18 +00:00
Joel Brobecker 9056882e81 Add ARI marker to get_DW_AT_signature_type.
gdb/ChangeLog:

        * dwarf2read.c (get_DW_AT_signature_type): Add ARI marker.
2013-04-29 05:05:44 +00:00
gdbadmin 358d1d6030 *** empty log message *** 2013-04-29 00:00:02 +00:00
Yao Qi 7ee4732a0c gdb/
* solib-dsbt.c (fetch_loadmap): Re-indent.
	(displacement_from_map, enable_break2): Likewise.
	(dsbt_relocate_section_addresses): Likewise.
2013-04-28 08:58:29 +00:00
gdbadmin 3d80fd16c5 *** empty log message *** 2013-04-28 00:00:02 +00:00
gdbadmin 6c6b70567b *** empty log message *** 2013-04-27 00:00:32 +00:00
gdbadmin 2260af53be GDB 7.6 released. 2013-04-26 14:07:53 +00:00
gdbadmin 7f5039149d *** empty log message *** 2013-04-26 00:00:02 +00:00