Mailing List Archive

GDB step by step exim
Hi exim devs,

I’d like to understand better how exim processes EHLO messages. Ideally, I could use gdb to set a breakpoint and step through from wherever I want. Unfortunately, exim just ignores any breakpoints... it hits them for sure, bc I see the print stmts. It must have to do with exims threading. I tried detach-on-fork off, but no luck.

Please help: HOW TO DEBUG EXIM?

Thanks,

Dennis

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
Re: GDB step by step exim [ In reply to ]
On 16 Jul 2020, at 05:07, Dennis Roellke via Exim-dev <exim-dev@exim.org> wrote:
> I’d like to understand better how exim processes EHLO messages. Ideally, I could use gdb to set a breakpoint and step through from wherever I want. Unfortunately, exim just ignores any breakpoints... it hits them for sure, bc I see the print stmts. It must have to do with exims threading. I tried detach-on-fork off, but no luck.
>
> Please help: HOW TO DEBUG EXIM?

https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html

See the "-d" section, also "debug_print" in

https://www.exim.org/exim-html-current/doc/html/spec_html/ch-generic_options_for_routers.html
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-generic_options_for_transports.html

What is it that you're attempting to understand, specifically? The code is open, of course, so you can step through that if you need to but note that different configurations will process data in different ways according to local preference/necessity.

Graeme

PS you probably want to subscribe to the list before posting again so we don't have to check and release your messages from the moderation queue.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
Re: GDB step by step exim [ In reply to ]
On 16/07/2020 05:07, Dennis Roellke via Exim-dev wrote:
> I’d like to understand better how exim processes EHLO messages.

Most people don't need to deal at that level of detail.

Why?
--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
Re: GDB step by step exim [ In reply to ]
On 2020-07-16 at 00:07 -0400, Dennis Roellke via Exim-dev wrote:
> I’d like to understand better how exim processes EHLO messages. Ideally, I could use gdb to set a breakpoint and step through from wherever I want. Unfortunately, exim just ignores any breakpoints... it hits them for sure, bc I see the print stmts. It must have to do with exims threading. I tried detach-on-fork off, but no luck.

Exim doesn't thread. It does fork some processes.

More likely, you have a setuid binary, which is disabling ptracing.

-Phil

--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##