Fix crash on Python frame filters with unreadable arg

https://bugzilla.redhat.com/show_bug.cgi?id=1126177

ERROR: AddressSanitizer: SEGV on unknown address 0x000000000050 (pc 0x000000992bef sp 0x7ffff9039530 bp 0x7ffff9039540
T0)
    #0 0x992bee in value_type .../gdb/value.c:925
    #1 0x87c951 in py_print_single_arg python/py-framefilter.c:445
    #2 0x87cfae in enumerate_args python/py-framefilter.c:596
    #3 0x87e0b0 in py_print_args python/py-framefilter.c:968

It crashes because frame_arg::val is documented it may contain NULL
(frame_arg::error is then non-NULL) but the code does not handle it.

Another bug is that py_print_single_arg() calls goto out of its TRY_CATCH
which messes up GDB cleanup chain crashing GDB later.

It is probably 7.7 regression (I have not verified it) due to the introduction
of Python frame filters.

gdb/ChangeLog

	PR python/17355
	* python/py-framefilter.c (py_print_single_arg): Handle NULL FA->VAL.
	Fix goto out of TRY_CATCH.

gdb/testsuite/ChangeLog

	PR python/17355
	* gdb.python/amd64-py-framefilter-invalidarg.S: New file.
	* gdb.python/py-framefilter-invalidarg-gdb.py.in: New file.
	* gdb.python/py-framefilter-invalidarg.exp: New file.
	* gdb.python/py-framefilter-invalidarg.py: New file.
Fix PR gdb/17035: "show user" doesn't list user-defined commands that
have empty bodies.

User-defined commands that have empty bodies weren't being shown because
the print function returned too soon.  Now, it prints the command's name
before checking if it has any body at all.  This also fixes the same
problem on "show user <myemptycommand>", which wasn't being printed due
to a similar reason.

gdb/Changelog:

	* cli/cli-cmds.c (show_user): Use cli_user_command_p to
	decide whether we display the command on "show user".
	* cli/cli-script.c (show_user_1): Only verify cmdlines after
	printing command name.
	* cli/cli-decode.h (cli_user_command_p): Declare new function.
	* cli/cli-decode.c (cli_user_command_p): Create helper function
	to verify whether cmd_list_element is a user-defined command.

gdb/testsuite/Changelog:

	* gdb.base/commands.exp: Add tests to verify user-defined
	commands with empty bodies.
	* gdb.python/py-cmd.exp: Test that we don't show user-defined
	python commands in `show user command`.
	* gdb.python/scm-cmd.exp: Test that we don't show user-defined
	scheme commands in `show user command`.
daily update