Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Fernando Nasser <fnasser@cygnus.com>
To: Yu Xuanwei <yxw@chinacluster.com>
Cc: gdb@sources.redhat.com
Subject: Re: Remote Debugging
Date: Fri, 01 Dec 2000 11:40:00 -0000	[thread overview]
Message-ID: <3A27FEB1.E3AA550C@cygnus.com> (raw)
In-Reply-To: <3A274495.FD07A793@chinacluster.com>

Yu Xuanwei wrote:
> 
> Hi, Folks:
> 
> I am a rookie. I want to know something about remote debugging:
> 
> 1. On target: The gdbserver manipulates target application, which is
> stripped.
> 
> 2. On host: GDB run "target remote ..." to customize the target.
> 
> Then where is the symbol file for target application? Should I native
> compile the target application on host? Or ...?
> 

Nope.  You cross compile your executable with "-g".  Create a stripped copy 
(not necessary if you don't care about file sizes in the target) and copy
the stripped version to the target.  Load it with gdbserver.

On the host side:  gdb <your-complete-executable-with-debug-info>
and proceed as you mentioned.

But please, before you try to go any further, print a copy of the 
"Debugging with GDB" manual.  It is in the doc directory (you can make it in
various flavors - ps among them).  It is also available as an info topic 
if GDB is correctly installed on your system.

 

-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9
From Denset.Serralta@radisys.com Fri Dec 01 11:55:00 2000
From: Denset.Serralta@radisys.com
To: Jim Blandy <jimb@zwingli.cygnus.com>
Cc: gdb@sources.redhat.com
Subject: Re: GDB does not step into or over "sleep" function
Date: Fri, 01 Dec 2000 11:55:00 -0000
Message-id: <OF9A6588DE.02D8BDD2-ON852569A8.006B6937@radisys.com>
X-SW-Source: 2000-12/msg00004.html
Content-length: 3359

                                                                                                                        
                    Jim Blandy                                                                                          
                    <jimb@zwingli.cygn        To:     Denset.Serralta@radisys.com                                       
                    us.com>                   cc:     gdb@sources.redhat.com                                            
                    Sent by:                  Subject:     Re: GDB does not step into or over "sleep" function          
                    gdb-owner@sources.                                                                                  
                    redhat.com                                                                                          
                                                                                                                        
                                                                                                                        
                    11/28/00 08:07 PM                                                                                   
                                                                                                                        
                                                                                                                        






Jim Blandy wrote:
>Let me make sure I understand.  If you have code like this:
>
>    ... some code ...
>    ProcessSleep (...);
>    ... some more code ...
>
>and you set a breakpoint on the `some more code' line, your program
>hangs and never reaches the breakpoint.

>But if you run the program without GDB, it sleeps the expected amount
>of time, and then continues normally.


Thanks for responding

You are correct. The breakpoint in  "...some more code ..." is never
reached. We are suspecting
at the moment that it is a problem with the ProcessSleep function since the
hang occurrs when we
'step into' or 'step over' it. What we don't know is whether it is a
problem with our underlying kernel
functions or whether GDB has a problem with a "sleep" function which
allocates a semaphore,
blocks on it subject to a user specified timeout and then returns the
semaphore. We are leaning
to suspecting that it is a problem with our custom kernel (i.e. GDB is
innocent). However I thought
I would ask the GDB group, with all the combined experience developing GDB,
just in case they
saw something obvious.

Thanks again
Denset.Serralta@radisys.com


>Denset.Serralta@radisys.com writes:
>> We are using GDB 4.18 on an NT host to debug target software running on
a
>> PowerPC based adapter. We are using a function called ProcessSleep which
is
>> a call to our kernel.  It basically allocates a semaphore, blocks on it
>> subject to a user specified timeout and then returns the semaphore.One
>> problem we can't seem to get around though is that if the process being
>> debugged makes a 'ProcessSleep' call, the debugger never gains control
when
>> we step over it.  Even if we set a breakpoint past the call and let it
run,
>> it never returns.  A status utility that we have shows the process as
>> queued, but we never regain control.  Does anybody know any reason(s)
why
>> this should happen.



       reply	other threads:[~2000-12-01 11:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3A274495.FD07A793@chinacluster.com>
2000-12-01 11:40 ` Fernando Nasser [this message]
2015-03-07 13:52 Remote debugging Russell Shaw
2015-03-07 14:09 ` Ofir Cohen
2015-03-08  7:48   ` Russell Shaw
  -- strict thread matches above, loose matches on Subject: below --
2004-03-22 14:23 luca risso
2004-03-19 17:59 luca risso
2004-03-19 18:43 ` Daniel Jacobowitz
2003-06-13 14:24 remote debugging nak26
2003-06-13  7:50 Brijesh Shukla
2003-06-13 13:28 ` Quality Quorum
2003-03-20  7:45 Patricia Alba
2002-12-12  9:29 Remote Debugging Tim
2002-12-12 10:30 ` Daniel Jacobowitz
2002-07-22  9:35 remote debugging Vinayak P Risbud
2001-01-23 22:23 malar kavi
     [not found] <38B4017A.2F64A9C3@Epec.fi>
2000-02-23 19:12 ` Remote Debugging Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A27FEB1.E3AA550C@cygnus.com \
    --to=fnasser@cygnus.com \
    --cc=gdb@sources.redhat.com \
    --cc=yxw@chinacluster.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox