Commit Graph

17 Commits

Author SHA1 Message Date
Chris Moller 8bd10a10b3 PR 10179
* symtab.c (rbreak_command): Added code to include a filename
specification in the rbreak argument.
* NEWS: Added a brief description of filename-qualified rbreak.
* gdb.base/Makefile.in (EXECUTABLES): Added pr10179.
* gdb.base/pr10179-a.c:
* gdb.base/pr10179-b.c:
* gdb.base/pr10179.exp: New files.
* gdb.texinfo (Setting Breakpoints): Added description of
filename-qualified rbreak.
* refcard.tex (Breakpoints and Watchpoints): Added brief
description of filename-qualified rbreak.
2010-04-23 12:08:07 +00:00
Sergio Durigan Junior a96d9b2e9a Implementing catch syscall.
* amd64-linux-tdep.c: Include xml-syscall.h header, define the XML
syscall name for the architecture.
(amd64_linux_get_syscall_number): New function.
(amd64_linux_init_abi): Register the correct functions for syscall
catchpoint; set the correct syscall file name.
* breakpoint.c: New include: xml-syscall.h.
(set_raw_breakpoint_without_location): Setting the parameters
for the catch syscall feature.
(insert_catch_syscall): New.
(remove_catch_syscall): New.
(breakpoint_hit_catch_syscall): New.
(print_it_catch_syscall): New.
(print_one_catch_syscall): New.
(print_mention_catch_syscall): New.
(catch_syscall_breakpoint_ops): New.
(syscall_catchpoint_p): New.
(create_catchpoint_without_mention): New.
(create_catchpoint): Modified in order to use
create_catchpoint_without_mention.
(create_syscall_event_catchpoint): New.
(clean_up_filters): New.
(catch_syscall_split_args): New.
(catch_syscall_command_1): New.
(delete_breakpoint): Add cleanup for catch syscall.
(is_syscall_catchpoint_enabled): New.
(catch_syscall_enabled): New.
(catching_syscall_number): New.
(catch_syscall_completer): New completer function.
(add_catch_command): Add the completer function for catchpoints.
* breakpoint.h (syscalls_to_be_caught): New vector.
(catch_syscall_enabled): New.
(catching_syscall_number): New.
* gdbarch.c: Regenerated.
* gdbarch.h: Regenerated.
* gdbarch.sh: Add syscall catchpoint functions and structures.
(get_syscall_number): New.
(UNKNOWN_SYSCALL): New definition.
* i386-linux-nat.c (i386_linux_resume): Select the proper request
to be made for ptrace() considering if we are catching syscalls
or not.
* i386-linux-tdep.c: Include xml-syscall.h header, define the XML
syscall name for the architecture.
(i386_linux_get_syscall_number): New.
(i386_linux_init_abi): Register the correct functions for syscall
catchpoint; set the correct syscall file name.
* inf-child.c (inf_child_set_syscall_catchpoint): New.
(inf_child_target): Assign default values to target_ops.
* inf-ptrace.c (inf_ptrace_resume): Select the proper request
to be made for ptrace() considering if we are catching syscalls
or not.
* inferior.h (struct inferior): Included new variables
any_syscall_count, syscalls_counts and total_syscalls_count,
used to keep track of requested syscall catchpoints.
* infrun.c (resume): Add syscall catchpoint.
(deal_with_syscall_event): New.
(handle_inferior_event): Add syscall entry/return events.
(inferior_has_called_syscall): New.
* linux-nat.c: Define some helpful variables to track wether we have
support for the needed ptrace option.
(linux_test_for_tracesysgood): New.
(linux_supports_tracesysgood): New.
(linux_enable_tracesysgood): New.
(linux_enable_event_reporting): Save the current used ptrace
options.
(linux_child_post_attach): Calling linux_enable_tracesysgood.
(linux_child_post_startup_inferior): Likewise.
(linux_child_set_syscall_catchpoint): New function.
(linux_handle_extended_wait): Handle the case which the inferior stops
because it has called or returned from a syscall.
(linux_target_install_ops): Install the necessary functions to handle
syscall catchpoints.
* linux-nat.h (struct lwp_info): Include syscall_state into the
structure, which indicates if we are in a syscall entry or return.
* ppc-linux-tdep.c: Include xml-syscall.h header, define the XML
syscall filename for the arch.
(ppc_linux_get_syscall_number): New.
(ppc_linux_init_abi): Register the correct functions for syscall
catchpoint; setting the correct name for the XML syscall file.
* target.c (update_current_target): Update/copy functions related to
syscall catchpoint.
(target_waitstatus_to_string): Add syscall catchpoint entry/return
events.
* target.h (struct target_waitstatus): Add syscall number.
(struct syscall): New struct to hold information about syscalls
in the system.
(struct target_ops): Add ops for syscall catchpoint.
(inferior_has_called_syscall): New.
(target_set_syscall_catchpoint): New.
* xml-support.c (xml_fetch_content_from_file): New function,
transferred from xml-tdesc.c.
* xml-support.h (xml_fetch_content_from_file): New.
* xml-tdesc.c (fetch_xml_from_file): Function removed;
transferred to xml-support.c.
(file_read_description_xml): Updated to use the new
xml_fetch_content_from_file function.
* syscalls/gdb-syscalls.dtd: New definition file for syscall's XML
support.
* syscalls/amd64-linux.xml: New file containing information about
syscalls for GNU/Linux systems that use amd64 architecture.
* syscalls/i386-linux.xml: New file containing information about
syscalls for GNU/Linux systems that use i386 architecture.
* syscalls/ppc-linux.xml: New file containing information about
syscalls for GNU/Linux systems that use PPC architecture.
* syscalls/ppc64-linux.xml: New file containing information about
syscalls for GNU/Linux systems that use PPC64 architecture.
* xml-syscall.c: New file containing functions for manipulating
syscall's XML files.
* xml-syscall.h: New file, exporting the functions above mentioned.
* Makefile.in: Support for relocatable GDB datadir and XML
syscall.
* NEWS: Added information about the catch syscall feature.
* doc/gdb.texinfo (Set Catchpoints): Documentation about the new
feature.
* testsuite/Makefile.in: Inclusion of catch-syscall object.
* testsuite/gdb.base/catch-syscall.c: New file.
* testsuite/gdb.base/catch-syscall.exp: New file.
2009-09-15 03:30:08 +00:00
Paul N. Hilfinger d8679d841d New test to check that GDB does not crash due to memory corruption
when a reload caused by a change in an executable invalidates
a breakpoint condition.
2004-01-29 11:15:44 +00:00
Daniel Jacobowitz 696d5a5b84 * Makefile.in (ALL_SUBDIRS): New variable.
(subdirs, clean, distclean): Use it.
	* gdb.arch/Makefile.in: Clean up Makefile.  Remove rules for
	regenerating Makefile, since it is generated from the top level.
	* gdb.asm/Makefile.in: Likewise.
	* gdb.base/Makefile.in: Likewise.
	* gdb.c++/Makefile.in: Likewise.
	* gdb.disasm/Makefile.in: Likewise.
	* gdb.java/Makefile.in: Likewise.
	* gdb.mi/Makefile.in: Likewise.
	* gdb.threads/Makefile.in: Likewise.
	* gdb.trace/Makefile.in: Likewise.
