Commit Graph

17 Commits

Author SHA1 Message Date
Jan Kratochvil 5e3b36f879 gdb/testsuite/
* gdb.base/attach-pie-misread.exp: Load prelink-support.exp.  Replace
	build_executable by build_executable_own_libs.  Replace "prelink -R"
	execution by a call of prelink_yes.  Comment why "prelink -r" needs no
	change.
	* gdb.base/break-interp.exp: Load prelink-support.exp.  Rename calls of
	copy to file_copy.  Move setting opts --dynamic-linker and -rpath,
	mkdir $dir and ldd its parsing and copying to lib/prelink-support.exp.
	Replace build_executable by build_executable_own_libs's function
	build_executable_own_libs.
	(prelinkNO): Create new stub to call prelink_no.
	(prelinkYES): Create new stub to call prelink_yes.
	(test_attach): Rename calls of copy to file_copy.
	(section_get, prelinkNO_run, prelinkNO, prelinkYES, symlink_resolve)
	(copy): Move to ...
	* lib/prelink-support.exp: ... a new file.  Rename prelinkNO to
	prelink_no, prelinkYES to prelink_yes, copy to file_copy.
	* gdb.base/prelink.exp: Disable testcase also for is_remote and
	skip_shlib_tests.  Load prelink-support.exp.  Replace gdb_compile with
	special flags by gdb_compile_shlib.  Replace second gdb_compile by
	build_executable_own_libs.  Replace "prelink -R" execution by a call of
	prelink_yes.  Replace "prelink -u" and second "prelink -R" execution by
	a second call of prelink_yes.  Replace restart commands by
	clean_restart.
	(prelink): Rename to ...
	(seen displacement message): ... this test.  Extend its expectation
	strictness.
2010-07-05 18:01:53 +00:00
Jan Kratochvil 86e4bafc3b gdb/
* auxv.c (memory_xfer_auxv): Update attach comment.
	* solib-svr4.c (svr4_special_symbol_handling): Remove the call to
	svr4_relocate_main_executable.
	(svr4_solib_create_inferior_hook): Make the call to
	svr4_relocate_main_executable unconditional.

gdb/testsuite/
	* gdb.base/attach-pie-misread.exp, gdb.base/attach-pie-misread.c: New.
	* gdb.base/break-interp.exp (reach, test_core, test_ld): Require each
	displacement message exactly once.
2010-07-05 18:00:40 +00:00
Jan Kratochvil 3cd07d204b gdb/
* auxv.c (ld_so_xfer_auxv): Do not error on failed read of data_address.
2010-07-05 17:58:56 +00:00
Jan Kratochvil 0a1e94c73e gdb/
Fix attaching to PIEs prelinked on the disk after the process was
	started.
	* solib-svr4.c (svr4_exec_displacement): New variable arch_size.
	Verify it against bfd_get_arch_size.  Try to match arbitrary
	displacement for the phdrs comparison.

gdb/testsuite/
	* gdb.base/break-interp.exp: Run $binpie with new value "ATTACH", new
	code for it.  New variable relink_args.
	(prelinkYES): Call prelinkNO.
	(test_attach): Accept new parameter relink_args.  Re-prelink the binary
	in such case.  Move the core code to ...
	(test_attach_gdb): ... a new function.  Send GDB command "file".
	Extend expected "Attaching to " string.
