projects
/
binutils-gdb.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
gdb: move cheap pointer equality check earlier in types_equal
[binutils-gdb.git]
/
gdb
/
testsuite
/
gdb.multi
/
bkpt-multi-exec.c
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <unistd.h>
4
#include <string.h>
5
#include <limits.h>
6
7
int
main
(
int
argc
,
char
**
argv
)
8
{
9
char
prog
[
PATH_MAX
];
10
int
len
;
11
12
strcpy
(
prog
,
argv
[
0
]);
13
len
=
strlen
(
prog
);
14
/* Replace "bkpt-multi-exec" with "crashme". */
15
memcpy
(
prog
+
len
-
15
,
"crashme"
,
7
);
16
prog
[
len
-
8
] =
0
;
17
18
printf
(
"foll-exec is about to execl(crashme)...
\n
"
);
19
20
execl
(
prog
,
21
prog
,
22
(
char
*)
0
);
23
}