2003-01-09 18:50:28 +00:00
Kevin Buettner 3207ec212c Add new step-line test. 2001-03-27 01:32:45 +00:00
Jason Molenda a0b3c4fd32 import gdb-1999-08-02 snapshot 1999-08-02 23:48:37 +00:00
Jason Molenda 9846de1bb5 import gdb-1999-07-07 pre reformat 1999-07-07 17:31:57 +00:00
Jason Molenda cce74817d9 import gdb-1999-06-07 snapshot 1999-06-07 19:19:32 +00:00
Stan Shebs cd0fc7c3eb import gdb-1999-05-10 1999-05-11 13:35:55 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Fred Fish 5762d8c6f3 * gdb.base/callfuncs.exp (do_function_calls): Add alpha-dec-osf2*
clear_xfail for "p t_float_values2(3.14159,float_val2)" for gcc
	compiled test.
	* gdb.base/opaque.exp (setup_xfail_on_opaque_pointer):
	Add mips-sgi-irix5* xfail for not gcc compiled.
	* gdb.base/Makefile.in (nodebug.o):  Also create nodebug.ci.
	* gdb.base/nodebug.exp: Add mips-sgi-irix5 xfail when not gcc compiled for
	"p top", "whatis top", "p middle", and "whatis middle".
	* gdb.base/whatis.exp: Add mips-sgi-irix* xfail for
	"whatis signed char" for not gcc compiled.
	* gdb.base/setvar.exp: Add mips-sgi-irix4* xfail (works on irix5) for
	"set variable signed char=-1 (-1)" and
	"set variable signed char=0xFF (0xFF)" for not gcc compiled.
	* gdb.base/funcargs.exp (float_and_integral_args):
	Add mips-sgi-irix5* xfail for "run to call2a" for not gcc compiled.
	Add mips-sgi-irix* xfail when not gcc compiled for
	"continue to call2b".
	Add mips-sgi-irix4* xfail (works with irix5) when gcc compiled for
	"continue to call2g".
	(discard_and_shuffle): Add mips-sgi-irix5* xfail whn not gcc compiled for
	"backtrace from call6a"
	(shuffle_round_robin): Add mips-sgi-irix* xfail when not gcc compiled for
	"backtrace from call7k".
	Add mips-sgi-irix5* xfail when not gcc compiled for
	"backtrace from call7a".
	(localvars_after_alloca):  Fix gdb_test cmds for
	"print * after runto ...".
	Remove rs6000-*-* xfails for
	"print i after runto localvars_after_alloca" and
	"print l after runto localvars_after_alloca"
	for all compilers.
	* gdb.base/exprs.exp: Add mips-sgi-irix4* xfails (works with irix5),
 	when not compiled with gcc, for:
	"print signed char == (minus)",
	"print signed char != (minus)",
	"print signed char < (minus)",
	"print signed char > (minus)".
	* gdb.base/callfuncs.exp (do_function_calls):
	Add mips-sgi-irix* xfail, when compiled with native compiler, for
	"call inferior func with struct - returns char *".
	* gdb.base/return.exp (return_tests): Change xfail for
	"correct value returned double test" to include Solaris 2.4.
	* gdb.base/funcargs.exp (float_and_integral_args):
	Add sparc-sun-solaris2* xfail for "print f1 after run to call2a".
