[Solved/Invalid] Debugging via attach to process not working

CodeLite installation/troubleshooting forum
Razish
CodeLite Curious
Posts: 2
Joined: Sat Oct 31, 2015 8:17 am
Genuine User: Yes
IDE Question: C++
Contact:

[Solved/Invalid] Debugging via attach to process not working

Post by Razish »

Issue: Breakpoints do not work, no call stack

OS: Windows 7 64 bit
CodeLite version: 9.0.2, downloaded
GCC version: 5.1.0
GDB version: 7.9.1
Python: 2.7.10 (64 bit)
SCons: 2.4.0

My project uses SCons to invoke the compiler. It builds, links and runs correctly in debug and release configuration.
I have set the correct path to TDM-GCC's gdb, the same one released with the gcc I'm invoking.
I'm creating a 32 bit DLL in debug configuration (tried -g, -g3 and -ggdb3) which is loaded by a separate 32 bit executable built with MSVC in release configuration.
There are unrelated issues preventing me from launching the executable directly via CodeLite, that is not the issue at hand.

When I attach to process, the execution is paused with an empty call stack. I click resume and it carries on fine.
When I try to place a breakpoint inside my DLL code, it is not triggered.

My compile flags are:
-fomit-frame-pointer -fsigned-char -fvisibility=hidden -fvisibility-inlines-hidden
-m32 -march=i686 -masm=intel -mfpmath=sse -msse2 -mstackrealign
-std=c++11
Last edited by Razish on Sat Oct 31, 2015 10:43 am, edited 1 time in total.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugging via attach to process does not work

Post by eranif »

It is working just fine, make sure that you have:

* The proper process permissions
* The running process is built with debug information

If you have all the above, try debugging from the command line and see if you can debug from there
Also, please read the HOWTO POST thread (see my signature) and post all relevant information (like the debugger log)

Eran
Make sure you have read the HOW TO POST thread
Razish
CodeLite Curious
Posts: 2
Joined: Sat Oct 31, 2015 8:17 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugging via attach to process does not work

Post by Razish »

Problem solved, sorry for the noise. I ended up creating a 32 bit installation of TDM-GCC and using gdb32.exe from there, seems to be working fine now via attach to process. I was wrong to assume 64 bit gdb would correctly debug a 32 bit module.

For further info, when using gdb.exe from the 64 bit installation via command line, I got this output:

Code: Select all

warning: `C:\Windows\SYSTEM32\ntdll.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `C:\Windows\SYSTEM32\wow64.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: Could not load shared library symbols for WOW64_IMAGE_SECTION.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for NOT_AN_IMAGE.
Do you need "set solib-search-path" or "set sysroot"?
[Inferior 1 (process 12500) exited with code 030000000465]
However, CodeLite did not give me any such output (none at all via attach to process) - I had read the posting guidelines :<
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: [Solved/Invalid] Debugging via attach to process not wor

Post by eranif »

It should have given it in the "Output" tab of the debugger pane

Eran
Make sure you have read the HOW TO POST thread
Post Reply