aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/break-interp-main.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-01-14 21:12:00 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-01-14 21:12:00 +0000
commitbbfba9ed150f56ba5b09360314b30381a865ff5c (patch)
treee19bd8850f4c2d90c1a662b736907121b67939b8 /gdb/testsuite/gdb.base/break-interp-main.c
parent61f0d76280d963a9ecf3a3a525dae7ac21050636 (diff)
downloadgdb-bbfba9ed150f56ba5b09360314b30381a865ff5c.zip
gdb-bbfba9ed150f56ba5b09360314b30381a865ff5c.tar.gz
gdb-bbfba9ed150f56ba5b09360314b30381a865ff5c.tar.bz2
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.
Diffstat (limited to 'gdb/testsuite/gdb.base/break-interp-main.c')
-rw-r--r--gdb/testsuite/gdb.base/break-interp-main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.base/break-interp-main.c b/gdb/testsuite/gdb.base/break-interp-main.c
index 57b81f6..e12ec2b 100644
--- a/gdb/testsuite/gdb.base/break-interp-main.c
+++ b/gdb/testsuite/gdb.base/break-interp-main.c
@@ -15,12 +15,16 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-extern void libfunc (void);
+#include <assert.h>
+
+extern void libfunc (const char *action);
int
-main (void)
+main (int argc, char **argv)
{
- libfunc ();
+ assert (argc == 2);
+
+ libfunc (argv[1]);
return 0;
}