1995-08-28 09:44:14 +00:00
Fred Fish ce102e96e6 * gdb.base/Makefile.in: Add action to .c.o transformation
rule that generates a .ci file for each .o file and remove
	explicit .c.o rules except for callfuncs.o.
	* gdb.c++/Makefile.in:  Add .cc.o transformation rule that
	generates a .ci file for each .o file and remove explicit
	.cc.o rules.
	(clean): Remove *.tmp *.ci files.
	(EXECUTABLES): Remove templ-info.exp.
	* gdb.base/compiler.c: New file.
	* gdb.c++/compiler.cc: New file
	* gdb.base/scope.exp: Source gdb.base/scope.ci.
	Change rs6000-*-* xfail for
	"print 'scope0.c'::filelocal_ro" and
	"print 'scope1.c'::filelocal" and
	"print 'scope1.c'::filelocal_bss" and
	"print 'scope1.c'::filelocal_ro" and
	"print 'scope1.c'::foo::funclocal" and
	"print 'scope1.c'::foo::funclocal_ro" and
	"print 'scope1.c'::bar::funclocal" and
	"print 'scope0.c'::filelocal_ro" and
	"print 'scope1.c'::filelocal at foo" and
	"print 'scope1.c'::filelocal_bss at foo" and
	"print 'scope1.c'::filelocal_ro at foo" and
	"print 'scope1.c'::foo::funclocal at foo" and
	"print 'scope1.c'::foo::funclocal_bss at foo" and
	"print 'scope1.c'::foo::funclocal_ro at foo" and
	"print 'scope1.c'::bar::funclocal at foo" and
	"print 'scope0.c'::filelocal_ro" and
	"print 'scope1.c'::filelocal" and
	"print 'scope1.c'::filelocal_bss" and
	"print 'scope1.c'::filelocal_ro" and
	"print 'scope1.c'::foo::funclocal" and
	"print 'scope1.c'::foo::funclocal_bss" and
	"print 'scope1.c'::foo::funclocal_ro" and
	"print 'scope1.c'::bar::funclocal" and
	"print 'scope1.c'::bar::funclocal_bss"
	to only be xfail'd when not compiled with gcc.
	Add rs6000-*-* xfail for
	"print 'scope0.c'::filelocal_bss before run"
	when compiled with gcc.
	(test_at_main): Add rs6000-*-* xfail for
	"print filelocal_ro in test_at_main"
	when compiled with gcc.
	* gdb.base/ptype.exp: Source gdb.base/ptype.ci.
 	Add rs6000-*-aix* xfail for
	"whatis unnamed typedef'd enum (compiler bug in IBM's xlc)" and
	"ptype t_char_array",  not compiled with gcc.
	* gdb.base/list.exp (test_list_function):  Add rs6000-*-*
	xfail for "list foo (in include file)" when gcc	compiled.
	* gdb.base/funcargs.exp: Source gdb.base/funcargs.ci
 	(integral_args): Add rs6000-*-* xfail for
	"run to call0a" if not compiled with gcc.
	(unsigned_integral_args): Add rs6000-*-* xfail for
	"run to call1a" if not compiled with gcc.
	(float_and_integral_args):  Add rs6000-*-* xfail for
	"run to call2a" if not compiled with gcc and for
	"continue to call2b" for any compiler.
	Add rs6000-*-* xfail to
	"print f1 after run to call2a" for gcc compiled.
	(discard_and_shuffle): Add rs6000-*-* xfail for
	"run to call6a".
	(shuffle_round_robin): Add rs6000-*-* xfail for
	"backtrace from call7a" if not compiled with gcc.
	Add rs6000-*-* xfail for
	"backtrace from call7b" if compiled with gcc.
	(call_after_alloca): Add rs6000-*-* xfail for
	"print c in call_after_alloca" and
	"print s in call_after_alloca" and
	"backtrace from call_after_alloca_subr"
	if not compiled with gcc.
	(localvars_in_indirect_call): Add rs6000-*-* xfail for
	"print c in localvars_in_indirect_call" and
	"print c in localvars_in_indirect_call" and
	"backtrace in indirectly called function" and
	"stepping into indirectly called function"
	if not compiled with gcc.
	(localvars_after_alloca): Add rs6000-*-* xfail for
	"print c after runto localvars_after_alloca" and
	"print s after runto localvars_after_alloca" and
	"print i after runto localvars_after_alloca" and
	"print l after runto localvars_after_alloca"
	for all compilers.
	* gdb.base/whatis.exp: Source gdb.base/whatis.ci rather
	than whatis-info.exp.
	* gdb.base/opaque.exp: Source gdb.base/opaque0.ci rather
	than opaque-info.exp.
	Setup rs6000-*-* xfail for
	"ptype on opaque struct pointer (statically)" and
	"ptype on opaque struct pointer (dynamically)" when
	not compiled with gcc.
	* gdb.base/callfuncs.exp: Source gdb.base/callfuncs.ci
	rather than callf-info.exp.
	(do_function_calls):  Add clear_xfail for rs6000-*-* for
	"p t_float_values2(3.14159,float_val2)".  Seems to work
	fine there, both with xlc and gcc.  Need to find out what
	it is doing right and fix other platforms.
	* gdb.base/callfuncs.exp: Add rs6000-*-* xfail for
	"call inferior func with struct - returns int",
	"call inferior func with struct - returns long",
	"call inferior func with struct - returns float",
	"call inferior func with struct - returns double",
	"call inferior func with struct - returns char *",
	but only if not gcc compiled (presumes xlc compiled).
	Change rs6000-*-* xfails for
	"call inferior func with struct - returns char" and
	" call inferior func with struct -  returns short" to only
	xfail if not using gcc.
	(clean mostlyclean):  Remove *.ci and *.tmp files.
	* gdb.c++/templates.exp: Source gdb.c++/templates.ci rather
	than templ-info.exp.
	* gdb.base/langs.exp:  Source gdb.base/langs.ci.
	Add rs6000-*-* xfail for "up to foo in langs.exp"
	"up to cppsub_ in langs.exp" and "up to fsub in langs.exp"
 	when not gcc compiled.
1995-08-16 07:37:19 +00:00
Peter Schauer 96fd3d08f9 * gdb.base/Makefile.in (clean): Remove callf-info.exp. 1995-07-29 21:24:39 +00:00
J.T. Conklin 65424cda04 * Makefile.in, gdb.{base,c++,chill}/Makefile.in (GDB, GDBFLAGS):
Removed, these values are set by lib/gdb.exp.
* lib/gdb.exp: If GDBFLAGS is unset, set it to -nx.
1995-02-16 18:41:54 +00:00
J.T. Conklin be813d0223 * Makefile.in, gdb.{base,c++,chill}/Makefile.in (GDB): If a gdb
executable is not in the tree and host != target, use sed and
  program_transform_name to determine the gdb name used by the
  target.
1995-02-16 00:35:53 +00:00
Stan Shebs ef44eed173 Reorganized GDB tests - base 1994-06-07 01:57:15 +00:00