gdb.python/{py-framefilter-mi,py-framefilter}.c C++ify

This adjusts:

 gdb.python/{py-framefilter-mi,py-framefilter}.c

to make them buildable as C++ programs.

gdb/testsuite/ChangeLog:

	* gdb.python/py-framefilter-mi.c (funca): Add casts.
	* gdb.python/py-framefilter.c.c (funca, func2): Add casts.
This commit is contained in:
Pedro Alves 2020-09-17 23:33:42 +01:00
parent 81f904895e
commit d4bcee5ccc
3 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2020-09-17 Pedro Alves <pedro@palves.net>
* gdb.python/py-framefilter-mi.c (funca): Add casts.
* gdb.python/py-framefilter.c.c (funca, func2): Add casts.
2020-09-17 Pedro Alves <pedro@palves.net>
* gdb.mi/var-cmd.c (do_anonymous_type_tests): Add cast.

View File

@ -83,8 +83,8 @@ void funca(void)
fb.f = 42;
fb.s = 19;
bf = malloc (sizeof (foobar));
bf->nothing = malloc (128);
bf = (foobar *) malloc (sizeof (foobar));
bf->nothing = (char *) malloc (128);
bf->nothing = "Bar Foo";
bf->f = 24;
bf->s = 91;

View File

@ -84,8 +84,8 @@ void funca(void)
fb.f = 42;
fb.s = 19;
bf = alloca (sizeof (foobar));
bf->nothing = alloca (128);
bf = (foobar *) alloca (sizeof (foobar));
bf->nothing = (char *) alloca (128);
bf->nothing = "Bar Foo";
bf->f = 24;
bf->s = 91;
@ -112,8 +112,8 @@ int func2(int f)
fb.f = 84;
fb.s = 38;
bf = alloca (sizeof (foobar));
bf->nothing = alloca (128);
bf = (foobar *) alloca (sizeof (foobar));
bf->nothing = (char *) alloca (128);
bf->nothing = "Elided Bar Foo";
bf->f = 48;
bf->s = 182;