2010-07-05 17:57:50 +00:00
Jan Kratochvil 37cc8bfee6 gdb/testsuite/
* gdb.base/break-interp.exp (prelinkYES): XFAIL on `Not enough room to
	add .dynamic entry'.
2010-06-29 21:48:10 +00:00
Doug Evans de6a04210c * gdb.base/break-interp.exp (reach): Relax expected output a bit. 2010-06-28 16:54:11 +00:00
Michael Snyder 27d3a1a248 2010-06-01 Michael Snyder <msnyder@vmware.com>
* gdb.base/arithmet.exp: Use gdb_test_no_output.
	* gdb.base/arrayidx.exp: Ditto.
	* gdb.base/attach.exp: Ditto.
	* gdb.base/auxv.exp: Ditto.
	* gdb.base/bigcre.exp: Ditto.
	* gdb.base/break-always.exp: Ditto.
	* gdb.base/break-interp.exp: Ditto.
	* gdb.base/break.exp: Ditto.
	* gdb.base/breakpoint-shadow.exp: Ditto.
	* gdb.base/call-ar-st.exp: Ditto.
	* gdb.base/call-sc.exp: Ditto.
	* gdb.base/call-signal-resume.exp: Ditto.
	* gdb.base/callfuncs.exp: Ditto.
	* gdb.base/catch-syscall.exp: Ditto.
	* gdb.base/charset.exp: Ditto.
	* gdb.base/code-expr.exp: Ditto.
	* gdb.base/commands.exp: Ditto.
	* gdb.base/cond-expr.exp: Ditto.
	* gdb.base/condbreak.exp: Ditto.
	* gdb.base/cursal.exp: Ditto.
	* gdb.base/cvexpr.exp: Ditto.
	* gdb.base/default.exp: Ditto.
	* gdb.base/del.exp: Ditto.
	* gdb.base/detach.exp: Ditto.
	* gdb.base/display.exp: Ditto.
	* gdb.base/ena-dis-br.exp: Ditto.
	* gdb.base/eval-skip.exp: Ditto.
	* gdb.base/foll-fork.exp: Ditto.
	* gdb.base/foll-vfork.exp: Ditto.
	* gdb.base/frame-args.exp: Ditto.
	* gdb.base/funcargs.exp: Ditto.
	* gdb.base/gcore-buffer-overflow.exp: Ditto.
	* gdb.base/gdbvars.exp: Ditto.
	* gdb.base/help.exp: Ditto.
	* gdb.base/ifelse.exp: Ditto.
	* gdb.base/included.exp: Ditto.
	* gdb.base/list.exp: Ditto.
	* gdb.base/macscp.exp: Ditto.
	* gdb.base/maint.exp: Ditto.
	* gdb.base/multi-fork.exp: Ditto.
	* gdb.base/overlays.exp: Ditto.
	* gdb.base/page.exp: Ditto.
	* gdb.base/pending.exp: Ditto.
	* gdb.base/pointers.exp: Ditto.
	* gdb.base/pr11022.exp: Ditto.
	* gdb.base/prelink.exp: Ditto.
	* gdb.base/printcmds.exp: Ditto.
	* gdb.base/psymtab.exp: Ditto.
	* gdb.base/randomize.exp: Ditto.
	* gdb.base/relational.exp: Ditto.
	* gdb.base/relocate.exp: Ditto.
	* gdb.base/remote.exp: Ditto.
	* gdb.base/sepdebug.exp: Ditto.
	* gdb.base/set-lang-auto.exp: Ditto.
	* gdb.base/setshow.exp: Ditto.
	* gdb.base/setvar.exp: Ditto.
	* gdb.base/signals.exp: Ditto.
	* gdb.base/signull.exp: Ditto.
	* gdb.base/sigstep.exp: Ditto.
	* gdb.base/sizeof.exp: Ditto.
	* gdb.base/solib-disc.exp: Ditto.
	* gdb.base/store.exp: Ditto.
	* gdb.base/structs.exp: Ditto.
	* gdb.base/structs2.exp: Ditto.
	* gdb.base/subst.exp: Ditto.
	* gdb.base/term.exp: Ditto.
	* gdb.base/trace-commands.exp: Ditto.
	* gdb.base/unwindonsignal.exp: Ditto.
	* gdb.base/valgrind-db-attach.exp: Ditto.
	* gdb.base/varargs.exp: Ditto.
	* gdb.base/watch-cond.exp: Ditto.
	* gdb.base/watch_thread_num.exp: Ditto.
	* gdb.base/watchpoint-cond-gone.exp: Ditto.
	* gdb.base/watchpoint.exp: Ditto.
	* gdb.base/whatis-exp.exp: Ditto.
2010-06-01 21:29:21 +00:00
Jan Kratochvil 8e1d0c49c1 gdb/testsuite/
* gdb.base/break-interp.exp: Remove $exec.debug safety removal.
	* gdb.base/sepdebug.exp: Remove .debug subdirectory handling.  New
	variable different_dir. Move debugfile into a full directory pathname
	under DIFFERENT_DIR.
	* lib/gdb.exp (separate_debug_filename): Remove.
	(gdb_gnu_strip_debug): No longer call separate_debug_filename.  Remove
	variable debug_dir and mkdir of it.  Update function comments.
2010-05-02 09:08:59 +00:00
Jan Kratochvil 09248348a7 gdb/testsuite/
* gdb.base/break-interp.exp (test_core, test_attach, test_ld): Add
	" as $displacement" to "seen displacement message".
2010-03-28 19:08:24 +00:00
Doug Evans d7d158ed1d * gdb.base/break-interp.exp (prelinkNO): Handle prelink binaries
named /usr/sbin/prelink<foo>.
2010-03-19 17:57:17 +00:00
Jan Kratochvil ccf2624776 gdb/
* solib-svr4.c (LM_ADDR_CHECK) <info_verbose>: Use printf_unfiltered
	for the PIC displacement, print also the displacement value.
	(svr4_exec_displacement):  Print DISPLACEMENT if INFO_VERBOSE.

gdb/testsuite/
	* gdb.base/break-interp.exp: Create new displacement parameter value
	for the test_ld calls.
	(reach): New parameter displacement, verify its content.  New push of
	pf_prefix "reach-$func:".  Import global expect_out.
	(test_core): New parameter displacement, verify its content.  New push
	of pf_prefix "core:".  New command "set verbose on".  Import global
	expect_out.
	(test_attach): New parameter displacement, verify its content.  New
	push of pf_prefix "attach:".  New command "set verbose on".  Import
	global expect_out.
	(test_ld): New parameter displacement, pass it to the reach, test_core
	and test_attach calls and verify its content in the "ld.so exit" test.
	* gdb.base/prelink.exp: Remove gdb_exit and final return.
	(prelink): Update expected text, use gdb_test.
2010-03-11 22:07:03 +00:00
Jan Kratochvil 40b27cdc59 gdb/testsuite/
* gdb.base/break-interp.exp: Use [file tail $filename] to omit any
	absolute directory pathnames in gdb.sum file.
2010-01-27 20:53:22 +00:00
Jan Kratochvil bbfba9ed15 gdb/testsuite/
* gdb.base/break-interp-lib.c: Include unistd.h, assert.h and stdio.h.
	(libfunc): New parameter action.  Implement also selectable "sleep".
	* gdb.base/break-interp-main.c: Include assert.h.
	(libfunc): New parameter action.
	(main): New parameters argc and argv.  Assert argc.  Pass argv.
	* gdb.base/break-interp.exp (test_core): Pass the "segv" argument.
	(test_attach): New proc.
	(test_ld): Pass new "segv" exec parameter.  Call also test_attach.
	* lib/gdb.exp (core_find): New parameter arg.  Pass it to $binfile.
2010-01-14 21:12:00 +00:00
Jan Kratochvil 61f0d76280 gdb/
* solib-svr4.c (scan_dyntag): Remove variable dyn_addr.  New variable
	target_section.  Find SECT in current_target_sections, gdb_assert it.
	(elf_lookup_lib_symbol): Pass the binary file if given symfile_objfile.
	New variable abfd.
	* symtab.c (lookup_objfile_from_block): Return the binary file instead
	of separate debug info file.

gdb/testsuite/
	* gdb.base/break-interp.exp (test_core): New proc.
	(test_ld): Call it.
2010-01-14 21:09:05 +00:00
Jan Kratochvil 06a6f27066 gdb/testsuite/
* gdb.base/break-interp-main.c, gdb.base/break-interp-lib.c: New.
	* gdb.base/break-interp.exp: Exit on skip_shlib_tests.  Change $srcfile.
	New variables $binfile_lib and $srcfile_lib.  Call get_compiler_info
	and gdb_compile_shlib.  Use new -Wl compiler options.
	(dl bt, main bt): New tests.
2010-01-14 21:04:53 +00:00
Jan Kratochvil 51bee8e9b7 gdb/
Support PIEs with no symfile_objfile.
	* exec.c (print_section_info <abfd == exec_bfd>): Relocate Entry point.
	* solib-svr4.c (svr4_relocate_main_executable <exec_bfd>): New block.

gdb/testsuite/
	Support PIEs with no symfile_objfile.
	* gdb.base/break-interp.exp: New argument at the test_ld calls.
	(test_ld): New parameter trynosym.
	(test_ld <$trynosym>): New block.
2010-01-14 21:01:25 +00:00
Jan Kratochvil b8040f198c gdb/
* solib-svr4.c (svr4_relocate_main_executable): Move the static exec
	code part to ...
	(svr4_static_exec_displacement): ... a new function.
	(svr4_exec_displacement): New function.
	(svr4_relocate_main_executable): Call svr4_exec_displacement.  Allocate
	new_offsets using alloca now.  Remove variable old_chain and changed.
	Call objfile_relocate unconditionally now.

gdb/testsuite/
	* gdb.base/break-interp.exp: New file.
2010-01-14 20:48:26 +00:00