From: Khoo Yit Phang <khooyp@cs.umd.edu>
To: Doug Evans <dje@google.com>
Cc: Khoo Yit Phang <khooyp@cs.umd.edu>,
Paul_Koning@dell.com, gdb-patches@sourceware.org
Subject: Re: Make the "python" command resemble the standard Python interpreter
Date: Thu, 12 Jan 2012 18:48:00 -0000 [thread overview]
Message-ID: <DD573A6D-60F8-4D00-B4B7-C21427778E4F@cs.umd.edu> (raw)
In-Reply-To: <CADPb22SwpozmcN48-0jvBJqZwcjGWfZfvDQ1QDVBJ4q3BqXhtg@mail.gmail.com>
Hi,
On Jan 12, 2012, at 1:30 PM, Doug Evans wrote:
> On Thu, Jan 12, 2012 at 10:19 AM, Khoo Yit Phang <khooyp@cs.umd.edu> wrote:
>> Hi,
>>
>> On Jan 12, 2012, at 1:13 PM, Doug Evans wrote:
>>
>>> On Jan 12, 2012 9:51 AM, "Doug Evans" <dje@google.com> wrote:
>>>>
>>>> On Thu, Jan 12, 2012 at 9:47 AM, <Paul_Koning@dell.com> wrote:
>>>>>> ...
>>>>>>> - I may want a script that invokes python interactively.
>>>>>>> - How do I write a gdb macro that invokes the python repl?
>>>>>>>
>>>>>>> Solve those problems, and provide a migration path away from the old
>>>>>>> behaviour, and then you've got something.
>>>>>>
>>>>>> As a strawman, a new command, python-foo, could be provided [python-code? python-script?] that had the "old" behaviour.
>>>>>
>>>>> Nice solution.
>>>>
>>>> btw, would we ever want to pass options to the python repl?
>>>> If that might ever occur, then we don't want python with arguments to
>>>> be the old behaviour.
>>>
>>> Or preferably have a new command should the need arise (I like python-repl, but I realize repl may be too obscure :-) ).
>>> OK, I think I'm OK with where this is going.
>>
>> Instead of making a new command, we can add an option to, say "python /i", that forces the interpreter to start, so that you can define a GDB macro that starts a Python interpreter (when from_tty is false). That would retain compatibility with the current behavior.
>
> Heh. / is for display options (e.g. x/i $pc), - is for other kinds of
> options (e.g. symbol-file -readnow foo).
> But yeah, that's another alternative. [It feels more problematic,
> e.g. the caveat you mention.]
For reference, the caveat I mentioned was in an email rejected by the mailing list server: that was for "python -i" which would disallow the python script "-i".
"python /i" would not have this caveat, since "/i" isn't a valid Python expression.
Yit
January 12, 2012
next prev parent reply other threads:[~2012-01-12 18:36 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-11 0:31 Khoo Yit Phang
2012-01-11 4:06 ` Joel Brobecker
2012-01-11 10:43 ` Kevin Pouget
2012-01-11 10:59 ` Joel Brobecker
2012-01-11 16:04 ` Khoo Yit Phang
2012-01-11 17:48 ` Khoo Yit Phang
2012-01-11 18:48 ` Kevin Pouget
2012-01-11 19:04 ` Khoo Yit Phang
2012-01-11 19:11 ` Kevin Pouget
2012-01-11 21:06 ` Khoo Yit Phang
2012-01-11 21:33 ` Tom Tromey
2012-01-11 22:22 ` Khoo Yit Phang
2012-01-20 21:25 ` Tom Tromey
2012-01-20 21:31 ` Tom Tromey
2012-01-22 16:42 ` Khoo Yit Phang
2012-01-11 20:56 ` Tom Tromey
2012-01-11 21:30 ` Khoo Yit Phang
2012-01-11 21:41 ` Tom Tromey
2012-01-12 3:07 ` Khoo Yit Phang
2012-01-13 14:09 ` Phil Muldoon
2012-01-13 21:39 ` Khoo Yit Phang
2012-01-12 16:48 ` Doug Evans
2012-01-12 16:52 ` Khoo Yit Phang
2012-01-12 16:55 ` Paul_Koning
2012-01-12 17:24 ` Joel Brobecker
2012-01-12 17:30 ` Doug Evans
2012-01-12 17:38 ` Paul_Koning
2012-01-12 17:46 ` Doug Evans
2012-01-12 17:48 ` Doug Evans
2012-01-12 17:51 ` Paul_Koning
2012-01-12 18:06 ` Doug Evans
[not found] ` <CADPb22T1ZmfiGeF9g-QZN6pCTBHwT5ByD9ddX_Dhxe4URvTAhw@mail.gmail.com>
2012-01-12 18:21 ` Khoo Yit Phang
2012-01-12 18:36 ` Doug Evans
2012-01-12 18:48 ` Khoo Yit Phang [this message]
2012-01-12 21:22 ` Doug Evans
2012-01-12 18:30 ` Doug Evans
2012-01-21 1:56 ` Tom Tromey
2012-01-22 16:57 ` Khoo Yit Phang
2012-01-23 22:17 ` Doug Evans
2012-01-24 17:36 ` Tom Tromey
2012-01-26 18:28 ` Doug Evans
2012-01-30 6:50 ` Khoo Yit Phang
2012-01-30 17:25 ` Doug Evans
2012-01-30 19:57 ` Doug Evans
2012-02-06 20:08 ` Doug Evans
2012-02-06 20:13 ` Paul_Koning
2012-02-06 20:30 ` Khoo Yit Phang
2012-02-06 20:34 ` Doug Evans
2012-02-06 20:59 ` Paul_Koning
2012-02-06 21:54 ` Tom Tromey
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=DD573A6D-60F8-4D00-B4B7-C21427778E4F@cs.umd.edu \
--to=khooyp@cs.umd.edu \
--cc=Paul_Koning@dell.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
/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