Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Remote Debug Apache Module(Would like a way to remotely debug apache2 from my Mac to by Ubuntu machine)
Remote Debug Apache Module [message #1732283] Sat, 14 May 2016 15:04
Christopher Palmer is currently offline Christopher PalmerFriend
Messages: 1
Registered: May 2016
Junior Member
Hi there, my name is Chris

I am currently developing a custom module for apache in C. I have worked out how to build the module using the apxs tool. I would like to extend my development power so that I can debug this module within apache and thus find bugs quickly.

So far I have tried (and not got to work) the following:

1.Downloaded and Installed Eclipse CDT Neon for Mac 64 Bit
2.Run -> Debug Configurations -> C/C++ Attach to Application
3.At the bottom I made sure it was set to GDB DFS Launcher
4. Debugger tab -> Main, had to correct the GDB Debugger field - for my mac it's /usr/local/bin/gdb because I remember downloading it through homebrew.
5. Debugger Tab -> Connection, happy with TCP over port 10000

Now all these operations are performed over SSH to my Ubuntu Server:
6. Installed my module into apache2.
7. Run apache2 in debug mode by typing sudo apachectl -X This forces the Apache damon into just one instance... useful for debugging. (BTW, I have also got the debug symbols because I performed sudo apt-get install apache2-dbg
8. In another SSH window I run sudo gdbserver --multi :10000

9. Returning to eclipse I hit Debug on my new debug configuration.
10. I can successfully list all the processes on my Linux machine... naturally I select the Apache one.

11. And, nothing happens
The problem is at this point nothing happens. No breakpoints which I have set get called. Eclipse does not register any errors. It just does nothing. I cannot tell what is going on in the slightest!

Some things you should also know...
My sources are loaded into a project in the Eclipse workspace and I have set breakpoints in them expecting them to fire. I have not built the sources with any Eclipse tools or local tools on machine (since what's the point, they need to be built with apxs on the linux machine!)

Some suspicions I have...
I am sure I am missing something in the way to tell eclipse that the sources are linked to the module I want to test but I just couldn't work out how from any manuals.

Apxs compiles the sources into a shared library. I can successfully use gdb over SSH on my linux machine to set breakpoints in this shared library (but I have to write things like set breakpoint pending on before writing b my_handler

Thank you very much for your consideration and responses.

Kind Regards

Previous Topic:Updates of Eclipse with CDT bad?
Next Topic:Debug: Unable to create variable object\ Failed to execute MI
Goto Forum:

Current Time: Wed Sep 26 11:37:17 GMT 2018

Powered by FUDForum. Page generated in 0.02223 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top