On Nov 4 12:53, Jon Turney wrote: > On 04/11/2022 10:34, Corinna Vinschen wrote: > > On Nov 3 11:22, Jeremy Drake via Cygwin-patches wrote: > > > On Thu, 3 Nov 2022, Jon Turney wrote: > > > > > > > gdb supports 'set disable-randomization off' on Windows since [1] > > > > (included in gdb 13). > > > > > > > > https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=bcb9251f029da8dcf360a4f5acfa3b4211c87bb0;hp=8fea1a81c7d9279a6f91e49ebacfb61e0f8ce008 > > > > > > Is it really *disable*-randomization *off*? The double-negative seems to > > > suggest that in that case ASLR would be left *on*. > > > > Yeah, sounds weird.... > > Yes, this is just stupidity. Revised patch attached.
Heh, please push. Thanks, Corinna > From 9ffce0d6124933cf16aee3ad006e32858fe0754a Mon Sep 17 00:00:00 2001 > From: Jon Turney <jon.tur...@dronecode.org.uk> > Date: Tue, 1 Nov 2022 16:52:57 +0000 > Subject: [PATCH] Cygwin: Improve FAQ on early breakpoint for ASLR > > gdb supports the 'disable-randomization' setting on Windows since [1] > (included in gdb 13). > > https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=bcb9251f029da8dcf360a4f5acfa3b4211c87bb0;hp=8fea1a81c7d9279a6f91e49ebacfb61e0f8ce008 > --- > winsup/doc/faq-programming.xml | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml > index 7945b6b88..36d0a401f 100644 > --- a/winsup/doc/faq-programming.xml > +++ b/winsup/doc/faq-programming.xml > @@ -844,6 +844,12 @@ Guide here: <ulink > url="https://cygwin.com/cygwin-ug-net/dll.html"/>. > Note that the DllMain entrypoints for linked DLLs will have been executed > before this breakpoint is hit. > </para> > + > +<para> > + (It may be necessary to use the <command>gdb</command> command <command>set > + disable-randomization on</command> to turn off ASLR for the debugee to > + prevent the base address getting randomized.) > +</para> > </answer></qandaentry> > > <qandaentry id="faq.programming.debug"> > -- > 2.38.1 >