From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27242 invoked by alias); 28 Nov 2001 15:52:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 27092 invoked from network); 28 Nov 2001 15:52:08 -0000 Received: from unknown (HELO cerbere.u-strasbg.fr) (130.79.112.7) by hostedprojects.ges.redhat.com with SMTP; 28 Nov 2001 15:52:08 -0000 Received: from laocoon (laocoon.u-strasbg.fr [130.79.112.72]) by cerbere.u-strasbg.fr (8.9.3/8.8.7) with ESMTP id QAA05215; Wed, 28 Nov 2001 16:52:00 +0100 Message-Id: <4.2.0.58.20011128164610.00a45da0@ics.u-strasbg.fr> X-Sender: muller@ics.u-strasbg.fr X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Fri, 16 Nov 2001 14:19:00 -0000 To: Andrew Cagney From: Pierre Muller Subject: Re: [RFA 2nd try] tell in which register a register var is loaded. Cc: gdb-patches@sources.redhat.com In-Reply-To: <3C045C10.3020902@cygnus.com> References: <4.2.0.58.20011120180519.016c6008@ics.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-SW-Source: 2001-11/txt/msg00319.txt.bz2 At 04:37 28/11/2001 , Andrew Cagney a écrit: >>This patch superseeds the previous one, >>the lval_reg_frame_relative case was not handled correctly there. >>http://sources.redhat.com/ml/gdb-patches/2001-11/msg00301.html >> >>Still no idea who should give an approval for this patch ? > >No one else did so ... > >>2001-11-20 Pierre Muller >> * findvar.c (locate_var_value): specify in which register a register >> variable is stored. > >Don't forget to ucase ``specify''. > >Hmm, can REGISTER_NAME (num) ever be invalid or is this just being careful? > >If the latter then can I suggest an assertion vis: > > gdb_assert (REGISTER_NAME (...) != NULL > && *REGISTER_NAME (...) != '\0'); > >If the former then the test will need to be tweeked to check for both NULL and '\0'. > >Your choice. Looking at different places where REGISTER_NAME is used, it seems to be almost always assumed that it is valid, so I will probably simply remove the check. >I don't think the ``$'' prefix is consistent with existing code - based mainly on a quick grep that didn't reveal any code doing this. (I don't actually have anything agains the convention though - just a separate change :-) Look at tracepoint.c around line 2380 in function scope_info and you will find lots of GDB code using printf_filtered("... in register $%s",REGISTER_NAME(...)) >Otherwize, yes, a much more helpful error message. Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller@ics.u-strasbg.fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Muller To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA 2nd try] tell in which register a register var is loaded. Date: Wed, 28 Nov 2001 07:52:00 -0000 Message-ID: <4.2.0.58.20011128164610.00a45da0@ics.u-strasbg.fr> References: <4.2.0.58.20011120180519.016c6008@ics.u-strasbg.fr> <3C045C10.3020902@cygnus.com> X-SW-Source: 2001-11/msg00534.html Message-ID: <20011128075200.9rksxps2vlPNDLsltOaKA2dWD7k75Rhq9XXesd8x1uY@z> At 04:37 28/11/2001 , Andrew Cagney a écrit: >>This patch superseeds the previous one, >>the lval_reg_frame_relative case was not handled correctly there. >> http://sources.redhat.com/ml/gdb-patches/2001-11/msg00301.html >> >>Still no idea who should give an approval for this patch ? > >No one else did so ... > >>2001-11-20 Pierre Muller >> * findvar.c (locate_var_value): specify in which register a register >> variable is stored. > >Don't forget to ucase ``specify''. > >Hmm, can REGISTER_NAME (num) ever be invalid or is this just being careful? > >If the latter then can I suggest an assertion vis: > > gdb_assert (REGISTER_NAME (...) != NULL > && *REGISTER_NAME (...) != '\0'); > >If the former then the test will need to be tweeked to check for both NULL and '\0'. > >Your choice. Looking at different places where REGISTER_NAME is used, it seems to be almost always assumed that it is valid, so I will probably simply remove the check. >I don't think the ``$'' prefix is consistent with existing code - based mainly on a quick grep that didn't reveal any code doing this. (I don't actually have anything agains the convention though - just a separate change :-) Look at tracepoint.c around line 2380 in function scope_info and you will find lots of GDB code using printf_filtered("... in register $%s",REGISTER_NAME(...)) >Otherwize, yes, a much more helpful error message. Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller@ics.u-strasbg.fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99