Clarify "list" output when specified lines are ambiguous
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / call-strs.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4
5 #include "../lib/unbuffer_output.c"
6
7 char buf[100];
8 char bigbuf[1000];
9 char * s;
10
11 char * str_func1(char *s1)
12 {
13 printf("first string arg is: %s\n", s1);
14 strcpy(bigbuf, s1);
15 return bigbuf;
16 }
17
18 char * str_func(
19 char * s1,
20 char * s2,
21 char * s3,
22 char * s4,
23 char * s5,
24 char * s6,
25 char * s7)
26 {
27 printf("first string arg is: %s\n", s1);
28 printf("second string arg is: %s\n", s2);
29 printf("third string arg is: %s\n", s3);
30 printf("fourth string arg is: %s\n", s4);
31 printf("fifth string arg is: %s\n", s5);
32 printf("sixth string arg is: %s\n", s6);
33 printf("seventh string arg is: %s\n", s7);
34 strcpy(bigbuf, s1);
35 strcat(bigbuf, s2);
36 strcat(bigbuf, s3);
37 strcat(bigbuf, s4);
38 strcat(bigbuf, s5);
39 strcat(bigbuf, s6);
40 strcat(bigbuf, s7);
41 return bigbuf;
42 }
43
44 char *
45 link_malloc ()
46 {
47 return (char*) malloc (1);
48 }
49
50 int main()
51 {
52 gdb_unbuffer_output ();
53
54 s = &buf[0];
55 strcpy(buf, "test string");
56 str_func("abcd", "efgh", "ijkl", "mnop", "qrst", "uvwx", "yz12");
57 str_func1("abcd");
58 return 0;
59 }
60
This page took 0.031244 seconds and 4 git commands to generate.