From afcde266182f4283a3a777570face6457b8d22b0 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sun, 11 Sep 2016 13:41:32 +0100 Subject: [PATCH] Update FAQ answer about setting an early breakpoint Signed-off-by: Jon Turney --- 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 c64ab4a03..5234414b1 100644 --- a/winsup/doc/faq-programming.xml +++ b/winsup/doc/faq-programming.xml @@ -811,13 +811,22 @@ Guide here: . -How can I set a breakpoint at MainCRTStartup? +How can I set a breakpoint at mainCRTStartup? -(Please note: This section has not yet been updated for the latest net release.) + + Set a breakpoint in gdb with b *0x401000 + (for i686), or b *0x100401000 (for x86_64). -Set a breakpoint at *0x401000 in gdb and then run the program in -question. + + + This entrypoint address can be computed as the sum of the ImageBase and + AddressOfEntryPoint values given by objdump -p. + + + + Note that the DllMain entrypoints for linked DLLs will have been executed + before this breakpoint is hit.