You're getting beyond my knowledge level, since for me it just worked.
But perhaps the following might help:
1) It looks like gdb isn't finding the information about your program and
its libraries. Are you compiling and linking with -g?
2) I don't know whether it's fixed, but at one time a breakpoint in a
constructor
was likely to not be hit. Apparently there are multiple copies of the
constructor
generated, even though you only see one, and the breakpoint only gets set
on one of them. Sometimes I've had to put a breakpoint just before the
constructor
was called. I suppose you could also break at a function called from
the constructor.
3) Are you running gdb from the system you did the compile on, so that
it can find
the libraries in the same place gcc did?
Rich
On Dec 17, 2007 8:55 AM, marcolamonato <> wrote:
>
>
>
>
>
>
> Hi,
>
> that tip was good, but I still have strange issues...
>
> I mean, I made several test and I had lots of SIGSEGV in the first
> part of them, while I've been able to see the program running on the
> sencond part of this session, but I've not yet been able to
> understand what has changed in between...
>
> Moreover, when gdb "works", it doesn't a good job, as:
> 1) when I send command "next" I get "cannot find bounds of current
> function"
> 2) when I send "p my_variable" I get its value for global variables,
> while I get "no symbol my_symbol_name in current context" for
> variables defined within main
> 3) with "info locals" I get "no symbol table info available"
> 4) with "info threads" I get the reference of only 1 thread out of 3
> in my program
> 5) if I insert a breakpoint, most of the times the programs keeps
> running without stopping at it
> 6) everytime I have a thread being set in my program I receive a SIG32
> 7) "info share" gives me "no shared libraries at this time", what
> about libthread? And libpthread?
>
> Thanks,
> Marco
>
>
> --- In "Rich Wilson" <> wrote:
> >
> > When using gdbserver, you have already "run" the program when
> > you start gdbserver. From your gdb session, you need to "c"ontinue
> > after setting any desired breakpoints or other conditions.
> >
> > To restart, "k"ill the debugged session, then repeat the gdbserver
> > and target remote commands.
> >
> > Rich
> >
>
> > On 12/14/07, marcolamonato <> wrote:
> > >
> > > Hi all,
> > >
> > > I'm having some issues trying to remote debug my programs inside
> a TS-
> > > 7250 board. I'm currently working on a WinXp pc with Cygwin
> connected
> > > through tcp to the TS-7250.
> > >
> > > Let me tell you what I did so far:
> > >
> > > 1) I updated my cygwin version and I completely installed
> the "dev"
> > > set of resources (ddd, gdb, make,… are all in it), anyway my gcc
> is
> > > still the one in the "/opt" path from TS (I made an alias for it)
> > >
> > > 2) I configured the gdbserver compilation to be done with the arm-
> > > unknown-linux-gnu-gcc (the one that has the alias to gcc…) and I
> > > compiled it with the "make" command, no issue apparently
> > >
> > > 3) After starting cygwin, I just need to type in "startx" and, in
> the
> > > following bash, "ddd my_program" and I'm ready to go with gdb
> handled
> > > by ddd, both as a graphical interface or with a command line
> > >
> > > 4) When I first started "gdbserver" on my TS-7250 I had the
> > > error "./gdbserver: error while loading shared libraries:
> > > libthread_db.so.1: cannot open shared object file: No such file or
> > > directory"
> > >
> > > 5) To solve this I added the file of my
> > > pc "e:\cygwin\opt\crosstool\gcc-3.3.4-glibc-2.3.2\arm-unknown-
> linux-
> > > gnu\arm-unknown-linux-gnu\lib\libthread_db-1.0.so" into
> the "/lib" of
> > > my TS-7250 and I created a symbolic link with "ln –
> > > s /lib/libthread_db-1.0.so /lib/libthread_db.so.1". Now the
> gdbserver
> > > works, but I'm not sure if I've done something correct or not,
> > > moreover I linked that library, but my program uses the pthread
> > > libraries actually and to have it running properly I had to insert
> > > (in a previous stage) the "libpthread-0.10.so" file into "/lib"
> and
> > > make the link "ln –s /lib/ libpthread-
> 0.10.so /lib/libpthread.so.0"
> > >
> > > 6) Now I'm trying to remote debug from the WinXp host my program
> > > which is inside the TS-7250. I can with ddd or directly with gdb
> (in
> > > both cases inside cygwin…), but I can have this setup to work. I
> mean
> > > I'm able to connect them, on the target I call "./gdbserver
> > > 192.168.0.100:9737 my_program" and on the host I call "gdb
> > > my_program" and then "target remote 192.168.0.58:9737". What
> happens
> > > is that on the target side I read:
> > > "Process splittex_ok created; pid = 120
> > > Listening on port 9737
> > > Remote debugging from host 192.168.0.100"
> > > While on the host side:
> > > "Remote debugging using 192.168.0.58:9737
> > > 0x00000000 in ?? ()"
> > > If I now try to run the program writing "run" on the host I get:
> > > " Starting program: /home/Marco/my_program
> > > Error creating process /home/Marco/my_file, (error 193)"
> > > and on the target appears:
> > > "Killing inferior" and the gdbserver gets destroyed
> > >
> > > I really don't know how to get through this issue… any idea?
> > >
> > > Thanks again for your help!
> > >
> > > Marco
> > >
> > >
> > >
> >
> >
> >
> > --
> > Rich Wilson
> >
> > 425-337-7129
> >
>
>
--
Rich Wilson
425-337-7129
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|