public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* Re: cli/2451: user-defined commands fail when testing for structure members that don't exist
@ 2008-05-02 16:38 Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2008-05-02 16:38 UTC (permalink / raw)
  To: nobody; +Cc: gdb-prs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* cli/2451: user-defined commands fail when testing for structure members that don't exist
@ 2008-05-02 15:38 emf1123
  0 siblings, 0 replies; 2+ messages in thread
From: emf1123 @ 2008-05-02 15:38 UTC (permalink / raw)
  To: gdb-gnats


>Number:         2451
>Category:       cli
>Synopsis:       user-defined commands fail when testing for structure members that don't exist
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri May 02 15:38:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     emf1123@gmail.com
>Release:        gdb-6.8
>Organization:
>Environment:

>Description:
when debugging a program with singleton and polymorphic container data structures, you end up with variables similar to:
foo->container->value  *OR* foo->value.  

a user macro such as:

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.

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-02 16:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-02 16:38 cli/2451: user-defined commands fail when testing for structure members that don't exist Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2008-05-02 15:38 emf1123

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).