From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9226 invoked by alias); 17 Jul 2013 16:22:31 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 9217 invoked by uid 89); 17 Jul 2013 16:22:31 -0000 X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,SPF_PASS autolearn=ham version=3.3.1 Received: from Unknown (HELO mail-la0-f43.google.com) (209.85.215.43) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 17 Jul 2013 16:22:30 +0000 Received: by mail-la0-f43.google.com with SMTP id gw10so1696172lab.30 for ; Wed, 17 Jul 2013 09:22:22 -0700 (PDT) X-Received: by 10.152.19.40 with SMTP id b8mr3266225lae.34.1374078142093; Wed, 17 Jul 2013 09:22:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.231 with HTTP; Wed, 17 Jul 2013 09:22:07 -0700 (PDT) In-Reply-To: <20130717161348.GA14402@dalaran.sceen.net> References: <51E5785D.1050904@codesourcery.com> <51E58223.5040505@codesourcery.com> <20130717120954.GA26158@dalaran.sceen.net> <20130717161348.GA14402@dalaran.sceen.net> From: Yue Lu Date: Wed, 17 Jul 2013 16:22:00 -0000 Message-ID: Subject: Re: how to continue from a breakpoint in GNU/Hurd To: Richard Braun Cc: Luis Machado , gdb@sourceware.org, bug-hurd@gnu.org, Thomas Schwinge Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2013-07/txt/msg00057.txt.bz2 On Thu, Jul 18, 2013 at 12:13 AM, Richard Braun wrote: > On Thu, Jul 18, 2013 at 12:07:20AM +0800, Yue Lu wrote: >> when I used thread_info() to check the suspend count, they are zero. >> But I met a strange thing. >> this is my code snippet: >> thread_basic_info_data_t _info; >> thread_basic_info_t info =3D &_info; >> mach_msg_type_number_t info_len =3D THREAD_BASIC_INFO_COUNT; >> error_t err =3D >> thread_info (thread->port, THREAD_BASIC_INFO, (int *) &info, &info_len= ); >> >> after this call, the info turn out to be a _NULL_ pointer. I think > > If the info pointer is NULL, how do you determine the suspend count ? > I used this (&_info)->suspend_count to get the sc value. > Something does look wrong. Check all the parameters of your call, one > by one, rigorously. The only one parameter I used is the first one, I give it as the thread port, something like 119 (I have printf it), the left three parameters are all the same as the code in gnu-nat.c. , -- Yue Lu (=E9=99=86=E5=B2=B3)