From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26965 invoked by alias); 25 Nov 2005 02:47:24 -0000 Received: (qmail 26956 invoked by uid 22791); 25 Nov 2005 02:47:23 -0000 X-Spam-Check-By: sourceware.org Received: from web32911.mail.mud.yahoo.com (HELO web32911.mail.mud.yahoo.com) (68.142.206.58) by sourceware.org (qpsmtpd/0.31) with SMTP; Fri, 25 Nov 2005 02:47:23 +0000 Received: (qmail 44600 invoked by uid 60001); 25 Nov 2005 02:47:21 -0000 Message-ID: <20051125024721.44598.qmail@web32911.mail.mud.yahoo.com> Received: from [203.193.55.70] by web32911.mail.mud.yahoo.com via HTTP; Thu, 24 Nov 2005 18:47:21 PST Date: Fri, 25 Nov 2005 02:50:00 -0000 From: Peter Choi Subject: Re: multi-thread remote debugging i386-linux target (NEED HELP) To: Daniel Jacobowitz Cc: gdb@sources.redhat.com In-Reply-To: <20051124022455.GA30793@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00548.txt.bz2 Hi, I set "debug_thread" as 1 and recompile gdbserver. After I run the same scenario and I got the following logged on the target side: Process test created; pid = 21524 Got an event from 21524 (57f) stop pc (before any decrement) is 00843c50 stop pc (before any decrement) is 00843c50 Hit a (non-reinsert) breakpoint. Listening on port 2345 Remote debugging from host 10.247.1.237 Writing ffffffcc to 08048527 Writing ffffffcc to 0084fea0 Resuming, no pending status Resuming process 21524 (continue, signal 0, stop not expected) stop pc (before any decrement) is 00843c50 Got an event from 21524 (57f) stop pc (before any decrement) is 0084fea1 stop pc (before any decrement) is 0084fea1 Hit a (non-reinsert) breakpoint. Writing ffffff83 to 08048527 Writing 55 to 0084fea0 Writing ffffff80 to 00af4e40 Writing ffffffcc to 00ae9690 Writing 01 to bf518d20 Resuming, no pending status Resuming process 21524 (step, signal 0, stop not expected) Checking for breakpoint. stop pc (before any decrement) is 0084fea1 Removed breakpoint. set pc to 0084fea0 stop pc (before any decrement) is 0084fea0 Got an event from 21524 (57f) stop pc (before any decrement) is 0084fea1 stop pc (before any decrement) is 0084fea1 Hit a (non-reinsert) breakpoint. Writing resume reply for -1085174976 Writing ffffffcc to 08048527 Writing ffffffcc to 0084fea0 Resuming, no pending status Resuming process 21524 (continue, signal 0, stop not expected) stop pc (before any decrement) is 0084fea1 Got an event from 21524 (57f) stop pc (before any decrement) is 0084fea1 stop pc (before any decrement) is 0084fea1 Hit a (non-reinsert) breakpoint. Writing resume reply for -1085174976 Writing ffffff83 to 08048527 Writing 55 to 0084fea0 Resuming, no pending status Resuming, no pending status Resuming process 21524 (continue, signal 0, stop not expected) Checking for breakpoint. stop pc (before any decrement) is 0084fea0 Ignoring, PC was changed. stop pc (before any decrement) is 0084fea0 Got an event from 21524 (57f) stop pc (before any decrement) is 00ae9691 stop pc (before any decrement) is 00ae9691 Hit a (non-reinsert) breakpoint. Thread creation event. Writing 00 to bf517dbc Writing 00 to 00af4e48 Attaching to thread -1085178960 (LWP 21526) Writing 01 to bf517d90 Writing 55 to 00ae9690 Resuming process 21524 (step, signal 0, stop not expected) pending reinsert at 00ae9690Checking for breakpoint. stop pc (before any decrement) is 00ae9691 Removed breakpoint. set pc to 00ae9690 stop pc (before any decrement) is 00ae9690 Got an event from 21524 (57f) stop pc (before any decrement) is 00ae9691 stop pc (before any decrement) is 00ae9691 Reinserted breakpoint. Writing ffffffcc to 00ae9690 Resuming process 21524 (continue, signal 0, stop not expected) stop pc (before any decrement) is 00ae9691 Got an event from 21524 (57f) stop pc (before any decrement) is 00ae9691 stop pc (before any decrement) is 00ae9691 Hit a (non-reinsert) breakpoint. Thread creation event. Writing 00 to beb16dbc Writing 00 to 00af4e48 Attaching to thread -1095668816 (LWP 21527) Writing 01 to beb16d90 Writing 55 to 00ae9690 Resuming process 21524 (step, signal 0, stop not expected) pending reinsert at 00ae9690Checking for breakpoint. stop pc (before any decrement) is 00ae9691 Removed breakpoint. set pc to 00ae9690 stop pc (before any decrement) is 00ae9690 Got an event from 21524 (57f) stop pc (before any decrement) is 00ae9691 stop pc (before any decrement) is 00ae9691 Reinserted breakpoint. Writing ffffffcc to 00ae9690 Resuming process 21524 (continue, signal 0, stop not expected) stop pc (before any decrement) is 00ae9691 Got an event from 21524 (57f) stop pc (before any decrement) is 00ae9691 stop pc (before any decrement) is 00ae9691 Hit a (non-reinsert) breakpoint. Thread creation event. Writing 00 to be115dbc Writing 00 to 00af4e48 Attaching to thread -1106158672 (LWP 21528) Writing 01 to be115d90 Writing 55 to 00ae9690 Resuming process 21524 (step, signal 0, stop not expected) pending reinsert at 00ae9690Checking for breakpoint. stop pc (before any decrement) is 00ae9691 Removed breakpoint. set pc to 00ae9690 stop pc (before any decrement) is 00ae9690 Got an event from 21524 (57f) stop pc (before any decrement) is 00ae9691 stop pc (before any decrement) is 00ae9691 Reinserted breakpoint. Writing ffffffcc to 00ae9690 Resuming process 21524 (continue, signal 0, stop not expected) stop pc (before any decrement) is 00ae9691 Got an event from 21524 (57f) stop pc (before any decrement) is 00ae9691 stop pc (before any decrement) is 00ae9691 Hit a (non-reinsert) breakpoint. Thread creation event. Writing 00 to bd714dbc Writing 00 to 00af4e48 Attaching to thread -1116648528 (LWP 21529) Writing 01 to bd714d90 Writing 55 to 00ae9690 Resuming process 21524 (step, signal 0, stop not expected) pending reinsert at 00ae9690Checking for breakpoint. stop pc (before any decrement) is 00ae9691 Removed breakpoint. set pc to 00ae9690 stop pc (before any decrement) is 00ae9690 Got an event from 21524 (57f) stop pc (before any decrement) is 00ae9691 stop pc (before any decrement) is 00ae9691 Reinserted breakpoint. Writing ffffffcc to 00ae9690 Resuming process 21524 (continue, signal 0, stop not expected) stop pc (before any decrement) is 00ae9691 Got an event from 21524 (57f) stop pc (before any decrement) is 00ae9691 stop pc (before any decrement) is 00ae9691 Hit a (non-reinsert) breakpoint. Thread creation event. Writing 00 to bcd13dbc Writing 00 to 00af4e48 Attaching to thread -1127138384 (LWP 21530) Writing 01 to bcd13d90 Writing 55 to 00ae9690 Resuming process 21524 (step, signal 0, stop not expected) pending reinsert at 00ae9690Checking for breakpoint. stop pc (before any decrement) is 00ae9691 Removed breakpoint. set pc to 00ae9690 stop pc (before any decrement) is 00ae9690 Got an event from 21524 (57f) stop pc (before any decrement) is 00ae9691 stop pc (before any decrement) is 00ae9691 Reinserted breakpoint. Writing ffffffcc to 00ae9690 Resuming process 21524 (continue, signal 0, stop not expected) stop pc (before any decrement) is 00ae9691 Got an event from 21526 (137f) stop pc (before any decrement) is 00843c32 Expected stop. Resuming process 21526 (continue, signal 0, stop not expected) stop pc (before any decrement) is 00843c32 Got an event from 21527 (137f) stop pc (before any decrement) is 00843c32 Expected stop. Resuming process 21527 (continue, signal 0, stop not expected) stop pc (before any decrement) is 00843c32 Got an event from 21528 (137f) stop pc (before any decrement) is 00843c32 Expected stop. Resuming process 21528 (continue, signal 0, stop not expected) stop pc (before any decrement) is 00843c32 Got an event from 21529 (137f) stop pc (before any decrement) is 00843c32 Expected stop. Resuming process 21529 (continue, signal 0, stop not expected) stop pc (before any decrement) is 00843c32 Got an event from 21530 (137f) stop pc (before any decrement) is 00843c32 Expected stop. Resuming process 21530 (continue, signal 0, stop not expected) stop pc (before any decrement) is 00843c32 Hello World from 0! Hello World from 1! Hello World from 2! Hello World from 3! Hello World from 4! Got an event from 21524 (0) Thread -1085174976 (LWP 21524) exiting It seems it do report new threads are created and attached. I have set only 1 breakpoint on the main thread. But it reported : "Hit a (non-reinsert) breakpoint" several times, and sometimes it said "Removed breakpoint" and "Reinserted breakpoint"! What do it mean by that???? Pls advise. Thank you for your attention. Regards. Peter Choi --- Daniel Jacobowitz wrote: > On Wed, Nov 23, 2005 at 06:05:10PM -0800, Peter Choi > wrote: > > Hi, > > > > GDBserver did not show any output at all. > > > > To debug gdbserver, where should break at???? It > > seems that it cannot display protocol packets on > its > > side. > > It can if you set the appropriate variable in the > source, I think it's > debug_threads. You'll have to figure the rest out > on your own, since > we can't figure out your problem. > > > -- > Daniel Jacobowitz > CodeSourcery, LLC > __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/