This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Running Helloworld on PSIM
- To: gdb at sourceware dot cygnus dot com
- Subject: Running Helloworld on PSIM
- From: Xianglong Huang <xlhuang at cs dot umass dot edu>
- Date: Tue, 03 Apr 2001 22:34:52 -0400
Hi,
I have been trying to compile a helloworld program under Power PC (Mac
G4) Linux 7.0 by gcc-2.95.3.
The c file is as follows
[ppc]$ cat helloworld.c
main()
{printf("Hello world\n");
return 0;
}
Here is the command line I used to compile helloworld.c
[ppc]$ gcc -static -g helloworld.c
and then run it on PSIM
[ppc]$ ./psim a.out
do_call() unimplemented call getlogin
Or
[ppc]$ ./psim -e linux -E big a.out
: error in loading shared libraries: cannot create capability list:
Cannot alloc
ate memory
I got the psim from the most up to date gdb+dejagnu-20010403.tar.bz2
I can run those programs from psim-test-1998-11-20.tar.gz correctly
without any parameters for psim.
As to the error message while running helloworld on PSIM, I guess it is
either the parameter I used to compile helloworld is missing something
or the parameter I used for psim is not quite right, or neither of them
are correct.
Also, from "./psim -H" I get
-e <os-emul> specify an OS or platform to model
Can be any of the following:
bug - OEA + MOTO BUG ROM calls
netbsd - UEA + NetBSD system calls
solaris - UEA + Solaris system calls
linux - UEA + Linux system calls
Then when I use -e linux it should be uea. But when I check the program,
it sets the enviroment to vea at "emul_unix.c" line 968 of 2812
I don't know if it can cause any problem. Or the psim -H is wrong.
Thanks,
--
Long(Xianglong Huang)
Computer Science Dept.
UMass-Amherst
Phone: (413)5450256