This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cli/2451: user-defined commands fail when testing forstructure members that don't exist


The following reply was made to PR cli/2451; it has been noted by GNATS.

From: Daniel Jacobowitz <drow@false.org>
To: emf1123@gmail.com
Cc: gdb-gnats@sourceware.org
Subject: Re: cli/2451: user-defined commands fail when testing for
	structure members that don't exist
Date: Fri, 2 May 2008 12:36:15 -0400

 On Fri, May 02, 2008 at 03:33:09PM -0000, emf1123@gmail.com wrote:
 > define mumble
 >  if $arg0->container->value
 >    print $arg0->container->value
 >  else
 >    print $arg0->value
 >  end
 > end
 > 
 > then "mumble foo" fails if foo->container doesn't exist.
 
 Yes, unfortunately the CLI has no "try" construct and no way to do
 logic on types.  The Python scripting we're currently working on
 will obviously not have this limitation :-)
 
 -- 
 Daniel Jacobowitz
 CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]