This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] [i386] Put hlt at the ON_STACK breakpoint [Re: GDB 7.4.91 available for testing]
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb-patches at sourceware dot org, Pedro Alves <palves at redhat dot com>
- Date: Mon, 23 Jul 2012 22:16:11 +0200
- Subject: Re: [patch] [i386] Put hlt at the ON_STACK breakpoint [Re: GDB 7.4.91 available for testing]
- References: <20120718163413.GA17548@adacore.com> <1342739016.2220.32.camel@soleil> <20120720071158.GA7053@host2.jankratochvil.net> <1342817409.2149.41.camel@soleil> <20120722173053.GA22036@host2.jankratochvil.net> <1342983655.2301.55.camel@soleil> <20120723072125.GA12958@host2.jankratochvil.net> <20120723155951.GA24718@adacore.com> <20120723163513.GA1222@host2.jankratochvil.net> <1343074047.2209.23.camel@soleil>
On Mon, 23 Jul 2012 22:07:27 +0200, Philippe Waroquiers wrote:
> Note that the trap instruction should only be written by the
> push_dummy_code function : for Normal breakpoints, only a Z0 packet
> should be done, as Valgrind will not allow to modify the guest
> executable code (it is not mapped writable).
I do not understand now what is and what is not allowed for valgrind to write.
For the inferior call to work at all you have to create the stack frame for
it, otherwise it cannot work, at least for parameters passed by stack.
So the GDB patch is no longer needed when you have fixed valgrind to put 0xcc
during Z0? Why valgrind cannot write 0xcc into stack memory when it already
has to write there to create the stack frame / parameters passed by stack?
(Yes, I should read valgrind source code instead.)
IIUC the 'hlt' cleanup patch can go only for 7.6 as 7.5 should not regress
with new/fixed valgrind.
Thanks,
Jan