Ok, I'll drop this from my todo list.
Next priority was & is to get gdb + gdbserver to work for x86.

See below : it can do a few things but e.g. no "bt" yet.

        Danny

\network\x86> gdbserver :9999 /network/x86/fibo.exe
Yow main 1038
Yow main 1070
Yow main 1078
set_breakpoint_data
Command line is ""
Error creating process "/network/x86/fibo.exe", (error 2): unknown win32
error (2)

\network\x86> q
Cannot execute q.exe.
\network\x86> gdbserver :9999 /network/x86/fibox.exe
Yow main 1038
Yow main 1070
Yow main 1078
set_breakpoint_data
Command line is ""
Process created: 
Process /network/x86/fibox.exe created; pid = 100270090
gdbserver: kernel event CREATE_PROCESS_DEBUG_EVENT for pid=100270090
tid=5fb000a
gdbserver: kernel event LOAD_DLL_DEBUG_EVENT for pid=100270090
tid=5fb000a
PSAPI load reported failure
Child Stopped with signal = 5 
gdbserver: kernel event EXCEPTION_DEBUG_EVENT for pid=100270090
tid=5fb000a
EXCEPTION_BREAKPOINT
Child Stopped with signal = 5 
Listening on port 9999
Remote debugging from host 172.17.1.10
handle_query(qSupported)
handle_query(qXfer:features:read:target.xml:0,7ca)
handle_query(qC)
handle_query(qOffsets)
handle_query(qXfer:libraries:read::0,7ca)
Yow(<library-list>
  <library name="coredll.dll"><segment address="0x40011000"/></library>
</library-list>
)
handle_query(qSymbol::)
handle_query(qfThreadInfo)
handle_query(qsThreadInfo)
handle_query(qThreadExtraInfo,5fb000a)
handle_query(qP0000001f0000000005fb000a)
gdbserver: kernel event OUTPUT_DEBUG_STRING_EVENT for pid=100270090
tid=5fb000a
Yow, command [\network\x86\fibox.exe] param []
fibo(1) = 1
fibo(2) = 1
fibo(3) = 2
fibo(4) = 3
fibo(5) = 5
fibo(6) = 8
fibo(7) = 13
fibo(8) = 21
fibo(9) = 34
fibo(10) = 55
fibo(11) = 89
fibo(12) = 144
fibo(13) = 233
fibo(14) = 377
fibo(15) = 610
fibo(16) = 987
fibo(17) = 1597
fibo(18) = 2584
fibo(19) = 4181
gdbserver: kernel event EXIT_PROCESS_DEBUG_EVENT for pid=100270090
tid=5fb000a
Child exited with retcode = 0

Child exited with status 0
GDBserver exiting
\network\x86> 




pavilion: {1528} i386-mingw32ce-gdb fibox.exe 
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=i386-mingw32ce"...
(gdb) target remote ebox:9999
Remote debugging using ebox:9999
[New Thread 100335626]
Error while mapping shared library sections:
coredll.dll: No such file or directory.
Symbol file not found for coredll.dll
0x00000000 in ?? ()
(gdb) info threads
* 1 Thread 100335626  0x00000000 in ?? ()
warning: Couldn't restore frame in current thread, at frame 0
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
(gdb) cont
Continuing.
Console NOT redirected for process 0x5FA000A

Program exited normally.
(gdb) q
pavilion: {1529} 



On Mon, 2009-06-08 at 10:33 +0200, Johnny Willemsen wrote:
> Hi,
> 
> I have compiled the test program also with msvc for the ebox4300 device. It 
> seems msvc has the same behavior, the stack66000 fails. 
> 
> It is strange why some of our tests do fail with gcc and not with msvc due to 
> the stack issue. Seems we can't resolve this with cegcc, it is something in 
> windows ce
> 
> Johnny
> 
> > I've been poking in the stack limit problem that Johnny reported.
> > 
> > Test program attached, it can be used with e.g.
> >   i386-mingw32ce-gcc -DSTACK_SIZE=6000 -o stack6000.exe stack.c
> >   i386-mingw32ce-gcc -DSTACK_SIZE=66000 -o stack66000.exe stack.c
> > 
> > The stack6000 execution succeeds and leaves the expected contents in
> > out.txt :
> >   In main
> >   Size : 6000
> >   After memset
> > The stack66000 execution creates a dialog on the screen saying
> >     Application Error
> >     Application stack66000.EXE encountered a serious error and must
> > shut
> > down
> > It also adds one line to out.txt :
> >   In main
> > 
> > I've built a linux gcc 4.4.0, as expected the same application has no
> > problems on linux.
> > 
> > A difference between the assembly code generated for the two platforms
> > (see attached source files) is that the CE version calls a function
> > __chkstk to probe the stack (see gcc/config/i386/cygwin.asm), the linux
> > version does not.
> > 
> > large:                              (Linux)
> >         pushl   %ebp
> >         movl    %esp, %ebp
> >         subl    $66024, %esp
> >         movl    $.LC0, %eax
> >         movl    $66000, 8(%esp)
> >         movl    %eax, 4(%esp)
> >         movl    $outbuf, (%esp)
> >         call    sprintf
> >         movl    $outbuf, (%esp)
> >         call    Print
> > 
> > 
> > _large:                             (CE)
> >         pushl   %ebp
> >         movl    %esp, %ebp
> >         movl    $66024, %eax
> >         call    ___chkstk
> >         movl    $66000, 8(%esp)
> >         movl    $LC0, 4(%esp)
> >         movl    $_outbuf, (%esp)
> >         call    _sprintf
> >         movl    $_outbuf, (%esp)
> >         call    _Print
> > 
> > I've tried porting the piece of Linux assembler in the CE code. This
> > requires adding an underscore at some lines, removing dots at others.
> > The end result is the same though : crash.
> > 
> > Help ! :-(
> > 
> >     Danny
> > --
> > Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
> 
> 
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
> looking to deploy the next generation of Solaris that includes the latest 
> innovations from Sun and the OpenSource community. Download a copy and 
> enjoy capabilities such as Networking, Storage and Virtualization. 
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> Cegcc-devel mailing list
> Cegcc-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cegcc-devel
> 
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to