Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* How to get convenience variables in python?
@ 2010-01-22 16:25 S Boucher
  2010-01-22 16:46 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: S Boucher @ 2010-01-22 16:25 UTC (permalink / raw)
  To: gdb

I'd like to get to convenience variables without first having to print them.

But currently, I have to do:

  gdb.execute("print argc")
  argc = gdb.history(0)

With the annoying side effect that argc gets printed.

It would be useful is to be able to do:

  gdb.execute("set $argc = argc")
  argc = gdb.convenience("$argc")


      __________________________________________________________________
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail.  Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca


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

* Re: How to get convenience variables in python?
  2010-01-22 16:25 How to get convenience variables in python? S Boucher
@ 2010-01-22 16:46 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2010-01-22 16:46 UTC (permalink / raw)
  To: S Boucher; +Cc: gdb

>>>>> "S" == S Boucher <stbya@yahoo.com> writes:

S>   gdb.execute("set $argc = argc")
S>   argc = gdb.convenience("$argc")

With CVS gdb you can do

    argc = gdb.parse_and_eval ('argc')

Tom


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

end of thread, other threads:[~2010-01-22 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-22 16:25 How to get convenience variables in python? S Boucher
2010-01-22 16:46 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox