This is the mail archive of the
mailing list for the GDB project.
Re: Call function in gdb
- To: hjl at lucon dot org (H.J. Lu)
- Subject: Re: Call function in gdb
- From: jtc at redback dot com (J.T. Conklin)
- Date: 12 Nov 1999 14:11:33 -0800
- Cc: gdb at sourceware dot cygnus dot com (GDB)
- References: <19991112214208.CAB231B493@ocean.lucon.org>
- Reply-To: jtc at redback dot com
>>>>> "hjl" == H J Lu <firstname.lastname@example.org> writes:
hjl> Hi, With old gdb, I can do
hjl> (gdb) call foo (1)
hjl> Now with gdb in CVS, I got "segmentation fault". Any ideas, BTW,
hjl> I am using Linux/i386.
You don't offer much to go on. For what it's worth, calling inferior
functions with a freshly built-from-the-last-snapshot NetBSD/i386 gdb
with the following test code:
return x + 1;
appears to work fine.
./gdb -nx a.out
GNU gdb 19991108
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-unknown-netbsd1.3E"...
(gdb) break main
Breakpoint 1 at 0x1804: file foo.c, line 10.
Starting program: /sandbox/gdb/gdb-sync3/=i386-netbsd/gdb/a.out
Breakpoint 1, main () at foo.c:10
10 exit (0);
(gdb) call foo(1)
$1 = 2