* config/obj-macho.c (obj_mach_o_make_or_get_sect): In the absence of
canonical information, try to determine CODE and DEBUG section flags
from the mach-o section data.
* gdb.threads/attach-into-signal.exp (corefunc): Don't enable
lin-lwp output. Set SIGALRM to stop. Adjust tests to not rely on
gdb's internal debug output. For the non-threaded case, look for
"Program received signal SIGLARM", for the threaded case, peek at
the thread's siginfo.
General cleanup, make output test messages unique, and build
different executable files for the non-threaded and threaded
cases.
* gdb.threads/attach-into-signal.exp (binfile, escapedbinfile):
Delete.
(executable_nothr, executable_thr): New globals.
(top level): Adjust to delete both executables.
(corefunc): New parameter $executable. Set $pf_prefix instead of
hand writing a prefix in tests. Issue a clean_restart and enable
lin-lwp debug output here.
(top level): Adjust. Use build_executable. Don't start gdb here,
and don't enable lin-lwp debug output here.
* gdb.threads/Makefile.in (EXECUTABLES): Adjust.
* python/py-event.c (event_object_getset): New global.
(event_object_type): Reference it.
* python/py-type.c (field_object_getset): New global.
(field_object_type): Reference it.
* python/python-internal.h (gdb_py_generic_dict): Declare.
* python/py-utils.c (gdb_py_generic_dict): New function.
testsuite/gdb
* gdb.python/py-events.py (exit_handler): Add test for 'dir'.
* gdb.python/py-events.exp: Check 'dir' output.
* gdb.python/py-type.exp (test_fields): Add test for 'dir'.
* ld.h (parsing_defsym): Delete.
* ldexp.c (exp_intop, exp_bigintop, exp_relop): Set type.filename.
(fold_binary, fold_name, exp_fold_tree_1, exp_get_vma, exp_get_fill,
exp_get_abs_int): Add tree arg for %S in error messages. Don't
fudge lineno.
(exp_binop, exp_unop, exp_nameop, exp_assop, exp_assert): Copy
type.filename from sub-tree.
(exp_trinop): Likewise, and use "cond" rather than "lhs".
* ldexp.h (node_type): Add filename field to struct.
* ldfile.c (ldfile_input_filename): Delete. Remove all refs.
* ldfile.h (ldfile_input_filename): Delete.
* ldgram.y (phdr_type, phdr_qualifiers, yyerror): Add NULL arg for
%S in error messages.
* ldemul.c (syslib_default, hll_default): Likewise.
* ldlang.c (lang_memory_region_lookup, lang_memory_region_alias,
lang_get_regions, lang_new_phdr): Likewise.
(lang_size_sections_1): Pass addr_tree for %S.
* ldlex.h (lex_redirect): Update prototype.
(ldlex_filename): Declare.
* ldlex.l (<EOF>): Don't set ldfile_input_filename.
(lex_redirect): Add fake_filename and count params. Push
fake_filename to file_name_stack and init lineno from count.
(ldlex_filename): New function.
(lex_warn_invalid): Use above.
* ldmain.c (main): Update lex_redirect call.
* ldmisc.c (vfinfo <%S>): Take file name and line number from
etree_type arg, or use current if arg is NULL.
* lexsup.c (parsing_defsym): Delete.
(parse_args <OPTION_DEFSYM>): Update lex_redirect call.
symfile_flags.
* solib.c (solib_read_symbols): Use inferior's symfile_flags.
* linux-nat.c (linux_child_follow_fork): Set symfile_flags on
inferior.
* infrun.c (handle_vfork_child_exec_or_exit): Set symfile_flags on
inferior.
(follow_exec): Use inferior's symfile_flags.
* inferior.h (struct inferior) <symfile_flags>: New field.
The current gdbsim_create_inferior func doesn't check the return value
of sim_create_inferior which can be problematic when that func doesn't
return success. So, if it fails, call error() and be done.
Reported-by: Richard Stuckey <richard.stuckey@arc.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>