Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Martin Galvan <omgalvan.86@gmail.com>
Cc: gdb@sourceware.org,  tom@tromey.com,
	 Pedro Alves <palves@redhat.com>,
	 "dgutson ." <danielgutson@gmail.com>
Subject: Re: [RFC] Setting breakpoint commands from the Python API
Date: Mon, 19 Dec 2016 19:08:00 -0000	[thread overview]
Message-ID: <8737hjyby0.fsf@tromey.com> (raw)
In-Reply-To: <CAN19L9E4D5xMZwEiEmG_57cdSiBM_VCg1eY1gyFcqzN24J_5zg@mail.gmail.com>	(Martin Galvan's message of "Mon, 19 Dec 2016 15:51:05 -0300")

>>>>> "Martin" == Martin Galvan <omgalvan.86@gmail.com> writes:

Martin> Doing gdb.execute('commands 2 3 4\necho "Hello World"\nend')
Martin> doesn't work either.

Yes, IIRC multi-line commands can't be evaluated with gdb.execute.
It would be nice to lift this restriction.

Martin> In view of this I'm thinking of adding a new 'set_commands' method to
Martin> gdb.Breakpoint. For the implementation I was looking at
Martin> do_map_commands_command, which is called when issuing 'commands' from
Martin> the gdb CLI, but can also take an already parsed command (when
info-> control != NULL). However, before I went any further I wanted to
Martin> ask you guys if there's another way to do this that I'm missing, or if
Martin> there are any suggestions.

How about just allowing assignment of the .commands attribute?  I think
that would be more in keeping with the other attributes of
gdb.Breakpoint.

thanks,
Tom


      reply	other threads:[~2016-12-19 19:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19 18:51 Martin Galvan
2016-12-19 19:08 ` Tom Tromey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737hjyby0.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=danielgutson@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=omgalvan.86@gmail.com \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox