[PATCH] Update FAQ answer about setting an early breakpoint

Jon Turney jon.turney@dronecode.org.uk
Sun Sep 11 15:00:00 GMT 2016

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
 winsup/doc/faq-programming.xml | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml
index c64ab4a..5234414 100644
--- a/winsup/doc/faq-programming.xml
+++ b/winsup/doc/faq-programming.xml
@@ -811,13 +811,22 @@ Guide here: <ulink url="https://cygwin.com/cygwin-ug-net/dll.html"/>.
 <qandaentry id="faq.programming.breakpoint">
-<question><para>How can I set a breakpoint at MainCRTStartup?</para></question>
+<question><para>How can I set a breakpoint at mainCRTStartup?</para></question>
-<para><emphasis role='bold'>(Please note: This section has not yet been updated for the latest net release.)</emphasis>
+  Set a breakpoint in <command>gdb</command> with <command>b *0x401000</command>
+  (for i686), or <command>b *0x100401000</command> (for x86_64).
+  This entrypoint address can be computed as the sum of the ImageBase and
+  AddressOfEntryPoint values given by <command>objdump -p</command>.
-<para>Set a breakpoint at *0x401000 in gdb and then run the program in
+  Note that the DllMain entrypoints for linked DLLs will have been executed
+  before this breakpoint is hit.

More information about the Cygwin-patches mailing list