This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA/testsuite] stack check


Test that GDB is able to get a correct backtrace when the application
is compiled with -fstack-check. Related to:
http://sourceware.org/ml/gdb-patches/2008-09/msg00005.html


2008-09-01  Jerome Guitton  <guitton@adacore.com>

	* (stack-checking.c, stack-checking.exp): New testcase.


OK to apply?

Thanks,
- Jerome






/*
  Test file to be compiled with -fstack-check, for testing "bt" against
  different stack checking prologue sequences.
 */

int i = 0;

void
small_frame ()
{
  i++; /* set breakpoint here */
}

void medium_frame ()
{
  char S [16384];
  small_frame ();
}

void big_frame ()
{
  char S [524188];
  small_frame ();
}

void
main ()
{
  small_frame ();
  medium_frame ();
  big_frame ();
}

Attachment: stack-checking.exp
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]