* RecordReplay: Default answer for changing memory
@ 2009-03-31 17:45 Marc Khouzam
2009-03-31 17:51 ` Paul Koning
0 siblings, 1 reply; 6+ messages in thread
From: Marc Khouzam @ 2009-03-31 17:45 UTC (permalink / raw)
To: gdb
Hi,
When I try to change memory after having gone
is reverse with PRecordReplay, I get a warning/prompt
to allow the memory change to occur. The prompt has
a default of "No" (uses nquery).
Used from Eclipse, the default is always chosen, and
prevents me from changing memory.
The obvious solution is to change nquery() to
yquery() or query() in a couple of places in record.c.
But is there a better way to do this? Some setting that
I can use in GDB?
Thanks
Marc Khouzam
Software Designer, Methods and Tools
Ericsson Canada Inc
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RecordReplay: Default answer for changing memory
2009-03-31 17:45 RecordReplay: Default answer for changing memory Marc Khouzam
@ 2009-03-31 17:51 ` Paul Koning
2009-03-31 18:58 ` Marc Khouzam
0 siblings, 1 reply; 6+ messages in thread
From: Paul Koning @ 2009-03-31 17:51 UTC (permalink / raw)
To: marc.khouzam; +Cc: gdb
>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:
Marc> Hi, When I try to change memory after having gone is reverse
Marc> with PRecordReplay, I get a warning/prompt to allow the memory
Marc> change to occur. The prompt has a default of "No" (uses
Marc> nquery).
Marc> Used from Eclipse, the default is always chosen, and prevents
Marc> me from changing memory.
Marc> The obvious solution is to change nquery() to yquery() or
Marc> query() in a couple of places in record.c.
Marc> But is there a better way to do this? Some setting that I can
Marc> use in GDB?
Fix Eclipse so it doesn't force the default without your permission?
paul
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: RecordReplay: Default answer for changing memory
2009-03-31 17:51 ` Paul Koning
@ 2009-03-31 18:58 ` Marc Khouzam
2009-04-01 2:43 ` Joel Brobecker
0 siblings, 1 reply; 6+ messages in thread
From: Marc Khouzam @ 2009-03-31 18:58 UTC (permalink / raw)
To: Paul Koning; +Cc: gdb
> Marc> But is there a better way to do this? Some setting that I can
> Marc> use in GDB?
>
> Fix Eclipse so it doesn't force the default without your permission?
I'm under the impression that it is not Eclipse that does that but GDB.
In defaulted_query() GDB bases itself on input_from_terminal_p() and
figures
out that there is no terminal and answers the prompt automatically.
I'm not exactly sure how to prevent that from happening...
Marc
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RecordReplay: Default answer for changing memory
2009-03-31 18:58 ` Marc Khouzam
@ 2009-04-01 2:43 ` Joel Brobecker
2009-04-01 3:33 ` Hui Zhu
2009-04-01 17:01 ` Daniel Jacobowitz
0 siblings, 2 replies; 6+ messages in thread
From: Joel Brobecker @ 2009-04-01 2:43 UTC (permalink / raw)
To: Marc Khouzam; +Cc: Paul Koning, gdb
> In defaulted_query() GDB bases itself on input_from_terminal_p() and
> figures out that there is no terminal and answers the prompt
> automatically. I'm not exactly sure how to prevent that from
> happening...
The IDE should probably create a pseudo-terminal. That's what GPS
does, as well as what we do when we test GDB (using expect).
Regarding how to prevent this, I posted a patch not too long ago
that proposed the addition of a new setting, off by default, that
would force the debugger to "interactive" mode (it's useful in
the case when running GDB from a "cygwin" window which does NOT
setup a real pseudo-terminal, but rather some pipes). I didn't
feel that there was real interest in this feature, so I figured
no one else was going to use it but me, and only on Windows, so
I droped it.
I really have to agree that Eclipse should be enhanced to allow you
to choose rather than force the default, if that's really the case.
But in the interim, the patch I suggested might be helpful.
http://www.sourceware.org/ml/gdb-patches/2008-10/msg00626.html
--
Joel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RecordReplay: Default answer for changing memory
2009-04-01 2:43 ` Joel Brobecker
@ 2009-04-01 3:33 ` Hui Zhu
2009-04-01 17:01 ` Daniel Jacobowitz
1 sibling, 0 replies; 6+ messages in thread
From: Hui Zhu @ 2009-04-01 3:33 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Marc Khouzam, Paul Koning, gdb
>
> I really have to agree that Eclipse should be enhanced to allow you
> to choose rather than force the default,
Agree with that.
Of course, after p record in, I will add a switch or something else to
let it more friendly to Eclipse.
Thanks,
Hui
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RecordReplay: Default answer for changing memory
2009-04-01 2:43 ` Joel Brobecker
2009-04-01 3:33 ` Hui Zhu
@ 2009-04-01 17:01 ` Daniel Jacobowitz
1 sibling, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2009-04-01 17:01 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Marc Khouzam, Paul Koning, gdb
On Tue, Mar 31, 2009 at 07:43:23PM -0700, Joel Brobecker wrote:
> > In defaulted_query() GDB bases itself on input_from_terminal_p() and
> > figures out that there is no terminal and answers the prompt
> > automatically. I'm not exactly sure how to prevent that from
> > happening...
>
> The IDE should probably create a pseudo-terminal. That's what GPS
> does, as well as what we do when we test GDB (using expect).
I don't think it's a good idea to treat the MI interface as a
terminal, in any circumstance. The MI protocol does not allow for
unformatted queries at any random point, which is where you'll get
them if you don't disable all queries. If there's a query that is
useful to the front end it should become explicit.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-04-01 17:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-31 17:45 RecordReplay: Default answer for changing memory Marc Khouzam
2009-03-31 17:51 ` Paul Koning
2009-03-31 18:58 ` Marc Khouzam
2009-04-01 2:43 ` Joel Brobecker
2009-04-01 3:33 ` Hui Zhu
2009-04-01 17:01 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox