This is the mail archive of the gdb-patches@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: [patch] [python] Prompt substitution


Pedro Alves <pedro@codesourcery.com> writes:

> On Tuesday 30 August 2011 21:33:24, Phil Muldoon wrote:

>> I think in the case, display_gdb_prompt is just displaying what GDB
>> knows to be the prompt.  If you delete the hook, whatever was the prompt
>> when the prompt was set will remain the prompt.  So the hook set the
>> prompt whenever in time, and when you delete the hook, it won't restore
>> what the old prompt was.  So if you disable the prompt, then set prompt
>> foo, then you will get "foo" now until you change it again manually. In
>> the case of "guarded prompt" (IE >) it won't attempt to alter that
>> display at all.
>
> I see.  I assumed that the python hook worked by overriding
> "set prompt", but that the result wouldn't be seen by "show prompt".
> That is, set/show prompt always worked at the "this is what
> I want the prompt to look like if no scripting overrides it" level.
> Okay, I preserved the current behaviour.  Matt's new (uncommitted)
> py-prompt.exp tests were great for making sure I did.  :-)

Yeah this was a port from archer, something I did not originally write,
but has been asked for since, well, forever.  I'm not strongly swayed by
the behavior, as it is, or, as in your scenario working around
set_prompt.  Tom might have other thoughts as I think he wrote most of
this stuff.  But FWIW, I don't mind if you change it to your method --
both seem equally valid use-cases.

Cheers,

Phil


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