2010-07-27 Phil Muldoon <pmuldoon@redhat.com>
* python/py-value.c (valpy_call): New Function. 2010-07-27 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-value.exp (test_inferior_function_call): New function. * gdb.python/py-value.c (func1): New function. (func2): Likewise. 2010-07-27 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Values From Inferior): Add value inferior function call description.
This commit is contained in:
parent
9691462bab
commit
5374244e7a
7 changed files with 126 additions and 1 deletions
|
@ -15,6 +15,8 @@
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
struct s
|
||||
{
|
||||
int a;
|
||||
|
@ -44,6 +46,16 @@ void ptr_ref(int*& rptr_int)
|
|||
}
|
||||
#endif
|
||||
|
||||
void func1 ()
|
||||
{
|
||||
printf ("void function called\n");
|
||||
}
|
||||
|
||||
int func2 (int arg1, int arg2)
|
||||
{
|
||||
return arg1 + arg2;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
|
@ -53,6 +65,8 @@ main (int argc, char *argv[])
|
|||
PTR x = &s;
|
||||
char st[17] = "divide et impera";
|
||||
char nullst[17] = "divide\0et\0impera";
|
||||
void (*fp1) (void) = &func1;
|
||||
int (*fp2) (int, int) = &func2;
|
||||
const char *sptr = "pointer";
|
||||
const char *embed = "embedded x\201\202\203\204";
|
||||
int a[3] = {1,2,3};
|
||||
|
@ -63,6 +77,8 @@ main (int argc, char *argv[])
|
|||
s.a = 3;
|
||||
s.b = 5;
|
||||
u.a = 7;
|
||||
(*fp1) ();
|
||||
(*fp2) (10,20);
|
||||
|
||||
#ifdef __cplusplus
|
||||
ptr_ref(ptr_i);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue