Whitespace fixes for cpu/or1k.opc

	* or1k.opc: Whitespace fixes.
Use 'struct varobj_item' to represent name and value pair

Hi,
name and value pair is widely used in varobj.c.  This patch is to add
a new struct varobj_item to represent them, so that the number of
function arguments can be reduced.  Finally, the iteration is done on
'struct varobj_item' instead of PyObject after this patch series.

 V2:
 - Fix changelog entry.
 - Fix one grammatical mistake.

gdb:

2014-06-12  Yao Qi  <yao@codesourcery.com>

	* varobj.c (struct varobj_item): New structure.
	(create_child_with_value): Update declaration.
	(varobj_add_child): Replace arguments 'name' and 'value' with
	'item'.  All callers updated.
	(install_dynamic_child): Likewise.
	(update_dynamic_varobj_children): Likewise.
	(varobj_add_child): Likewise.
	(create_child_with_value): Likewise.
Generalize varobj iterator

This patch generalizes varobj iterator, in a python-independent way.
Note varobj_item is still a typedef of PyObject, we can only focus on
API changes, and leave the data type changes to the next patch.  As a
result, we include "varobj-iter.h" after the typedef of PyObject in
varobj.c, but it is an intermediate state.  Finally, varobj-iter.h is
independent of PyObject.

This change is helpful to move some python-related code out of
varobj.c.

 V2:
  - Fix a missing cleanup.
  - Fix typos.
  - Use XNEW.
  - Check against NULL explicitly.
  - Update copyright year for new added files.

 V3:
  - Call PyGILState_Ensure before Py_XDECREF.
  - Use CPYCHECKER_STEALS_REFERENCE_TO_ARG.
  - Code indentation.

 V4:
  - use varobj_ensure_python_env instead of PyGILState_Ensure.

gdb:

2014-06-12  Pedro Alves  <pedro@codesourcery.com>
	    Yao Qi  <yao@codesourcery.com>

	* Makefile.in (SUBDIR_PYTHON_OBS): Add "py-varobj.o".
	(SUBDIR_PYTHON_SRCS): Add "python/py-varobj.c".
	(HFILES_NO_SRCDIR): Add "varobj-iter.h".
	(py-varobj.o): New rule.
	* python/py-varobj.c: New file.
	* python/python-internal.h (py_varobj_get_iterator): Declare.
	* varobj-iter.h: New file.
	* varobj.c: Include "varobj-iter.h"
	(struct varobj) <child_iter>: Change its type from "PyObject *"
	to "struct varobj_iter *".
	<saved_item>: Likewise.
	[HAVE_PYTHON] (varobj_ensure_python_env): Make it extern.
	[HAVE_PYTHON] (varobj_get_iterator): New function.
	(update_dynamic_varobj_children) [HAVE_PYTHON]: Move
	python-specific code to python/py-varobj.c.
	(install_visualizer): Call varobj_iter_delete instead of
	Py_XDECREF.
	* varobj.h (varobj_ensure_python_env): Declare.
Iterate over 'struct varobj_item' instead of PyObject

In previous patch, "saved_item" is still a PyOjbect and iteration is
still performed over PyObject.  This patch continues to decouple
iteration from python code, so it changes its type to "struct
varobj_item *", so that the iterator itself is independent of python.

 V2:
 - Call varobj_delete_iter in free_variable.
 - Fix changelog entries.
 - Use XNEW.

 V3:
 - Return NULL early in py_varobj_iter_next if gdb_python_initialized
   is false.

gdb:

2014-06-12  Pedro Alves  <pedro@codesourcery.com>
	    Yao Qi  <yao@codesourcery.com>

	* python/py-varobj.c (py_varobj_iter_next): Return NULL if
	gdb_python_initialized is false.  Move some code from varobj.c.
	* varobj-iter.h (struct varobj_item): Moved from varobj.c.
	* varobj.c: Move "varobj-iter.h" inclusion earlier.
	(struct varobj_item): Moved to varobj-iter.h".
	(varobj_clear_saved_item): New function.
	(update_dynamic_varobj_children): Move python-related code to
	py-varobj.c.
	(free_variable): Call varobj_clear_saved_item and
	varobj_iter_delete.
Remove #if HAVE_PYTHON

This patch removes some unnecessary "#if HAVE_PYTHON" so that more
code is generalized.

gdb:

2014-06-12  Pedro Alves  <pedro@codesourcery.com>
	    Yao Qi  <yao@codesourcery.com>

	* varobj.c: Remove "#if HAVE_PYTHON" and "#endif".
	(varobj_get_iterator): Wrap up code for pretty-printer by
	"#if HAVE_PYTHON" and "#endif".
	(update_dynamic_varobj_children): Likewise.
Rename varobj_pretty_printed_p to varobj_is_dynamic_p

We think varobj with --available-children-only behaves like a dynamic
varobj, so dyanmic varobj is not pretty-printer specific.  We rename
varobj_pretty_printed_p to varobj_is_dynamic_p, so that we can handle
available-children-only checking in varobj_is_dynamic_p in the next
patch.

gdb:

2014-06-12  Yao Qi  <yao@codesourcery.com>

	* varobj.c (varobj_pretty_printed_p): Rename to ...
	(varobj_is_dynamic_p): ... this.  New function.
	* varobj.h (varobj_pretty_printed_p): Remove declaration.
	(varobj_is_dynamic_p): Declare.
	* mi/mi-cmd-var.c (print_varobj): All callers updated.
	(mi_print_value_p, varobj_update_one): Likewise.
Use varobj_is_dynamic_p more widely

Use varobj_is_dynamic_p more widely so that the callers of
varobj_is_dynamic_p are unchanged when we add available-children-only
stuff in varobj_is_dynamic_p.

gdb:

2014-06-12  Yao Qi  <yao@codesourcery.com>

	* varobj.c (varobj_get_num_children): Call
	varobj_is_dynamic_p.
	(varobj_list_children): Likewise.
	(varobj_update): Likewise.  Update comments.
Move ChangeLog entry to proper place.

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

	* linux-nat.c (linux_child_follow_fork): Initialize status with
	W_STOPCODE (0) instead of 0.  Remove shodowing 'status' local from
	inner block.  Only pass the signal to PTRACE_DETACH if in pass
	state.
don't use directory in test name

I noticed that a few tests in completion.exp put the directory name
into the name of the resulting test.  While the directory name is
relative, this still makes for spurious differences depending on
whether the test was run in serial or parallel mode.

This patch fixes the problem.  I'm checking it in.

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

	* gdb.base/completion.exp: Don't use directory name in test.
link gdbserver against libiberty

This builds a libiberty just for gdbserver and arranges for gdbserver
to use it.  I've tripped across the lack of libiberty in gdbserver at
least once, and I have seen other threads where it would have been
useful.

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

	* debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
	* server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
	(parse_debug_format_options): Likewise.
	(gdbserver_usage): Likewise.
	* Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
	(SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
	(gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
	against libiberty.
	($(LIBGNU)): Depend on libiberty.
	(all-lib): Recurse into all subdirs.
	(install-only): Invoke "install" target in subdirs.
	(vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
	targets.
	* configure: Rebuild.
	* configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
	for vasprintf, vsnprintf, or gettimeofday.
	* configure.srv: Don't add safe-ctype.o or lbasename.o to
	srv_tgtobj.
delete gdbserver's freeargv

gdbserver defines freeargv, but it is now trivial to just use the one
in libiberty.

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

	* utils.c (freeargv): Remove.
daily update