This is the mail archive of the
mailing list for the GDB project.
implement inferior function calls on vxworks5 GDB #999
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb at sourceware dot org
- Date: Sat, 29 Sep 2007 23:20:29 -0700
- Subject: implement inferior function calls on vxworks5 GDB #999
Using: GNAT Pro 6.1.0w (20070927-41) hosted on solaris 2.8 targeted
for powerpc-wrs-vxworks. The board I used is "indus", which runs
Opening a TN to track the implementation of inferior function calls
from gdb-6.6 targeted to VxWorks 5.5 (in other words, call a function
from the debugger).
The first thing that needs to be done is to change the "call_dummy_location"
to be "ON_STACK". Most targets use "AT_ENTRY_POINT", but this cannot work
in our case.
After having made that modification, I'm able to call "malloc" and
it seems to be working OK, but when I try to call a simple Ada function,
the board crashes :-(.
Use the source code pasted at the end of this email (simplified version
of what I had, which contains a call to "hello" in procedure Foo):
% powerpc-wrs-vxworks-gnatmake -g foo
Then try calling function hello:
(gdb) target wtx indus
Connecting to target server: indus...
Connected to indus@nile
Looking for all loaded modules:
(gdb) load foo.out
(gdb) start foo
Breakpoint 1 at 0x11d26d0: file foo.adb, line 6.
Starting program: foo
foo () at foo.adb:6
6 end Foo;
(gdb) call hello
[board crashes, gdb hangs]
package Pck is
with Ada.Text_IO; use Ada.Text_IO;
package body Pck is
procedure Hello is
with Pck; use Pck;
procedure Foo is