Author Topic: Is there a way of automatically configuring debugger on initial install?  (Read 18581 times)

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
I have looked and cannot find any auto detect or code that tries to do any configuration of a debugger on initial install so that the end user does not have to configure the debugger manually.

If I have missed something can you please point me to where I have missed it. I also if this has been discussed before can someone please let me know the thread link or what to search for in the forum so I can see what was attempted and why it failed or in the more likely case was rejected.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
There is no such code, nor there are previous attempts to do it after the switch to the debugger config style.
Before that the debugger exe setting was part of the compiler settings.

Not sure it is worth the complications at the moment.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
oBFusCATed, thanks for the response.  I have a working P.O.C. that optionally adds the debugger configs and links the compiler.

Over the next few days I am now going to test that the following compilers I have on my Windows setup work with all of the patches I have been working on and fix any bugs I come across:
1) GCC Cygwin
2) GCC MSYS2 - mingw32
3) GCC MSYS2 - mingw64
4) GCC TDM-32
5) GCC TDM-64
6) GCC mingw-w64
7) GCC mingw    (mingw32)
8) LLVM Clang MSYS2 - mingw64


Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
I have the code changes done, tested and ready to submit to resolve ticket 114 once the following has been done:
1) Ticket 374 patch lands in the truck.
2) Cygwin code changes lands in the trunk
3) Submit patch for ticket 1117 once 1 & 2 are done
4) Submit patch for ticket 1111 once 3 lands in the trunk

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
1 is highly unlikely to happen. For me TDM is dead for example (it cannot compile C::B in its last version).
Also I'm not sure we want to have 10 different but kind of the same compilers in the list.
I suppose the code should do a copy when it auto-detects multiple compilers of the same kind, but then it gets really complex about the order and naming.

I see a patch about 3, isn't this the latest version?
I don't see why 4 is a dependency on this one.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Just because the TDM 10.3 does not build CB should not be a criteria for not including it as allot of the supported compilers also do not compile CB.

I agree with the compilers being very very similar, but they each have different search directories and there are a few different debugger executables used. Having individual sets of files for each compiler allows you to select between them instead of having to change the configuration every time you want to swap between them. The code is all ready complex enough and adding extra code to "try" and auto detect multiple compilers in Windows and then copy the config and update it due to the different executables names used for some of the compilers would ne a nightmare, but adding the compiler & options XML file sets is allot easier and later when the compilers die they can be dropped allot easier.

As per my last post in 1117 the patch had a small bug in which I found when making changes for ticket 1111.

I have tested 1111 on a branch that includes the previous changes in order to fully test the changes and ensure that all of the changes work together to ensure that an end user doing a first time install can get a working compiler allot easier than with the current code.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Just because the TDM 10.3 does not build CB should not be a criteria for not including it as allot of the supported compilers also do not compile CB.
"does not build CB" is more like "it is broken and produces failing code". No idea why, but there are reports that CB is crashing when built with this compiler. I don't want to promote broken compilers. We've used TDM for a long time, but currently it is not well supported by TDragon and so we have to move on.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
I have been able to build CB with TDM-64 10.3.0 and use the CB produced to compiler a simple app and debug it.

Can you point me at the posts about "it is broken and produces failing code"?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Nope, search the forum, I'm a linux user mainly and for windows I'm just a spectator...
« Last Edit: July 18, 2021, 09:15:51 pm by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
I have been able to build CB with TDM-64 10.3.0 and use the CB produced to compiler a simple app and debug it.

Can you point me at the posts about "it is broken and produces failing code"?

You may wish to say where you got the TDM-64 10.3.0 from?

Because I have no idea if you mean the real original website or the second website that was NOT the same person or some new third website.

Tim S.
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
@oBFusCATed There are 6 forum posts after 2010 that reference TDM I have listed below. I also looked at the tickets and there is noting about TDM  "it is broken and produces failing code" that I could find.

2019: Topic: Error getting 32 bits aplication with CB, TDM and wxWidgets 
2018: gfortran TDM 5.1 problem
2017: Debugging with TDM GCC 32bit + CodeBlocks- can't find member variables
2017: multilib mingw-w64 TDM compiler
2015: TDM mingw 5.1 breaks XMLResourceHandler?
2012: problems with 32-bit executables in TDM mingw64 installation

In the 2015 post @stahta01 posted that -o3 often results in bad code. This is a GCC issue and not a specific TDM issue.
In the 2018 post there was a GCC bug report is referenced. Yet another GCC issue that is not specific TDM.

As such I cannot find any references to justify not including TDM as the two issues are GCC issues that would affect all of the compilers based on affected GCC source code.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
@stahta01

Either of following sites.
https://jmeubank.github.io/tdm-gcc/download/
https://sourceforge.net/projects/tdm-gcc/files/v10.3.0-tdm64-1/

The https://sourceforge.net/projects/tdm-gcc/ page has the following:
TDM-GCC is now hosted on Github at https://jmeubank.github.io/tdm-gcc/.

Wikipedia TDM link to the two sites above on their TDM page:
https://en.wikipedia.org/wiki/TDM-GCC

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
@oBFusCATed There are 6 forum posts after 2010 that reference TDM I have listed below. I also looked at the tickets and there is noting about TDM  "it is broken and produces failing code" that I could find.
https://forums.codeblocks.org/index.php/topic,23642.0.html

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Try the link as it does not work for me.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Works fine and it leads to "TDM-Gcc is discontinued" where TDM failures are discussed. I've not linked a particular post.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]