Pelles C forum

Pelles C => General discussions => Topic started by: dizergin on January 03, 2015, 01:49:57 AM

Title: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: dizergin on January 03, 2015, 01:49:57 AM
Is it possible to perform the subj with PellesС debugger in principle? or i must have on each computer the OS-dedicated  PellesC  installation. Currently I can not  debug a 32 bit program with 32bit PellesC installation (RC6) under win8.1 64bit and so do I with 32bit program with 64bit PellesC installation (RC6) -- is it OK?
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: Stefan Pendl on January 03, 2015, 10:11:49 AM
On 64-bit Windows it is recommended to install the 64-bit release of PellesC.

64-bit PellesC can create 32-bit and 64-bit projects.
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: dizergin on January 03, 2015, 10:50:29 AM
On 64-bit Windows it is recommended to install the 64-bit release of PellesC.

64-bit PellesC can create 32-bit and 64-bit projects.
Yes - i know (Pelles C CAN create valid binaries for each system). But my question concerned DEBUGGIN (=usage of the internal debugger to debug the source code) - as matter of fact i can not even run the debugger (see the original message) without gettin'  whole ide into the deadlock.  :(
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: Stefan Pendl on January 03, 2015, 02:40:59 PM
How do you set the debugging options in the compiler and linker tab?

Do you use the debug vs. release switch add-in to easily set them?

Sorry, the initial post didn't say that the IDE is hanging, so I was not sure what the real question was.
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: dizergin on January 03, 2015, 04:45:49 PM
a) to test RC6  32 in win8.1 64 enviroment over 32 bit console application:
1. I create Hello world console app with the Wizard - It compiled, linked and run -just fine (within  the IDE)
2. Set "Full" option in Compiler, Assembler, and "CodeView and COFF" Linker tabs of the Project Option Dialog
3. Run Debuggin via "Go\Debug" button - and got the IDE into the state where all project-related main menu items disabled (inactive) - without any message or warnings - is It OK?

b) to test RC6  64 in win8.1 64 enviroment over 64 console application:
I repeat p1-p3 of a) with 64 bit targeting option of the ConsoleApp Wizard - it compiled , linked, run and DEBUGGed - fine

c) to test RC6  64 in win8.1 64 enviroment over 32 bit console application:
I repeat p1-p3 of a) with 32 bit targeting option of the ConsoleApp Wizard - it compiled , linked, run - fine, and DEBUGGed -  with endless "Exeption: Access violation " message window popup.
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: dizergin on January 03, 2015, 05:01:05 PM

Do you use the debug vs. release switch add-in to easily set them?
I saw no such option -where is it?  So i had to set "Full" in 'debug info' combo of Compiler and Assembler tabs and  linker's tab "CodeView&COFF" combo   - manually
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: Stefan Pendl on January 03, 2015, 06:01:27 PM
To switch between debug and release configuration a add-in is available here in the add-in section, there is nothing available out of the box.

Due to the access violation I have the following questions:

Where is PellesC installed?
Where are your projects located?
Do you get an UAC dialog asking for elevated rights when launching the IDE?

PellesC must be run as Administrator.
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: dizergin on January 03, 2015, 06:34:45 PM
To switch between debug and release configuration a add-in is available here in the add-in section, there is nothing available out of the box.

Due to the access violation I have the following questions:

Where is PellesC installed?
Where are your projects located?
Do you get an UAC dialog asking for elevated rights when launching the IDE?

PellesC must be run as Administrator.
1. I see nothing in the adds-in section (the Customize dialogs tab) - it is complitely empty and  inactive with no check boxes  visible
2. I tested  a) default location (Program Files) b) root of  the second drive  (d:\PelelsC ) c) root of a flash drive - the result  is the same (see above)
3.  In the different places ( also default storage place was checked) - the result  is the same (see above)
4. No  - i got just standart - "permit to run" dialog  ( if i run the ide ( installed in the custom location) by dbl clicking on EXE -file
5. Yes - i run the IDE as administrator.
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: Stefan Pendl on January 04, 2015, 09:17:18 AM
You will have to download the add-in from this forum and install it, it is not shipping with PellesC.

Can you use ProcMon from the SysInternals to check what path results in the access violation?
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: dizergin on January 04, 2015, 10:30:54 AM
You will have to download the add-in from this forum and install it, it is not shipping with PellesC.

Can you use ProcMon from the SysInternals to check what path results in the access violation?
1. If you mean the BuildOptions_Addin ... it  does not work at least under RC6 64 in win 8.1 64
2. It is too tedios for me to filter procman's messages properly, but you can do it by yourself at the will, log file (filtered by poide64's and  conhost's PID'S) https://dl.dropboxusercontent.com/u/22395934/Logfile1.rar (https://dl.dropboxusercontent.com/u/22395934/Logfile1.rar)
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: TimoVJL on January 04, 2015, 10:40:30 AM
In Add-In SDK should be DbgRel.dll example.

This here (http://forum.pellesc.de/index.php?topic=257.msg1003#msg1003)
This too (http://forum.pellesc.de/index.php?topic=5730.msg21334#msg21334)
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: dizergin on January 04, 2015, 10:45:15 AM
In Add-In SDK should be DbgRel.dll example.
:) thnx i am aware of (i even rebuild the project with RC6 64)
update : rebuild from DbgRelNOE_WS.zip works fine -- but the lock from the AV exeption is still presented (as expected)
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: Stefan Pendl on January 04, 2015, 02:28:19 PM
Since you mentioned anti-virus, have you excluded your projects folder from the real-time-scan?

Some AV software doesn't like PellesC and they always flag executables as virus etc.
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: dizergin on January 04, 2015, 02:30:30 PM
Since you mentioned anti-virus, have you excluded your projects folder from the real-time-scan?

Some AV software doesn't like PellesC and they always flag executables as virus etc.
  i shut down avast before running Pelles C
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: dizergin on January 04, 2015, 04:35:54 PM
what it looks like - case c) - https://dl.dropboxusercontent.com/u/22395934/Clipboard01.png
                             case a) -  https://dl.dropboxusercontent.com/u/22395934/Clipboard02.png
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: dizergin on February 06, 2015, 08:38:08 PM
So is there any hope that the bug(s) shall be mended (up to the release date)?
Title: Re: Debugging 32 bit program in 64 OS in Pelles C 64 (and vice-versa)
Post by: dizergin on March 02, 2015, 02:50:23 PM
It is a pity but  the RC7 is still affected by the bug  :(  (confirmed under mswin8.1 64bit)