List Info

Thread: implement inferior function calls on vxworks5 GDB #999




implement inferior function calls on vxworks5 GDB #999
country flaguser name
United States
2007-09-30 01:20:29
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 indusnile
        Looking for all loaded modules:
                vxWorks: ok
        
        
        (gdb) load foo.out
        Downloading
/nile.build/brobecke/vxgdb-6.6/t2/funcall/foo.out...done.
        (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
        Hello
        [board crashes, gdb hangs]

-- 
Joel

        package Pck is
           procedure Hello;
        end Pck;
        with Ada.Text_IO; use Ada.Text_IO;
        package body Pck is
           procedure Hello is
           begin
              Put_Line ("Hello");
           end Hello;
        end Pck;
        with Pck; use Pck;
        
        procedure Foo is
        begin
           null;
        end Foo;


Re: implement inferior function calls on vxworks5 GDB #999
country flaguser name
United States
2007-09-30 01:26:49
Blush... I guess that now everyone knows that I'm working
on
porting gdb to VxWorks 5.5 and eventually VxWorks 653. This
was
supposed to be sent to our tracking system, not this public
mailing list.

The good news is that the implementation is relatively
clean,
I am implementing the port in a way that's submitable at any
time,
so I'm hoping to contribute it as soon as I'm finished if
people
are interested.

Again, sorry for the noise.

-- 
Joel

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )