From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23869 invoked by alias); 22 Mar 2005 03:04:18 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 23776 invoked from network); 22 Mar 2005 03:04:11 -0000 Received: from unknown (HELO ihemail2.lucent.com) (192.11.222.163) by sourceware.org with SMTP; 22 Mar 2005 03:04:11 -0000 Received: from ihgp.ih.lucent.com (h135-1-218-100.lucent.com [135.1.218.100]) by ihemail2.lucent.com (8.12.11/8.12.11) with ESMTP id j2M33a2w020329; Mon, 21 Mar 2005 21:03:37 -0600 (CST) Received: from [192.11.174.218] by ihgp.ih.lucent.com (8.11.6+Sun/EMS-1.5 sol2) id j2M33aP22858; Mon, 21 Mar 2005 21:03:36 -0600 (CST) Message-ID: <423F8B07.9010603@lucent.com> Date: Tue, 22 Mar 2005 03:04:00 -0000 From: Dave Trollope User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb@sources.redhat.com Subject: Re: Linux Realtime Scheduling Option References: <01c4f3aa$Blat.v2.2.2$b4217d20@zahav.net.il> <20050106233136.GA29435@white> <4CE93165-C27F-4CF6-90B8-7632A7BD2672@apple.com> <20050107011211.GB29435@white> <41DDFF0D.5040205@netspace.net.au> <20050111193526.GA5699@white> <41E5E102.2010703@lucent.com> <423B01EC.9060509@lucent.com> <20050318181204.GA31713@nevyn.them.org> <423F1E62.6020008@lucent.com> <20050321193304.GA5205@nevyn.them.org> In-Reply-To: <20050321193304.GA5205@nevyn.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-03/txt/msg00201.txt.bz2 Hi Daniel, Daniel Jacobowitz wrote: >On Mon, Mar 21, 2005 at 01:20:02PM -0600, David Steven Trollope wrote: > > >>Hi Daniel, >> >>Our application does change its own priority, but I was concerned with >>the priority of gdbserver/gdb. Which Linux tools are you referring to? >>I'll go take a look at them. >> >> > >Search for 'rt' or 'chrt'; I do not recall which one is current. I >believe they are in the 'schedutils' distribution. > > I'll take a look. >>In our environment gdb/gdbserver should always run realtime at a set >>priority. Help me understand why is it not a good idea to have >>gdb/gdbserver set its own priority based on an option in .gdbinit? >> >> > >First of all, gdbserver doesn't parse an init file. You would have to >add a Linux-specific packet type to the remote protocol for GDB to >communicate this to gdbserver. > > I wasn't thinking this was Linux specific. Doesn't Solaris also have realtime extensions that this would apply to? I can certainly see that its not generic enough to be worthy of adding to the remote protocol. >Secondly, because there are standalone tools to handle the problem. >gdbserver is supposed to be simple; I don't want to add code specific >to a particular, fairly uncommon debugging environment when existing >tools handle it perfectly well. > >If you can come up with a reason why the standalone tools can not be >used to solve the problem, then we can rediscuss :-) > > Its not a gdbserver specific issue. If you run gdb on any Linux machine while loading an application that sets its own real time priority problems will likely occur from the mismatch. I don't know if Solaris suffers from the same issue, but I would expect it to. I think its really applicable to any unix variant where realtime extentions allow an application to change its own priority. Perhaps gdb/gdbserver could have a command line option (instead of .gdbinit) that registers itself realtime, as the highest priority? Its likely you want the debugger to run at the highest priority to catch tight loops etc. This would also map to non-unix OSs like VxWorks. Does this strategy sound more appealing? I appreciate your time. Cheers Dave