This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
VxWorks 5.5.

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
        (gdb) target wtx indus
        Connecting to target server: indus...
        Connected to indus@nile
        Looking for all loaded modules:
                vxWorks: ok
        (gdb) load foo.out
        Downloading /
        (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
           procedure Hello;
        end Pck;
        with Ada.Text_IO; use Ada.Text_IO;
        package body Pck is
           procedure Hello is
              Put_Line ("Hello");
           end Hello;
        end Pck;
        with Pck; use Pck;
        procedure Foo is
        end Foo;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]